0% found this document useful (0 votes)
16 views

Surface code quantum computation

The document discusses the principles of surface code quantum computation, focusing on the use of stabilizers and logical qubits to implement fault-tolerant quantum gates. It explains how errors affect stabilizers and how to detect and correct these errors using measurements. The document also covers the representation of logical operations and the manipulation of quantum states within the surface code framework.

Uploaded by

Shaheer Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Surface code quantum computation

The document discusses the principles of surface code quantum computation, focusing on the use of stabilizers and logical qubits to implement fault-tolerant quantum gates. It explains how errors affect stabilizers and how to detect and correct these errors using measurements. The document also covers the representation of logical operations and the manipulation of quantum states within the surface code framework.

Uploaded by

Shaheer Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 196

Surface code quantum computation

Austin Fowler

How do we compute using


this??

arXiv:2408.13687
Let’s talk about one qubit

Can represent the state as a column vector:


Let’s talk about one qubit

Can transform the state with any unitary matrix:


What about a logical qubit?

Can’t just apply

to each qubit, most of the time


you would get garbage. Most of
the time each rotation would
look like an error to the code.
Exception: Hadamard

Can just apply

to each qubit, this fault-tolerantly


implements logical Hadamard.

So why does this work, and how can


we do a universal set of gates?
We are going to need some math: stabilizers

Pauli matrices:

The simplest stabilizers are just operators that leave some useful state
unchanged, eg:

These states are eigenstates of their associated


stabilizer, and are unique up to global phase
given the stabilizer.
We are going to need some math: stabilizers

Pauli matrices:

The simplest stabilizers are just operators that leave some useful state
unchanged, eg:

Since the eigenstates are uniquely


specified by the stabilizers, we can
write them instead of the states.
What are stabilizers good for?
Consider

+XXX
This state is stabilized by 3 independent stabilizers +ZZI
+IZZ

For complex states, the list of independent stabilizers can be far more compact
than the state itself. We’ll need stabilizers to talk about the surface code.
Some algebra
Here’s one example of showing a stabilizer stabilizing a state:
What about errors?
Consider the effect of errors:

What does this do to our stabilizers?

+XXX
To say the same thing another way: or: -ZZI
+IZZ

Errors flip the sign of stabilizers they anticommute with (XZ = -ZX). If we can work
out how to measure the sign of a stabilizer, we can detect errors.
Let’s work out the output of this circuit
H

controlled-A

A zero measurement means the output is the +1


eigenstate of A, one means -1 eigenstate
H

controlled-A

A zero measurement means the output is the +1


eigenstate of A, one means -1 eigenstate
H

controlled-A

A zero measurement means the output is the +1


eigenstate of A, one means -1 eigenstate
H

controlled-A

A zero measurement means the output is the +1


eigenstate of A, one means -1 eigenstate
H

controlled-A

A zero measurement means the output is the +1


eigenstate of A, one means -1 eigenstate
Locating an error with stabilizers

+XXX
-ZZI
+IZZ

+XXX
or -ZZI
-IZZ
What will the signs of the
stabilizers be after these errors?
+XXX
or +ZZI
-IZZ
Locating an error with stabilizers

+XXX
-ZZI
+IZZ

+XXX
-ZZI
-IZZ

+XXX
+ZZI
-IZZ
Representing stabilizers as a picture

+XXX
+ZZI
+IZZ

These are all the same state.


What happens after a Z error on
any qubit?
Representing stabilizers as a picture

-XXX
+ZZI
+IZZ

Sign of the X stabilizer is flipped.


Reminder: why we care about stabilizers

Trying to work out why just

applying

to each qubit fault-tolerantly


implements logical Hadamard.

This diagram shows a pattern of


stabilizers, let’s elaborate.
Re-introducing the surface code

We like to describe surface codes using a


stabilizer picture.
Re-introducing the surface code

+IXXIIIIII
+ZIIZIIIII
+XXIXXIIII
+IZZIZZIII
+IIIZZIZZI
+IIIIXXIXX
+IIIIIZIIZ
+IIIIIIXXI

… as this is not easy to work with …


