MULT90063 Introduction to Quantum Computing
Lecture 17
Simple classical error correction codes, Quantum error correction codes, stabilizer formalism, 5-qubit code, 7-qubit Steane code
Lecture 18
Copyright By PowCoder代写 加微信 powcoder
The more advanced quantum error correction codes, Fault Tolerance, surface code.
Quantum error correction
MULT90063 Introduction to Quantum Computing
Introduction to Quantum Error Correction Lecture 17
MULT90063 Introduction to Quantum Computing
This lecture we will introduce error correction for quantum computers: – Overviewofneedforquantumerrorcorrection
– Simpleclassicalerrorcorrectioncodes
– Quantumerrorcorrectioncodes
– Thestabilizerformalism
– Thefivequbitcodeandsevenqubit , Chapter 11
Kaye, Chapter 10
Nielsen and Chuang, Chapter 10
MULT90063 Introduction to Quantum Computing
Decoherence and control errors
Qubit: Bloch sphere (or fragile “quantum bubble”)
Decoherence: interaction with environment affects quantum state/operation
Y Even if you get decoherence under control… Control: imprecise control leads to error in
quantum state/operation
Impact of errors on fidelity of Shor’s quantum factoring algorithm at logic level:
circuit time
MULT90063 Introduction to Quantum Computing
Decoherence and control errors
Qubit: Bloch sphere (or fragile “quantum bubble”)
Decoherence: interaction with environment affects quantum state/operation
Y Even if you get decoherence under control… Control: imprecise control leads to error in
quantum state/operation
Impact of errors on fidelity of Shor’s quantum factoring algorithm at logic level:
circuit time
Some error locations are very sensitive…it doesn’t take much to rattle an algorithm… Even after reducing physical errors, a quantum computer needs error correction…
MULT90063 Introduction to Quantum Computing
Classical Error Correction
The simplest example of a classical error correction code is a repetition code:
0 ! 000 1 ! 111
Logical “0” Logical “1”
“Codewords”
If an error occurs (ie. bit flip) then using the redundant information we can still correct by simply taking the majority:
8><000 8><111 0 001 1 110 >:010 >:101 100 011
With one error, we can correct the error and continue the computation.
MULT90063 Introduction to Quantum Computing
Code distance
The distance of the code is the (minimum) number of logical errors between codewords.
3 bit-flips takes 000 to 111, so the distance of the 3-bit repetition code is 3.
For classical codes, the distance is simply the minimum Hamming distance between any two codewords.
Often (for linear codes) you will see the notation:
n: number of bits
k: number of encoded bits
d: distance of code
The three-bit repetition code is a [3, 1, 3] code.
MULT90063 Introduction to Quantum Computing
Code failure
Too many errors can overwhelm an error correction code. For example if we have two distinct errors on the codeword, 000:
000 ! 101 Which we would (wrongly) decode as “1”.
A distance d code can correct
MULT90063 Introduction to Quantum Computing
Quantum Error Correction
Similar to classical error correction codes, we can have a quantum repetition code:
|0i ! |000i |1i ! |111i
In particular, a quantum superposition would be encoded as:
↵ |0i + |1i ! ↵ |000i + |111i
Two key differences between quantum and classical error correction codes:
1. Cannot measure the codewords directly; would collapse the state
2. Phase errors
“Logical 0” “Logical 1”
MULT90063 Introduction to Quantum Computing
Syndrome Measurements
If we measured our qubits, we would collapse the state. For example, if we had the three qubit error correction code, and measured the first qubit as “0” then we would collapse:
↵ |000i + |111i ! |000i
[Recall: Z|0i=+1|0i Z|1i= 1|1i !Z1Z2|01i=(+1)⇥( 1)|01i= |01i]
We do not measure the qubits individually, but instead measure correlations between qubits. The measurements are known as syndrome measurements.
We measure:
Z1 Z2 Z2 Z3
“Are the first two qubits the same?” and “Are the second two qubits the same?” If an X- error has occurred, we can tell that an error has happened, and where it is, but we have not measured any information about the encoded state.
MULT90063 Introduction to Quantum Computing
Syndrome Measurement example
We have an encoded (logical) qubit:
↵ |000i + |111i An X-error occurs on the first physical qubit:
↵ |100i + |011i Z1Z2 = 1
From this we can deduce that an error has occurred on the first qubit, and
correct (with an X gate we apply):
We measure:
X1(↵ |100i + |011i) = ↵ |000i + |111i
First two qubits different Second two qubits same
MULT90063 Introduction to Quantum Computing
3-bit code circuit example
q =a 0 +b 1
q L =a 000 +b 111
Syndrome & correct
Errors = X prob. p
Correction
X error on qubit-1
X error on qubit-2 10 X error on qubit-3 01
00 No action 11 X on qubit-1
X on qubit-2 X on qubit-3
MULT90063 Introduction to Quantum Computing
Phase errors
In QM, bit flips are not the only type of errors which can occur. We can also have phase errors (and in practice these are more common).
Z1 (↵ |000i + |111i) = ↵ |000i |111i
We have seen in the labs these errors are just as detrimental as bit flip errors!
We can make a phase-flip repetition code:
|0i ! |+ + +i |1i ! | i
|0i + |1i p2
|0i |1i p2
X|±i= p1 (X|0i±X|1i) 2
= p1 ( | 1 i ± | 0 i ) 2
! X1X2 |+ i = |+ i
The syndrome measurements we make are:
|+i = | i =
This code detects and corrects phase flip errors, but does not detect bit flip errors. Quantum error correction codes need to do both!
MULT90063 Introduction to Quantum Computing
Phase flip code example
We have an encoded (logical) qubit:
↵|+++i+ | i An Z-error occurs on the third physical qubit:
↵|++ i+ | +i X1X2 = +1 First two qubits same
and correct (with an Z gate we apply):
Z3 (↵ |+ + i + | +i) = ↵ |+ + +i + | i
We measure:
X |±i = ± |±i
! X1X2 | i = + | i
Second two qubits different
From this we can deduce that a phase error has occurred on the third qubit,
MULT90063 Introduction to Quantum Computing
The Bacon-Shor Code
Codes exist which correct both phase flips, and bit flips, such as the Bacon-Shor 9-qubit code:
|0Li = p8 (|000i + |111i) ⌦ (|000i + |111i) ⌦ (|000i + |111i)
|1Li = p8 (|000i |111i) ⌦ (|000i |111i) ⌦ (|000i |111i)
Syndrome measurements are a combination the bit-flip and phase-flip codes. First as if this is three bit flip codes:
Then treating it as thee logical qubits of three qubits each, and checking for a bit flip on any of these:
X1X2X3X4X5X6, X4X5X6X7X8X9
Z1Z2, Z2Z3,
Z4Z5, Z5Z6,
Z7Z8, Z8Z9
MULT90063 Introduction to Quantum Computing
Stabilizer Formalism
Instead of specifying the codewords, we will specify the syndrome measurements which should give a “+1” result. From this we can derive the codewords/codespace.
For example:
|0i + |1i |0i + |1i Z |0i = |0i X p2 = p2
For our purposes, the stabilizers will all be tensor products of Pauli operators and the identity.
An operator, S, is a stabilizer of the state | i if S|i=|i
Similarly, an operator S is a stabilizer of a subspace, if it stabilizes every basis state of that subspace.
MULT90063 Introduction to Quantum Computing
Aside: The Stabilizer Group
Mathematically, the stabilizers of a state (or a subspace) form an group, known as the stabilizer group, S. Verifying the four group axioms:
I|i=|i If S1, S2 and S3 stabilize | i then:
Associativity:
If S stabilizes | i then
S1S2| i=S1| i=| i (S1S2)S3 = S1(S2S3)
S 1| i=S 1S| i=| i
Typically (and for all of these lectures) we will choose the stabilizer group to be a
subset of the Pauli group, and it is Abelian (ie. AB=BA).
We can specify the stabilizer group by writing its generators (S1, S2, S3,…Sk).
MULT90063 Introduction to Quantum Computing
Stabilizers and QEC
For the bit-flip code, the “stabilizers” (generators of the stabilizer group) of the
(Z1 Z2 Z2 Z3
The codewords are stabilized by these operators:
Z1Z2 |000i = |000i Z2Z3 |000i = |000i
Z1Z2 |111i = |111i Z2Z3 |111i = |111i
Any linear combination is also stabilized by these operators:
↵ |000i + |111i
MULT90063 Introduction to Quantum Computing
Commutation of Pauli operators
Commutation properties of the Pauli operators X, Y and Z are very useful at this point. We get the relations by considering actions on an arbitrary state.
For an arbitrary state we have different Pauli operators anti-commute (a negative sign when they are switched in order):
XZ| i= ZX| i!XZ = ZX XY | i= YX| i!XY = YX
ZY | i= YZ| i!ZY = YZ Operators on different qubits commute (self evident):
X1Z2| i=Z2X1| i!X1Z2 =Z2X1 But even products of operators commute:
X1X2Z1Z2 | i = Z1Z2X1X2 | i ! X1X2Z1Z2 = Z1Z2X1X2
MULT90063 Introduction to Quantum Computing
Error And Stabilizers
If an error anti-commutes with a syndrome measurement operator (ie. stabilizer generator) then the measurement result changes sign.
For example, consider the three qubit code, for which
Z1Z2| i=+1| i
The syndrome measurement outcome is +1 (since the system is in the +1 eigenstate)
After an X-error on the first qubit:
Z1Z2| 0i=Z1Z2X1| i= X1Z1Z2| i= X1| i= | 0i The syndrome measurement outcome is -1 (since the system is in the -1 eigenstate)
MULT90063 Introduction to Quantum Computing
Error and Stabilizers
↵ |000i + |111i
↵ |100i + |011i
↵ |010i + |101i
↵ |001i + |110i
Unique syndromes means that we can identify which error has occurred.
MULT90063 Introduction to Quantum Computing
The Five Qubit Code
The smallest d=3 code to identify both bit and phase flips has five qubits.
5 (qubits) x 3 (possible {X, Y or Z} errors on each qubit) + 1 (no error) = 16 syndromes 24 = 16 possible syndromes from four measurements.
The stabilizers of this code are:
8> > >< I X Z Z X XIXZZ > > >: Z X I X Z ZZXIX
Exercise: Write out all 15 single qubit errors and check that their syndromes are unique
MULT90063 Introduction to Quantum Computing
Syndromes of the five qubit code Construction of the syndrome circuits is easier to see. Eg. Measure IZXXZ:
Four different measurements required for the five qubit code.
MULT90063 Introduction to Quantum Computing
Seven Qubit Steane Code
7 qubit “Steane” code. It is also known as the seven qubit “colour” code (which is a topological code – more next lecture). Stabilizers of this code are:
8> > > > I I I X X X X > > > >< I X X I I X X XIXIXIX
> I I I Z Z Z Z > > > >: I Z Z I I Z Z ZIZIZIZ
Exercise: Check that every single qubit error produces a unique syndrome!
MULT90063 Introduction to Quantum Computing
Logical States of the Steane code
Logical States
|0Li = p8(|0000000i + |1010101i + |0110011i + |1100110i
+ |0001111i + |1011010i + |0111100i + |1101001i) |1Li = p8(|1111111i + |0101010i + |1001100i + |0011001i
+ |111000i + |0100101i + |1000011i + |0010110i)
We want to operate on these states while remaining protected Ie. without decoding.
Logical X Operator
(see this by operating XL = XXXXXXX directly on logical
states above)
MULT90063 Introduction to Quantum Computing
Logical Operators Commute with Stabilizers
Example Stabilizers:
8> > > > I I I X X X X > > > >< I X X I I X X XIXIXIX
> I I I Z Z Z Z > > > >: I Z Z I I Z Z ZIZIZIZ
XL = XXXXXXX
Logical X:
-> X operators all commute with themselves, and even number of Z commute,
so logical operator commutes with the stabilisers and so code states are stabilised by the logical X operator.
MULT90063 Introduction to Quantum Computing
Other logical operators
|0Li = p8(|0000000i + |1010101i + |0110011i + |1100110i
+ |0001111i + |1011010i + |0111100i + |1101001i) |1Li = p8(|1111111i + |0101010i + |1001100i + |0011001i
+ |111000i + |0100101i + |1000011i + |0010110i)
Logical 0 has zero or four 1’s. Logical 1 has three or seven ones. So
SL = S†S†S†S†S†S†S† i4 = 1, i3 = i
ZL = ZZZZZZZ
MULT90063 Introduction to Quantum Computing
Other logical operators
|0Li = p8(|0000000i + |1010101i + |0110011i + |1100110i
+ |0001111i + |1011010i + |0111100i + |1101001i) |1Li = p8(|1111111i + |0101010i + |1001100i + |0011001i
+ |111000i + |0100101i + |1000011i + |0010110i)
Logical 0 has zero or four 1’s. Logical 1 has three or seven. So
SL = S†S†S†S†S†S†S† i4 = 1, i3 = i
ZL = ZZZZZZZ
MULT90063 Introduction to Quantum Computing
Transversal Gates
Other Steane code 7-qubit code gates include H and CNOT.
Transversal gates:
Hadamard on a single logical qubit
transversal CNOT
Can also implement the T gate (but this is not transversal)
MULT90063 Introduction to Quantum Computing
Fault Tolerant Universal Gate Set
In quantum computing every quantum circuit can be expressed as a sequence of:
T Gate (pi/8)
These gates can be implemented “fault tolerantly” using quantum error codes.
MULT90063 Introduction to Quantum Computing
QEC Summary
Quantum error correction in a nutshell:
correct data ancilla qubits
determine error syndrome
measure ancillas
logical qubit
Example: 3-bit code…
data summary written to ancillas
data qubits
q =a 0 +b 1
q L =a 000 +b 111
q =a 0 +b 1
Syndrome ® correction 00 no error
11 XonQ1 10 X on Q2 01 X on Q3
Syndrome & correct
Ancilla measurement ® syndrome
MULT90063 Introduction to Quantum Computing
Gottesman-Knill Theorem
We saw how generators from the Pauli group can be used to specified states. We can use this to track quantum states, so long as the operations we apply only take Paulis to other Paulis (ie. Clifford gates).
This method of simulating is efficient.
1) Weonlypreparecomputationalbasisstates
2) Only apply CNOT, X, Y, Z, H, S gates (or things which can be
generated from them)
3) Makemeasurementsinthecomputationalbasis
This can be simulated efficiently on a classical computer
Put another way, T-gates make things hard!
MULT90063 Introduction to Quantum Computing
Lecture 17
Simple classical error correction codes, Quantum error correction codes, stabilizer formalism, 5-qubit code, 7-qubit Steane code
Lecture 18
The more advanced quantum error correction codes, Fault Tolerance, surface code.
Quantum error correction
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com