Introducing the surface code: logical zero
|000000000> +(-1)d|000000110>
a
+(-1)a|011000000> +(-1)a+d|011000110>
b +(-1)b|110110000> +(-1)b+d|110110110>
+(-1)a+b|101110000> +(-1)a+b+d|101110110>
c
+(-1)c|000011011> +(-1)c+d|000011101>
d +(-1)a+c|011011011> +(-1)a+c+d|011011101>
+(-1)b+c|110101011> +(-1)b+c+d|110101101>
+(-1)a+b+c|101101011> +(-1)a+b+c+d|101101101>

… and this is even more useless …

though perhaps it helps explain initialization.


Introducing the surface code: logical one
|010010010> +(-1)d|010010100>
X a
+(-1)a|001010010> +(-1)a+d|001010100>
b +(-1)b|100100010> +(-1)b+d|100100100>
X
+(-1)a+b|111100010> +(-1)a+b+d|111100100>
c
X +(-1)c|010001001> +(-1)c+d|010001111>
d +(-1)a+c|001001001> +(-1)a+c+d|001001111>
+(-1)b+c|100111001> +(-1)b+c+d|100111111>
+(-1)a+b+c|111111001> +(-1)a+b+c+d|111111111>

… also perhaps nice to see an explicit logical


operation in action. Qubits 7, 4, and 1 have
been flipped.
Introducing the surface code
XL
Let’s write this more compactly:
Introducing the surface code
XL Any chain of X operators from top boundary to
bottom boundary that commutes with all
stabilizers transforms the state identically:

This is why the surface code is called a


topological code. Many manipulations only
depend on the global form rather than the low-
level details.
Introducing the surface code
Can similarly define logical Z:

ZL

Logical operators should commute with all


stabilizers but not be products of stabilizers
themselves. A pair of anticommuting logical
operators defines a logical qubit.
Introducing the surface code
XL

ZL

Don’t really need qubit numberings, and note


the logical operators anticommute.
XL
Introducing the surface code
XL

ZL ZL

Here is a distance 5 surface code, would have


been difficult to even write without all of the
simplifications.
Introducing the surface code
XL
XL

ZL ZL

Here is an arbitrary distance surface code.


Note that XL and ZL must always cross an odd
number of times, ensuring anticommutation just
like physical X and Z.
Update: what we can do so far

Now know how to prepare |0L>, |1L>,


and apply XL, ZL

We still don’t know why we can just


apply H to each qubit to fault-tolerantly
implement logical Hadamard.
Gates as state maps
Controlled-X
Hadamard
Gates as matrices
Controlled-X
Hadamard
Gates as maps of matrices
Hadamard converts X into Z
and vice versa.

Any process that maps logical


operators as shown also
CNOT gates copy X on control, implements that gate.
and Z on target to both outputs.
Logical Hadamard explained visually

XL ZL

HL
ZL XL
What is this gate?

XL XL

ZL -ZL
It’s X logical

XL XL

XL
ZL -ZL
A common situation in surface code computation

X L , ZL (-1)aXL, (-1)bZL

It’s common for the signs of logical operators to change.


A common situation in surface code computation

X L , ZL ZLa XLb (-1)aXL, (-1)bZL

This means byproduct operators have occurred.


Byproduct operators

XL

ZL

XL

These are not errors, we can just track them in software


Byproduct operators

XL

ZL XL

XL

These are not errors, we can just track them in software


Byproduct operators

XL

ZL XL

XL

These are not errors, we can just track them in software


Byproduct operators

XL

ZL ZL

XL

These are not errors, we can just track them in software


Byproduct operators

XL

ZL ZL

XL

These are not errors, we can just track them in software


Byproduct operators

ZL XL

ZL ZL

XL

These are not errors, we can just track them in software


Byproduct operators

ZL XL

ZL ZL

XL ZL

These are not errors, we can just track them in software


Byproduct operators

ZL XL

XL ZL

XL ZL

These are not errors, we can just track them in software


Byproduct operators

ZL X L

XL ZL ZL

XL ZL

These are not errors, we can just track them in software


Byproduct operators

ZL X L

XL

XL ZL

These are not errors, we can just track them in software


Byproduct operators

XL ZL X L

XL

XL ZL

Can commute ZX to enable XX cancellation, global phase ignored


Byproduct operators

ZL

XL

XL ZL

These are not errors, we can just track them in software


Byproduct operators

ZL

XL XL

XL ZL

These are not errors, we can just track them in software


Byproduct operators

ZL

ZL XL

YL

These are not errors, we can just track them in software


Byproduct operators

ZL

YL

YL

A logical measurement of a qubit with a byproduct X/Y must be flipped.


Byproduct operators from deforming the surface code

We can extend a surface code.


As drawn, this does not change
the sign of the logical operators.
Byproduct operators from deforming the surface code

Contracting the logical qubit can


lead to changes in the signs of
the logical operators.
Byproduct operators from deforming the surface code

B D

A
C D
Byproduct operators from deforming the surface code

Can use any layer of stabilizers to move the XL


operator as after correction every repeated
stabilizer measurement will have the same value.

Can tolerate ~10%


measurement error A
D
given 0.1% error on
other gates.
Fun with identity gates

time

In:

Out:

Computations built out of H, CNOT and S


(Clifford gates) can be done in < 0 time.
Ready for CNOT?
Controlled-X
The Correlation Surfaces of a CNOT

Using appropriate
stabilizer
measurements,
initializations, and data
qubit measurements,
we can work out the
parity of these
surfaces.

If the parity is odd,


meaning there will be a
sign change, that
introduces a byproduct
operator before the
gate.
The Correlation Surfaces of a CNOT

Some abbreviations:
Some abbreviations:
Pause to take stock

Not universal,
but a good start,
let’s pause and
think about
combinations.
Let’s work on simpler notation
time?

time?

Drag each operator


through the lattice
surgery and see how
it passes through or is
split by junctions.
Let’s work on simpler notation
time?

time?
Let’s work on simpler notation
time? Black nodes scatter X
and give Z a choice,
white nodes scatter Z
time? and give X a choice.
Let’s work on simpler notation
Black nodes scatter X
and give Z a choice,
white nodes scatter Z
and give X a choice.
Let’s work on simpler notation
Black nodes scatter X
and give Z a choice,
white nodes scatter Z
So we have a choice here? and give X a choice.
Let’s work on simpler notation
Black nodes scatter X
and give Z a choice,
white nodes scatter Z
So we have a choice here? and give X a choice.

Yes, this is equally valid.

Are there any invalid choices?


Beginnings and endings

The structures enable X and Z logical initialization and


measurement. Or you can just think of them as places where X
and Z correlation surfaces terminate.
Beginnings and endings
The Z correlation surface cannot
terminate on a black node. That
wouldn't be a valid correlation
surface. Let's study this example in
detail.

Let's start by
considering this a
sequence of 2 gates,
then do better.
Manipulating structures

Nodes of the same


color connected by
an edge can be
merged.
The spider rule
In diagrams, any number
of edges can emanate
from a single node.

These diagrams and rules


are a specialization of ZX
calculus.

Black/X nodes scatter X


correlation surfaces.

White/Z nodes scatter Z


correlation surfaces.
Implementing ZX diagrams with lattice surgery

Nodes with more than 4 edges do need to be spread out.


Identity rule

Long pipes don't in


any meaningful
sense have colored
nodes.

Any isolated nodes


on a line can simply
be deleted.
Multi-edge rule

If more than one edge connects a pair of


nodes, they can be condensed into a
single edge.
Multi-edge rule

If more than one edge connects a pair of


nodes, they can be condensed into a
single edge.
Let's apply some rules
Input circuit.

Convert to ZX diagram.

Use spider rule to merge black/X nodes.

User identity rule to remove black/X node.


CNOT revisited

Do we really need to know that this is a CNOT to


calculate output byproduct operators?

Surely there is an easier and simpler way?


CNOT revisited

Can calculate the output byproduct operators from the


input operators and appropriate correlation surfaces
without knowing what the computation is actually
doing.
Let's revisit this example

This performs an XX measurement that is toggled by b


and d, output is with output
byproduct operators that can be taken directly from the
above figure.
Let’s practice

Let’s consider this 3 CNOT


circuit and structure. Let’s
systematically optimize it.
Let’s practice

Let’s start by writing down


the equivalent ZX diagram.
Let’s practice

We can use the spider rule


to combine the 2 white
nodes.
Let’s practice

We can use the spider rule


to split a white nodes.
Let’s practice

We can deform the structure


arbitrarily provided we
respect the boundary colors.
Let’s practice

We can deform the structure


arbitrarily provided we
respect the boundary colors.
Let’s practice
a’ b’ c’
a a’

b b’

c c’

We can deform the structure


arbitrarily provided we a b c
respect the boundary colors.
Let’s practice

b’ c’
a’ b’ c’

a’

a b c b c
Let’s practice

b’ c’ b’ c’

a’
a’

a a

c b c
b
Let’s practice

b’ c’ b’ c’

a’ a’

a
a

c b c
b
Let’s practice
b’
b’ c’

a’ a’
c’
a a

c c
b b
a’ b’ c’

b’

a’
c’
a
c
b
c
a b
An easier way?
a a’ b’

b’ 3 CNOTs, two
b
spider rules
c c’

a’
a’ c’ c’
a a’
a
b a c
b’ c
b b’ b
c c’
Questions with no good answers
b’
How much time does it take to implement a
logical CNOT?

How many logical qubits does it take to


implement a logical CNOT?

Which part of the figure on the right is each a’


c’
logical CNOT?
a
Which axis is the time axis? c
b
Embrace structure and correlation surfaces
b’
a’ c’

a c
b b’

Recall the rules: a’


c’
a
c
b
What computation is this?
a’ c’ a’ c’
a’ c’
a c a c
a c
b b’ b b’
b b’
a’ c’ a’ c’

a c a c
b b’ b b’

a’ c’ a’ c’

a c a c
b b’ b b’
What computation is this?
a’ c’ a’ c’
a’ c’
a c a c
a c
b b’ b b’
b b’
a’ c’ a’ c’

a c a c
b b’ b b’

a’ c’ a’ c’

a c a c
b b’ b b’
What computation is this?
a’ c’

a c
Consistency checks:
b b’
If operators on the left anticommute, their
corresponding operators on the right must
anticommute.

If operators on the left commute, their


corresponding operators on the right must
commute.
Some fun with AI

Given a valid operator map,


generate a corresponding
matrix representation of the
computation.

Happily and confidently produced


nonfunctional code, over and over
again despite all efforts to direct the
conversation to success.
(Super)humans still on top

Given a valid operator map,


generate a corresponding
matrix representation of the
computation.

Craig Gidney

Happily and confidently produced


functional code in 5 minutes.
(Super)humans still on top

flows_to_matrix.py
import numpy as np
import stim

def flows_to_matrix(flows: list[stim.Flow]):


n = len(flows[0].input_copy())
stabilizers = []
for flow in flows:
assert len(flow.input_copy()) == n Craig Gidney
assert len(flow.output_copy()) == n
num_input_y = len(flow.input_copy().pauli_indices('Y'))
stabilizers.append(flow.input_copy() + flow.output_copy() * (-1)**num_input_y)
tableau = stim.Tableau.from_stabilizers(stabilizers)
return tableau.to_state_vector(endian='big').reshape((2**n, 2**n)).transpose() * 2**(n/2)
(Super)humans still on top

flows_to_matrix.py
(Super)humans still on top

flows_to_matrix.py
Do we really need these correlation surfaces?
a’ c’ a’ c’
a’ c’
a c a c
a c
b b’ b b’
b b’
a’ c’ a’ c’

a c a c
b b’ b b’

a’ c’ a’ c’

a c a c
b b’ b b’
Better correlation surfaces
a’ c’

a c
b b’
Better correlation surfaces
a’ c’

a c
b b’
Better correlation surfaces
a’ c’

a c
b b’

flows_to_matrix.py
Better correlation surfaces
a’ c’

a c
b b’

Suppose our input byproduct operators are:


Better correlation surfaces
a’ c’

a c
b b’

Suppose our input byproduct operators are:

One output byproduct operator:


Better correlation surfaces
Input byproduct operators:

Output byproduct operators:


Could we implement this on our hardware?
b’

a’
c’
a
c
b
Could we implement this on our hardware?

Have space for 4 distance 3 logical qubits


Could we implement this on our hardware?
b’

a’
c’
a
c
b

But this realization has inputs and outputs


that lead off the chip…
Could we implement this on our hardware?

Let’s start over…

a c
Could we implement this on our hardware?

Let’s start over…

a b
c
Could we implement this on our hardware?

CNOT(a, b)

a b
c
Could we implement this on our hardware?
c’
Rearrange logical qubits
b’

a’
Could we implement this on our hardware?
b’
Rearrange some more a’
c’
Could we implement this on our hardware?
b’ c’
CNOT(b, c)

a’
Could we implement this on our hardware?
b’ c’
Compress

a’
Could we implement this on our hardware?
b’c’
Move output c’

a’
Could we implement this on our hardware?
c’
CNOT(a, c) a’
b’
Could we implement this on our hardware?
c’a’
b’
Extend outputs

a b
Could we implement this on our hardware?
c’a’
b’

a b
Could we implement this on our hardware?
c’a’
b’
Initialize and measure
all logical qubits in
either the X or Z basis.
Two experiments that
give you the probability
of each correlation
surface having the
wrong parity.

All parities must be


correct for the circuit to
succeed.

a b
Could we implement this on our hardware?

It would be nice to have a tool that took


just the SketchUp figure and a code
d distance d and produced a file
Stim file
containing all the necessary physical
gates, detectors, and observables
(correlation surfaces).
R01234
CX 0 1 2 3
Stim file example CX 2 1 4 3
M13
DETECTOR(1, 0) rec[-2]
Repeat num_rounds - 1 times DETECTOR(3, 0) rec[-1]
REPEAT num_rounds - 1 {
0 R13
CX 0 1 2 3
CX 2 1 4 3
1
M13
SHIFT_COORDS(0, 1)
2 DETECTOR(1, 0) rec[-2] rec[-4]
DETECTOR(3, 0) rec[-1] rec[-3]
}
3
M024
SHIFT_COORDS(0, 1)
4 DETECTOR(1, 0) rec[-2] rec[-3] rec[-5]
DETECTOR(3, 0) rec[-1] rec[-2] rec[-4]
OBSERVABLE_INCLUDE(0) rec[-1]
6) build scalable circuit
7) build scalable observables
Summary of work flow 8) find detectors
9) create Stim files

1) open template file


10) run simulations
11) Plot data

2) build model
3) export to .dae
4) import using pycollada
5) find abstract observables
Which SketchUp?
● Free versions of this exist:
○ https://www.sketchup.com/en/products/sketchup-for-web -> “start modeling”
○ Old windows freeware version: https://google-sketchup.en.lo4d.com/download
■ This version has export to .dae
■ Focus on this for the moment

Helping out
● https://github.com/QCHackers/tqec/issues
Need a clean template (example files in this folder)

● Won’t try to specify every possible


structure yet
● Notation:
○ Dark wall → X boundary
○ Light wall → Z boundary
○ Open wall → O
● Opposite faces always have the
same boundaries
○ Label objects according to RGB axes
and presence of Hadamard
○ Leftmost object is zxz
○ Rightmost object is zoxh, use wall
sections closest to origin for pieces
with Hadamard
Example: logical CNOT
● Save a copy of the template and build
your structure out of it taking care to
snap pieces together corner to corner
● Export the structure to .dae
○ This is an easy to parse XML format

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>


<COLLADA
xmlns="http://www.collada.org/2005/11/COLLADASchema"
version="1.4.1">
<asset>
<contributor>
<authoring_tool>SketchUp 8.0.15158</authoring_tool>
</contributor>
<created>2024-06-18T00:31:45Z</created>
<modified>2024-06-18T00:31:45Z</modified>
<unit meter="0.02539999969303608" name="inch" />
<up_axis>Z_UP</up_axis>
</asset>
Making sense of a .dae file
Reusable library nodes Transformation matrices place
defined once copies of library nodes

<library_nodes> <library_visual_scenes>
<node id="ID3" name="zxz"> <visual_scene id="ID1">
... <node name="SketchUp">
</node> <node id="ID2" name="instance_0">
<node id="ID27" name="xzz"> <matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
... <instance_node url="#ID3" />
</node> </node>
<node id="ID26" name="instance_1">
etc <matrix>1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1</matrix>
<instance_node url="#ID27" />
</node>

etc
Parsing a .dae file
Example: the program in this folder
Better: pycollada

Listing all library node names with instance counts and matrices:
Node name: oxz, Number of instances: 1
136
Node name: zxx, Number of instances: 1
033
Node name: zox, Number of instances: 1
033
Node name: zxo, Number of instances: 7
0 0 1, 0 0 4, 0 0 7, 0 3 4, 3 3 4, 3 3 7, 3 3 1
Node name: zxz, Number of instances: 9
0 0 0, 0 0 3, 0 0 6, 0 0 9, 0 3 6, 3 3 6, 3 3 9, 3 3 0, 3 3 3
Output of example program

Node name: oxz, Number of instances: 1


136
Node name: zxx, Number of instances: 1
033
Node name: zox, Number of instances: 1
033
Node name: zxo, Number of instances: 7
0 0 1, 0 0 4, 0 0 7, 0 3 4, 3 3 4, 3 3 7, 3 3 1
Node name: zxz, Number of instances: 9
0 0 0, 0 0 3, 0 0 6, 0 0 9, 0 3 6, 3 3 6, 3 3 9, 3 3 0, 3 3 3
Output of example program

Node name: oxz, Number of instances: 1


136
Node name: zxx, Number of instances: 1
033
Node name: zox, Number of instances: 1
033
Node name: zxo, Number of instances: 7
0 0 1, 0 0 4, 0 0 7, 0 3 4, 3 3 4, 3 3 7, 3 3 1
Node name: zxz, Number of instances: 9
0 0 0, 0 0 3, 0 0 6, 0 0 9, 0 3 6, 3 3 6, 3 3 9, 3 3 0, 3 3 3
Output of example program

Node name: oxz, Number of instances: 1


136
Node name: zxx, Number of instances: 1
033
Node name: zox, Number of instances: 1
033
Node name: zxo, Number of instances: 7
0 0 1, 0 0 4, 0 0 7, 0 3 4, 3 3 4, 3 3 7, 3 3 1
Node name: zxz, Number of instances: 9
0 0 0, 0 0 3, 0 0 6, 0 0 9, 0 3 6, 3 3 6, 3 3 9, 3 3 0, 3 3 3
Translating this to a physical circuit
Start with the cubes, these fill space tightly.

1 2k-1 1
Add connectors
Replace cube layers with connector layers

1 1
Add connectors
Replace cube walls with connector layers

1 2k-1 1
Two special cubes

Same boundary on 4 spatial sides, these are used for spatial


junctions. Not fully defined without connectors.
Need to carefully organize
hook errors.

4-way is maximum
degree.
Spotlight on central template
Putting it together
Link to detailed pdf

Check code distance:


errors -> detection
events -> graph edges -
> find shortest paths
Cutting X down to T or L

Start by just omitting


plaquettes.
Cutting X down to T or L

Fix the border by removing


wrong color plaquettes and
cutting the right color
plaquettes to the
appropriate weight.
Cutting X down to T or L

Change the orientation of


hook errors to be parallel to
the boundary.
Let’s consider an L in time
Start with the cubes, each one
is identical (ignore the
connectors)

1 2k-1 1
Add connector
Replace cube layers with connector layers

1 1
Important to emphasize that the connector
has no spacetime extent itself, it replaces
layers within the cubes it touches.
Add connector
Replace cube layers with connector layers

Regular stabilizers, green dots indicate


initialization to |0>, red dots indicate
measurement in the Z basis.
Merging circuits

The circled circuits


must be merged.
Finding observables / correlation surfaces

Z on all edges, X on any pair

X on all edges, Z on any pair


Finding observables / correlation surfaces

Under the hood in the tool you may not want to


simplify the above graph when finding correlation
surfaces as you would be looking for specific sets of
measurements.
But compressing ZX graphs is fun

2 applications of
the spider rule

2 applications of
the identity rule
And there are more rules worth knowing

Hopf law
Fun spider/multi-edge rule example

Same for white nodes…


Bialgrebra law
ZX graphs with Hadamards
How do we achieve a universal set of gates?

U=CliffordT(†)HT(†)HT(†)HT(†)HT(†)...
How do we achieve a T gate?

Let’s play with Quirk (Craig Gidney)

This circuit teleports arbitrary states from the top qubit to the
middle qubit (add X, H, HZ)
How do we achieve a T gate?

Let’s play with Quirk (Craig Gidney)

Let’s build and understand this circuit step-by-step.


How do we create a |T> state?

We want to create the state:

Let's consider a distance 2 surface code:


How do we create a |T> state?

We want to create the state:

Expand and simplify:

Mnemonic: ones together or apart


Let’s zoom into arXiv:2302.12292 (Craig Gidney)

Basic idea: create a small logical |+> state, perform one rotation to make a small
logical |T>, expand, and discard if any errors detected.
Let’s zoom into arXiv:2302.12292 (Craig Gidney)

Let’s focus on the injection region and rewrite this as a normal circuit.
Let’s zoom into arXiv:2302.12292 (Craig Gidney)

These gates measure the top X stabilizer.


Let’s zoom into arXiv:2302.12292 (Craig Gidney)

These gates measure the middle Z stabilizer.


Let’s zoom into arXiv:2302.12292 (Craig Gidney)

This single gate measures the bottom X stabilizer. Let’s take a look at the
Quirk circuit, for those curious here is the Crumble version of full circuit.
Is injection the best way to get a |T> state?

Injection depends crucially on a single gate so O(p) error.

This is bad.
Magic state cultivation

Magic state cultivation: growing T states


as cheap as CNOT gates
Craig Gidney, Cody Jones, Noah Shutty
arXiv:2409.17595

Can get O(p5) suppression.

Likely good enough for practical


purposes.
Magic state cultivation

Magic state cultivation: growing T states


as cheap as CNOT gates
Craig Gidney, Cody Jones, Noah Shutty
arXiv:2409.17595

Errata:
“Shortly before releasing this paper, we
noticed a minor mistake in our circuits…
We intend to fix the issue in a future
version of the paper. We don’t expect the
changes to affect the final results.”

Delay discussing this for now.


Next missing piece: the S gate

The T gate requires an S gate 50% of the time.


Next missing piece: the S gate
Could cultivate an S state to drive an S gate
Can also reuse |S>/|Y> states
Do we need |S> states at all?

Consider this teleportation circuit:

Let’s add an S gate to it


Can instead do a Y-basis measurement

Can we do a Y-basis measurement without


doing an S gate?
Revision

These logical measurements are fault-tolerant


as the array of single basis measurements also
measures the stabilizers of the same type
leading to detection events and the ability to
correct the result parity of the logical
measurement.

Compare the parity of a set of measurements


with the value in the previous round.
Measuring logical Y

XL We measured in the physical Y basis by


transforming the measurement into
something we could measure using MZ.
ZL
Let’s try to turn the logical Y operator into
something we can measure fault tolerantly.

Inplace Access to the Surface Code Y Basis


Craig Gidney
Quantum 8, 1310 (2024)
https://doi.org/10.22331/q-2024-04-08-1310
Measuring logical Y
Measure Z stabilizer
find X errors
XL

ZL

Measure X stabilizer
find Z errors
Measuring logical Y X Y Z

Craig Gidney, Quantum 8, 1310 (2024) 1


Measuring logical Y X Y Z

1 Craig Gidney, Quantum 8, 1310 (2024) 2


Measuring logical Y X Y Z

2 Craig Gidney, Quantum 8, 1310 (2024) 3


Measuring logical Y X Y Z

3 Craig Gidney, Quantum 8, 1310 (2024) 4


Measuring logical Y X Y Z
X-controlled Y gate, apply Y if
control is |->

4 Craig Gidney, Quantum 8, 1310 (2024) 5


Measuring logical Y X Y Z

5 Craig Gidney, Quantum 8, 1310 (2024) 6


Measuring logical Y X Y Z

6 Craig Gidney, Quantum 8, 1310 (2024) 7


Measuring logical Y X Y Z

7 Craig Gidney, Quantum 8, 1310 (2024) 8


Measuring logical Y X Y Z

8 Craig Gidney, Quantum 8, 1310 (2024) 9


Measuring logical Y X Y Z

Craig Gidney, Quantum 8,


1310 (2024)

1 9
After the circuit, the corrected parity of these measurements will
give us a logical Y measurement. Since these are stabilizer
measurements, multiple rounds of measurements will be
required to ensure fault tolerance.
Craig Gidney, Quantum 8, 1310 (2024)
Let’s put it all together time

Classical processing latency


Let’s put it all together time

Classical processing latency


Colors time

R: 255, 127, 127


G: 99, 198, 118
B: 115, 150, 255
Summary time

Using SketchUp as the model builder should be


sufficient for our purposes and this deck describes
an explicit protocol for converting such structures
into scalable circuits and simulating them.

You might also like