Quantum error correction (QEC)Mermin: Miracle of quantum error correction
Surprise, since the only way to detect errors is to make a measurement, while we are not allowed to learn information about qubit state
QEC: 1995 Peter Shor, independently Andrew Steane
QEC is necessary in a QC (makes QC less impossible), otherwise the whole computation should be within decoherence time, that is hard for long algorithms.
Classical computer: arbitrary long algorithms are OK using error correction.
Classical error correction
Simplest error correction: 3-bit repetitive code (think about memory)
0 β 0001 β 111
Encoding Errors: bit flips
Decoding: all bits measured, majority, then encoding again (if need to maintain)
General approach to classical error correction:1) detection of errors via error syndromes2) correction: flip the wrong (flipped) bits
In 3-bit repetitive code, error syndrome is given by: parity of bits 1&2 and 2&3 (parity is sum modulo 2)
4 possible results: OK, flip bit 1, flip bit 2, flip bit 3Protects against 1 bit flipProbability of error: ππ β 3ππ2 1 β ππ + ππ3 Works well if ππ βͺ 1
Threshold: ππ = β1 2 (always helps)Concatenation (layering): arbitrary small probability of error is possible5-bit repetitive code protects against 2 errors, etc.
Classical error correction (cont.)
There are smarter ways for encoding (less redundancy needed), but the general idea is the same: use redundancy and parity checks
(Simplified) idea of Hamming code
Error is evidenced by particular combination of wrong parity checks (error syndrome), then can be corrected. Usually works well for low probability of error ππ, though possible even for ππ β β1 2.
ππ0ππ1ππ2ππ3ππ4ππ5ππ6ππ7ππ0 β ππ1 β ππ2 β ππ3 β ππ4 β ππ5 β ππ6 β ππ7 = ππ0ππ4 β ππ5 β ππ6 β ππ7 = ππ1ππ2 β ππ3 β ππ6 β ππ7 = ππ2ππ1 β ππ3 β ππ5 β ππ7 = ππ3
Using parity check bits ππ0ππ1ππ2ππ3, we can easily find location (and therefore correct) one error in the bit string ππ0ππ1ππ2ππ3ππ4ππ5ππ6ππ7
(in reality a little different, parity check bits are within the bit string, which correspondingly has less data bits)
Only logarithmic overhead
Quantum vs classical error correction
β’ Quantum error correction is really necessary (classical computer can workwithout error correction, usually used for memory and communication; for nanoscale computers can be needed for logic as well)
β’ Only indirect checking for errors is allowed (correcting without decoding!)
β’ Bit flip is not the only type of errors (also phase flips (Z) and bit-phase flips (Y))
β’ Errors grow continuously, not really flips. Two ways to think: 1) gradual stochastic change of |ππβ© (not quite correct, but OK)2) gradual entanglement with environment
We will first discuss idea of indirect checking for errors, then discuss a code protecting from 3 types of errors (ππ,ππ,ππ), and then discuss why this is sufficient for continuous errors
Idea of indirect checking for errors
3-qubit code, protecting from one bit flip
We cannot clone, but still can do encoding:
πΌπΌ 0 + π½π½ 1 β πΌπΌ 000 + π½π½|111β©(somewhat similar to repetitive code)
(operation (πΌπΌ 0 + π½π½ 1 )|00β© β πΌπΌ 000 + π½π½|111β© is unitary)
Idea: measurement of parities (sum modulo 2) without measurement of qubitsIn this way we do not learn anything about πΌπΌ and π½π½Correction is also without decoding: just flip the flipped qubit
We need to measure operators ππ1ππ0 and ππ2ππ1 (numbering ππ2ππ1ππ0)Any Hermitian operator corresponds to an observable, with measurement results being the eigenvalues of this operator.
Operators ππ1ππ0 and ππ2ππ1 are Hermitian (since ππ is Hermitian)Consider ππ1ππ0: ππ1ππ0 2 = οΏ½1, so the eigenvalues are Β±1. +1: even parity, the same qubit states (either |00β© or |11β© or their superposition) β1: odd parity, different qubit states (superposition of |01β© and |10β© )
The same for the operator ππ2ππ1
3-qubit codeThe operation is similar to the classical 3-bit repetitive code
ππ = πΌπΌ 000 + π½π½|111β© correct (uncorrupted) state (codeword)
After flip of qubit 0 it becomes
Similarly, ππ1 ππ = πΌπΌ 010 + π½π½|101β©, ππ2 ππ = πΌπΌ 100 + π½π½|011β©
ππ0 ππ = πΌπΌ 001 + π½π½|110β©
ππ2ππ1 + β β +
ππ0 ππ1 ππ2 οΏ½1
ππ1ππ0 β β + +
β+β means parity 0 (even)
βββ means parity 1 (odd)
From these results (error syndrome) we know if one qubit flipped or not, and which one flipped. Then we can correct by flipping that qubit back.
Now circuits
Encoding πΌπΌ 0 + π½π½|1β©
00
πΌπΌ 000 + π½π½|111β©
3-qubit code (cont.)Encoding πΌπΌ 0 + π½π½|1β©
00
πΌπΌ 000 + π½π½|111β©
Error detection and correction ππ2ππ1 = β1 ππ2ππ1 = +1
ππππππor
or
or οΏ½1
πΌπΌ 000+π½π½|111β©
00
ancillaqubits
meas.
meas.
result ππ1 (1 or 0)
result ππ2 (1 or 0)
ππππ1(1βππ2)
ππππ1ππ2
ππ(1βππ1)ππ2
πΌπΌ 000 + π½π½|111β©
Check that works properly: error in upper qubit β upper ancilla 1 β upper qubit correctederror in middle qubit β both ancillas 1 β middle qubit correctederror in lower qubit β lower ancillas 1 β lower qubit corrected, no error β no correction
The same operation if entangled with other qubits: πΌπΌ 000 ππ0 + π½π½ 111 |ππ1β©
ππ1ππ0 = Β±1
3-qubit code: automated versionStandard procedure
ππππππor
orπΌπΌ 000
+π½π½|111β©
00
ancillaqubits
meas.
meas.
result ππ1 (1 or 0)
result ππ2 (1 or 0)
ππππ1(1βππ2)
ππππ1ππ2
ππ(1βππ1)ππ2
πΌπΌ 000 + π½π½|111β©
Automated version: replace measurement with controlled operation
πΌπΌ 000 + π½π½|111β©
ππππππor
orπΌπΌ 000
+π½π½|111β©
00
ancillaqubits
Check: if 00, then nothing, if 11, then middle qubit corrected, if 01 or 10, then only one CNOT works, again OK
To reuse ancillas, we usually need to measure them (then the automated version is not quite useful); however, it is possible to rely on dissipation to βdump entropyβ
QEC for continuous errors
A hint why QEC works for continuous errors (not a rigorous analysis)
Suppose the middle qubit does not flip, but rotates about ππ-axis
πΌπΌ 000 + π½π½ 111 β cosππ2
πΌπΌ 000 + π½π½ 111 β ππ sinππ2πΌπΌ 010 + π½π½ 101
When we measure parity (say, qubits 1 and 2), the system should βmake a decisionβ, then the state is either collapsed to the correct state (then no error syndrome) or it choses the second term (then error syndrome 11), which we will correct.
Measurement transforms continuous errors into discrete errors (flips)
QEC should protect against rotations about any axis. As we will see later, for that it is sufficient to protect against ππ, ππ, and ππ flips.
Analysis of space dimensions for QEC
Valid (uncorrupted) codewords live in a 2D subspace of 8D Hilbert space(here we discuss dimensions in complex spaces, not number of real parameters)
3-qubit code
After corruption due to ππ0, the state moves to a different (orthogonal) 2D subspace Similarly the state moves to different subspaces after corruption due to ππ1 and ππ2So, there will be 4 orthogonal 2D subspaces (correct and 3 with errors), which all fit well into 8D Hilbert space. This is why we can distinguish errors and correct them.
In general, an ππ-qubit code, protecting against single-qubit bit-flips requires
2ππ β₯ 2(1 + ππ) This is why ππ β₯ 3 is needed for bit-flips
Hilbert space (1 + ππ) 2D subspaces for ππ possible errors
For general errors (3 kinds, will consider later)
2ππ β₯ 2(1 + 3ππ) Therefore, ππ β₯ 5
Such 5-qubit code really exists (will consider later)
3-qubit code protecting from one phase flip (ππ)
0 πΏπΏ β18
(|0β© + |1β©)(|0β© + |1β©) (|0β© + |1β©)
For bit-flip it was 0 πΏπΏ β |000β©, 1 πΏπΏ β |111β©, so that πΌπΌ 0 πΏπΏ + π½π½ 1 πΏπΏ β πΌπΌ 000 + π½π½|111β©
Now similar:
If one qubit flips the phase, |0 + |1β©) β |0 β |1β©), it is possible to find which one, and then correct it back (by applying ππ-gate)
1 πΏπΏ β18
|0 β 1β©)(|0β© β |1β©) |0 β |1β©)
logical
logical 3 physical qubits
πΌπΌ 0 πΏπΏ + π½π½ 1 πΏπΏ β18πΌπΌ |0 + |1 )β3 + π½π½ |0 β |1β©)β3]
To detect a ππ-error, we need to measure ππ1ππ0 and ππ2ππ1
ππππππor
or
00
meas.
meas.
result ππ1 (1 or 0)
result ππ2 (1 or 0)
ππππ1(1βππ2)
ππππ1ππ2
ππ(1βππ1)ππ2
π»π»π»π»π»π»
π»π»π»π»π»π»
or οΏ½1π»π»π»π»π»π»
πΌπΌ 0 + π½π½|1β©
00
encoding possible error error detection correction
Equivalent to fit-flip code, π»π»πππ»π» = ππ, π»π»2 = οΏ½1
9-qubit Shorβs code Is it possible to protect from bit flips (ππ), phase flips (ππ), and bit&phase flips (ππ) at the same time?
Yes! 9-qubit Shorβs code protects from one of such errors in any qubit
Idea: just concatenation of two previous codes (layering of codes)
0 πΏπΏ β18
(|000β© + |111β©)(|000β© + |111β©) (|000β© + |111β©)
1 πΏπΏ β18
|000 β |111β©)(|000β© β |111β©) |000 β |111β©)
One encoding deals with ππ-errors, the other one with ππ-errors, while ππ-errors are taken care of automatically, since ππ = βππππππ
In error correction, usually ππ β‘ ππππ (e.g., Merminβs book)
If a qubit suffers from bit flip (ππ), then this changes parities within 3-qubit block
If a phase-flip of a qubit (ππ), then changes sign (+ β β) in the block
(|010β© + |101β©)(|000β© + |111β©) (|000β© + |111β©)/ 8|010 β |101β©)(|000β© β |111β©) |000 β |111β©)/ 8
|000 β |111β©)(|000β© + |111β©) (|000β© + |111β©)/ 8|000 + |111β©)(|000β© β |111β©) |000 β |111β©)/ 8
If ππ-flip, then both
9-qubit Shorβs code (cont.)
πΌπΌ 0 πΏπΏ + π½π½ 1 πΏπΏ β πΌπΌ (|000β© + |111β©)(|000β© + |111β©) (|000β© + |111β©)/ 8
+π½π½ |000 β |111β©)(|000β© β |111β©) |000 β |111β©)/ 8
Error detection and correction
1) Measure parities with 3-qubit blocks: ππ0ππ1, ππ1ππ2, ππ3ππ4, ππ4ππ5, ππ6ππ7, ππ7ππ8If ππ-error is detected in ππth qubit, correct by gate ππππ
(if bit-flips in different 3-qubit blocks, they all can be corrected)
2) Measure parities of phases of 3-qubit blocks: ππ0ππ1ππ2ππ3ππ4ππ5, ππ3ππ4ππ5ππ6ππ7ππ8(ππ0ππ1ππ2 changes sign of wavefunction if 000 β 111 and does nothing if 000 + 111, so these products compare signs)
If Z-error is detected in ππth 3-qubit block, correct by gate ππ applied to any qubit in this block
In Merminβs book a little different procedure: first detect errors, then correct.Equivalent because step 2) is insensitive to bit flips:
For example, ππ0ππ1ππ2(|001β© β |110β©) = |110β© β |001β© = β(|001β© β |110β©)
Encoding
Shorβs code: is it optimal?
πΌπΌ 0 πΏπΏ + π½π½ 1 πΏπΏ β πΌπΌ (|000β© + |111β©)(|000β© + |111β©) (|000β© + |111β©)/ 8
+π½π½ |000 β |111β©)(|000β© β |111β©) |000 β |111β©)/ 8
8 measured operators: ππ0ππ1, ππ1ππ2, ππ3ππ4, ππ4ππ5, ππ6ππ7, ππ7ππ8ππ0ππ1ππ2ππ3ππ4ππ5, ππ3ππ4ππ5ππ6ππ7ππ8
Therefore, 28 = 256 possible results
However, we need only 1 + 3 Γ 9 = 28 distinguishable results
(even less: 28 β 6 = 22, because ππ-errors may lead to the same result) (degenerate quantum code)
β 9-qubit Shorβs code is not optimal
Also, 9-qubit Hilbert space (512 dimensions) can hold 256 copies of a qubit space
Shorβs code: encoding
πΌπΌ 0 πΏπΏ + π½π½ 1 πΏπΏ β πΌπΌ (|000β© + |111β©)(|000β© + |111β©) (|000β© + |111β©)/ 8
+π½π½ |000 β |111β©)(|000β© β |111β©) |000 β |111β©)/ 8
πΌπΌ 0 + π½π½|1β©00
π»π»
π»π»
π»π»
000000
0 πΏπΏ β 000000000 β0 + 1
200
0 + 12
000 + 1
200 β
000 + 1112
000 + 1112
000 + 1112
1 πΏπΏ β 100100100 β0 β 1
200
0 β 12
000 β 1
200 β
000 β 1112
000 β 1112
000 β 1112
Shorβs code: syndrome extraction
8 measured operators: ππ0ππ1, ππ1ππ2, ππ3ππ4, ππ4ππ5, ππ6ππ7, ππ7ππ8ππ0ππ1ππ2ππ3ππ4ππ5, ππ3ππ4ππ5ππ6ππ7ππ8
ππ0ππ1: as discussed before 0 meas.
Similarly for other ππππππππ (need 6 ancilla qubits for 6 operators ππππππππ)
realization of X0ππ1ππ2ππ3ππ4ππ5:
as always, operator eigenvalue +1corresponds to measurement result 0,
eigenvalue β1 corresponds to result 1 π»π»π»π»π»π»π»π»π»π»π»π»
π»π»π»π»π»π»π»π»π»π»π»π»
meas.0
Easier to think that qubits are either (|0β© + |1β© )/ 2 or |0 β |1β© )/ 2(i.e., eigenstates of ππ)
Overall need 6 + 2 = 8 ancillas
Syndrome extraction: a different way
ππ0ππ1 0 meas.
There is a different but equivalent way of measuring syndromes
=0 meas.π»π»π»π» πππ»π»π»π» ππ
=
0 meas.π»π»π»π»ππ
ππ= =
0 meas.π»π»π»π»ππππ
just a change of notation
In this way it is clear which operator is measured
Syndrome extraction: general waySimilarly, for ππ0ππ1ππ2ππ3ππ4ππ5:
π»π»π»π»π»π»π»π»π»π»π»π»
π»π»π»π»π»π»π»π»π»π»π»π»
meas.0
=
ππππππππππππ
meas.0 π»π»π»π»
This is a general way, showing directly which operator we measure
If a multi-qubit operator π΄π΄ has eigenvalues Β±1, then it can always be measured as
π΄π΄
meas.0 π»π»π»π» 0 β0 + |1β©
2β
0 +|1β©2
if eigenvalue of π΄π΄ is +1 |0β©
0 β|1β©2
if eigenvalue of π΄π΄ is β1 |1β©β β
Automated version of quantum error correctionConditional gates can always be replaced by controlled gates (then no measurement is needed)
Previous example (for 3-qubit code)
ππππππor
orπΌπΌ 000
+π½π½|111β©
00
ancillaqubits
meas.
meas.
result ππ1 (1 or 0)
result ππ2 (1 or 0)
ππππ1(1βππ2)
ππππ1ππ2
ππ(1βππ1)ππ2
πΌπΌ 000 + π½π½|111β©
πΌπΌ 000 + π½π½|111β©
ππππππor
orπΌπΌ 000
+π½π½|111β©
00
ancillaqubits
Obviously the same if we measure ancilla qubits. However, no need to measure, then coherent superposition of scenarios, but correction works for each term (unentangled with ancilla qubits). Anyway, need to dump entropy (possibly resetting by switching on/off energy dissipation).
Error generationWhy protecting from only 3 errors (ππ,ππ,ππ) is sufficient?
We discussed a hint: for a small unwanted unitary evolution, measurement converts small continuous errors into rare big errors (ππ,ππ,ππ), otherwise restores initial state.
Now more general discussion based on interaction and entanglement with environment
ππ 0 β ππ0 0 + ππ1 |1β©1 qubit
ππ 1 β ππ2 0 + ππ3 |1β©|ππβ© is initial state of environmentunitary interaction with environment
|ππππβ© are not normalized (sums are normalized)ππ0 β ππ3 , ππ0,3 β 1, ππ1,2 βͺ 1 gradual process, |ππ1β© and ππ2 grow gradually
Then from linearity
ππ ππ β |ππ0 οΏ½1 + ππ1 ππ) 0 0 ππ + |ππ2 ππ + ππ3 οΏ½1) 1 1 ππ =1 + ππ
2 = 1 00 0
1 β ππ2 = 0 0
0 1projector operators
=ππ0 + |ππ3β©
2οΏ½1 ππ +
ππ1 + |ππ2β©2
ππ ππ +ππ0 β |ππ3β©
2ππ ππ +
ππ1 β |ππ2β©2
ππππ ππ
|ππβ©denote |ππβ© (small) |ππβ© (small) |ππβ© (small)
Error generation (cont.)
ππ 0 β ππ0 0 + ππ1 |1β©1 qubit ππ 1 β ππ2 0 + ππ3 |1β©
Then
ππ ππ β |ππ οΏ½1 + ππ ππ + ππ ππ + ππ ππ) ππ (here ππ β‘ ππππ for brevity)
Small |ππβ©, |ππβ©, |ππβ©, while |ππβ© β 1,
During quantum error correction procedure, these terms are distinguished β projected β only one term remains β can correct back to |ππβ© (we do not care about environment)
(From SchrΓΆdinger equation, |ππβ©, |ππβ©, ππ should grow linearly in time, then probabilities grow as π‘π‘2. Then measurement helps even without correction (quantum Zeno effect). Unfortunately, errors usually grow linearly (not quadratically) in time, so need to correct.)
Error generation: several qubitsThis idea can be generalized to several qubits
ππ Ξ¨ ππ β οΏ½ππ1=0
3
οΏ½ππ2=0
3
. . . οΏ½ππππ=1
3
|ππππ1ππ2...ππππβ© ππππ1(1)ππππ2
(2) . . .ππππππ(ππ) Ξ¨ ππ
where ππ0(ππ) = οΏ½1ππ, ππ1
(ππ) = ππππ, ππ2(ππ) = ππππ, ππ3
(ππ) = ππππ, acting on ππth qubit
This formula is exact. If errors are small and independent for each qubit, then the terms with more than 1 error are small
ππ Ξ¨ ππ β β ππ οΏ½1 + οΏ½ππ=1
ππ
ππππ ππππ + ππππ ππππ + ππππ ππππ Ξ¨ ππ
This is why protection against 3 types of one-qubit errors is sufficient.
(Obviously, not always the case. For example, if two qubits couple to the same environment, then errors are correlated. But this is a much harder case, so people usually consider independent errors.)
The next group of terms: two errors (in two qubits), then three errors, etc.If a code can correct for 2 or more errors, then correlation problem can be solved, and we can also afford to do the procedure less often.
Stabilizer codesGeneral idea:
Single-qubit errors ππππ, ππππ , ππππ move encoded states into different orthogonal subspaces. Making certain measurements, we distinguish these subspaces, and therefore find which error has occurred. Then we correct by applying ππππ, ππππ , or ππππ.
Then for a code encoding one logical qubit into ππ physical qubits and protecting from any one-qubit error, we need
2ππ β₯ 2 (1 + 3ππ)dimension of Hilbert space
each subspace
# of scenarios
β ππ β₯ 5
More general, for a code encoding ππ logical qubits into ππ physical qubits, and correcting up to π‘π‘ errors, we need
2ππ β₯ 2πποΏ½ππ=0
π‘π‘ππππ 3ππ Quantum Hamming bound
(Actually, this bound can be violated in degenerate codes, when different errors lead to the same state)
Stabilizer codes are similar to classical linear codes (also Calderbank-Shor-Steane codes)
Stabilizer codes: syndrome measurementTo distinguish subspaces, we measure a set of commuting operators π΄π΄ππ. They are constructed as direct products of Pauli operators, and for each of them π΄π΄ππ2 = οΏ½1; therefore eigenvalues are Β±1.
Examples: ππ0ππ1, ππ1ππ2, ππ0ππ1ππ2ππ3ππ4ππ5, etc.
Since π΄π΄ππ are commuting, we can measure them simultaneously or in any sequence. Subspaces corresponding to different measurement results are orthogonal.
Art of design: measured operators (and corresponding subspaces) should be able to diagnose errors in qubits
Measurement of any such operator π΄π΄ projects a state in the Hilbert space into one of two subspaces, corresponding to eigenvalues ππ = +1 and ππ = β1
ππ = +1 (usually measurement result 0) β projector Ξ‘0π΄π΄ = (οΏ½1 + π΄π΄)/2ππ = β1 (usually measurement result 1) β projector Ξ‘1π΄π΄ = (οΏ½1 β π΄π΄)/2
Check: Ξ‘0π΄π΄2 = βοΏ½1 + π΄π΄ 2 4 = β(οΏ½1 + οΏ½1 + 2π΄π΄) 4 = βοΏ½1 + π΄π΄ 2 = Ξ‘0π΄π΄, similar for Ξ‘1π΄π΄
If π΄π΄ ππ = +1|ππβ©, then οΏ½1+π΄π΄2
ππ = |ππβ©, while οΏ½1βπ΄π΄2
ππ = 0.
Similarly, if π΄π΄ ππ = β1|ππβ©, then οΏ½1βπ΄π΄2
ππ = |ππβ©, while οΏ½1+π΄π΄2
ππ = 0
Measurement of operators π΄π΄ππWe already discussed this previously.
π΄π΄
meas.0 π»π»π»π»0 β
0 + |1β©2
β0 +|1β©
2if ππ = +1 |0β©
0 β|1β©2
if ππ β 1 |1β©β
Formally 0 + |1β©2
ππ β0 ππ + |1β©(π΄π΄|ππβ©)
2β
|ππβ©
β(|0β© + |1β©) |ππβ© + ( 0 β |1β©)(π΄π΄ |ππβ©)
2 = 0οΏ½1 + π΄π΄
2 ππ + 1οΏ½1 β π΄π΄
2 |ππβ©
Ξ‘0π΄π΄ Ξ‘1π΄π΄measurement selects one of two terms
5-qubit code25 = 32 dimensions in Hilbert space3 Γ 5 = 15 possible errors
2 Γ 1 + 15 = 32: all dimensions should be used
Need to distinguish 16 scenarios β 4 operators π΄π΄ππ (they are usually called ππππ)
ππ0 = ππ1ππ2ππ3ππ4ππ1 = ππ2ππ3ππ4ππ0ππ2 = ππ3ππ4ππ0ππ1ππ3 = ππ4ππ0ππ1ππ2
qubit numbering: ππ = 0, 1, 2, 3, 4
ππππππππ = ππππππππ (commute) because ππππππππ = βππππππππ, and exactly two pairs of anticommuting operators
There is no ππ4 = ππ0ππ1ππ2ππ3because ππ4 = ππ0ππ1ππ2ππ3
ππππ2 = οΏ½1 for all of them because ππππ2 = ππππ2 = οΏ½1
Encoding:
0 πΏπΏ = 14οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 οΏ½1 + ππ3 00000
1 πΏπΏ = 14οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 οΏ½1 + ππ3 11111
States 0 πΏπΏ and 1 πΏπΏ are orthogonal to each other because 0 πΏπΏ is a superposition of terms with odd number of 0s and even number of 1s, while for 1 πΏπΏ it is even number of 0s and odd number of 1s (each ππππ flips 2 qubits). Possible to check that 0 πΏπΏ, 1 πΏπΏ are normalized.
5-qubit code (cont.)ππ0 = ππ1ππ2ππ3ππ4ππ1 = ππ2ππ3ππ4ππ0ππ2 = ππ3ππ4ππ0ππ1ππ3 = ππ4ππ0ππ1ππ2
0 πΏπΏ and 1 πΏπΏ are eigenstates of all ππππ with eigenvalue +1; this is because all ππππ commute and ππππ οΏ½1 + ππππ = οΏ½1 + ππππ.
0 πΏπΏ = 14οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 οΏ½1 + ππ3 00000
1 πΏπΏ = 14οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 οΏ½1 + ππ3 11111
Therefore, measurement of ππππ does not disturb superposition ππ = πΌπΌ 0 πΏπΏ + π½π½ 1 πΏπΏ (it is also an eigenvector with eigenvalue +1).
It is possible to check that if we apply ππππ (or ππππ or ππππ) to one qubit, then ππππ ππ , ππππ ππ , and ππππ ππ are also eigenvectors of all ππππ, but with different sets of eigenstates.
ππ0 ππ1 ππ2 ππ3
ππ + + + +
ππ0 ππ + β + +
ππ0 ππ + β β β
Full table:
(and all other cases)
5-qubit code: circuits Encoding
πΌπΌ 0 + π½π½|1β©πΌπΌ 0 πΏπΏ+π½π½ 1 πΏπΏ
Measurement of error syndrome
ππ0 = ππ1ππ2ππ3ππ4ππ1 = ππ2ππ3ππ4ππ0ππ2 = ππ3ππ4ππ0ππ1ππ3 = ππ4ππ0ππ1ππ2
0
000
ππ
meas.
meas.
meas.
meas. ππ0
ππ1
ππ2
ππ3
(not easy to understand)
7-qubit code (Steane)
Why do we need it? 5-qubit code is shorter! (9-qubit code is not usefulthough easy to understand)
7-qubit code is quite popular because it is good for βfault-tolerantβ QC:Several important logic operations can be done without decoding(so far we considered only βmemoryβ, it is also good for βlogicβ)
7 qubits β 1 + 3 Γ 7 = 22 scenarios β need at least 5 operators π΄π΄ππ (25 = 32)
However, this code uses 6 operators for error syndrome:
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
Up to renumbering, this is the classical Hamming code
(different notation in N-C book)
6 5 4 3 2 1 0
X X X X
X X X X
X X X X
The same combinations for ππππ and ππππ, only ππ β ππ
For all of them ππππ2 = ππππ2 = οΏ½1, so eigenvalues Β±1
All of them commute with each other ([ππππ ,ππππ] = 0 trivially, [ππππ ,ππππ] = 0 trivially, [ππππ ,ππππ] = 0 because even number of anticommuting pairs)
Since all of them commute, they divide 27-dim. Hilbert space into 26 = 64 2D subspaces
7-qubit code (cont.)ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
6 5 4 3 2 1 0X X X XX X X XX X X X
Encoding0 πΏπΏ = 1
8οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 0000000
1 πΏπΏ = 18οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 1111111
Orthogonal because 0 πΏπΏ contains terms with odd number of 0s , while even for 1 πΏπΏ
ππ = πΌπΌ 0 πΏπΏ + π½π½ 1 πΏπΏ is an eigenvector of all ππππ and ππππ with eigenvalues +1(because ππππ οΏ½1 + ππππ = οΏ½1 + ππππ, also ππππ commute with (οΏ½1 + ππππ),
and 0 7 and 1 7 are eigenstates of ππππ with eigenvalue +1)
All 21 errors and correct codeword are distinguishable (states after errors are still eigenstates of ππππ and ππππ because ππππ ,ππππ ,ππππ either commute or anticommute with ππππ and ππππ)If ππππ error occurs, then all ππππ are still +1 (because commute with ππππ), while one or two or three ππππ become β1 (easy to see). From βpatternβ, we find qubit ππ affected by error.
Similarly, if ππππ error occurs, then ππππ are still +1, but some ππππ change to β1If ππππ = ππππππππ error occurs, then both ππππ and ππππ change (the same pattern)
After detecting the error, we correct it by applying ππππ, ππππ, ππππ (or nothing)
7-qubit code (cont.)ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
6 5 4 3 2 1 0X X X XX X X XX X X X
Encoding0 πΏπΏ = 1
81 + ππ0 1 + ππ1 1 + ππ2 0000000
1 πΏπΏ = 18
1 + ππ0 1 + ππ1 1 + ππ2 1111111
Not all 26 = 64 combinations of the error syndrome are used (only 1 + 3 Γ 7 = 22).Remaining 42 combinations correspond to two-qubit errors ππππππππ (7 Γ 6 = 42); this is useful, but not quite, because errors ππππππππ, ππππππππ, etc. are not dealt with.
7-qubit code: encoding circuit
Encoding
πΌπΌ 0 + π½π½|1β© πΌπΌ 0 πΏπΏ +π½π½ 1 πΏπΏ
0 πΏπΏ = 18
1 + ππ0 1 + ππ1 1 + ππ2 0000000
1 πΏπΏ = 18
1 + ππ0 1 + ππ1 1 + ππ2 1111111
(not very easy to understand, but not very difficult either)
7-qubit code: circuit for error syndrome
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
Measurement of error syndrome
(usual idea)
000
00
0
|ππβ©
meas.
meas.
meas.
meas.
meas.
meas. ππ0ππ1
ππ2
ππ0
ππ1
ππ2
7-qubit code: direct operations on 7-qubit codewordsNow discuss why 7-qubit code is so popular: it allows some logic operations to be done directly on the encoded 7-qubit state (without decoding)
Several important gates on logic qubits are realized as tensor products of gates on physical qubits (βtransversal gatesβ, βbitwiseβ)
1. ππ-operation on logic qubit β ππβ7 on physical qubits ππππ
ππ. . . .
7
Easy to see that ππβ7 0 πΏπΏ = 1 πΏπΏ, ππβ7 1 πΏπΏ = 0 πΏπΏ (because all ππππ commute and construction of 0 πΏπΏ and 1 πΏπΏ uses only ππππ)
0 πΏπΏ = 18οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 0000000
1 πΏπΏ = 18οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 1111111
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
2. Similarly, ππ-operation on logic qubit β ππβ7 on physical qubits
To prove, we need to show that ππβ7 0 πΏπΏ = 0 πΏπΏ and ππβ7 1 πΏπΏ = β 1 πΏπΏ (then linearity)
This is because ππβ7 commutes with ππππ (4 anticommuting pairs), while ππβ7 0000000 = |0000000β© and ππβ7 1111111 = β|1111111β©
7-qubit code: transversal gates
1. ππ-operation on logic qubit β ππβ7 on physical qubits, πππΏπΏ = ππβ7
2. ππ-operation on logic qubit β ππβ7 on physical qubits, πππΏπΏ = ππβ7
3. The same for ππ-operation since ππ = ππππ (composition), πππΏπΏ = ππβ7
(Actually, the same for 5-qubit code: logic ππ, ππ, and ππ are easy to implement)
4. The same for Hadamard: π»π»πΏπΏ = π»π»β7 (not possible in 5-qubit code)
(Proof is not very short, will not discuss).
5. Most importantly, CNOT can also be implemented qubit-by-qubit
logic qubit 1
logic qubit 2
7-qubit code: transversal CNOT
logic qubit 1
logic qubit 2
ππ0 = ππ0ππ4ππ5ππ6ππ1 = ππ1ππ3ππ5ππ6ππ2 = ππ2ππ3ππ4ππ6
0 πΏπΏ = 18οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 0000000
1 πΏπΏ = 18οΏ½1 + ππ0 οΏ½1 + ππ1 οΏ½1 + ππ2 1111111
Not too hard to see why it works:
0 πΏπΏ and 1 πΏπΏ (and their superpositions) are not changed by operators ππππ (eigenvalue 1).
Therefore, if control is 0 πΏπΏ = 18οΏ½οΏ½1 + ππ0 + ππ1 + ππ2 + ππ0ππ1 + ππ0ππ2 + ππ1ππ2 +
Now, if control is 1 πΏπΏ = ππβ7 0 πΏπΏ, then extra flip of each target qubit; since any ππππ commutes with any ππππ, this is equivalent to the flip 0 πΏπΏ β 1 πΏπΏ for target.
Fault-tolerant QC
So, we can do logical operations without decoding, and error correction can be used at each step. We can correct faulty gates as well (if only one works incorrectly); this works for one-qubit gates and also for CNOT (then errors are in two blocks and can both be corrected).
These are main requirements of a βfault-tolerantβ QC
Again, 1) do logic without decoding, 2) correct faulty gates, single-qubit errors do not become multi-qubit errors.
Fault tolerance: failure of a component leads to at most one error in each encoded block
Many tricks to make each step of a QC operation fault-tolerant, including production of ancillas, measurement, gates, βwiresβ, etc.
Recently much attention to topological codes: toric code (Kitaev), surface codes, color codes, etc.
Example: Surface code for superconducting qubits
A.G. Fowler, M. Mariantoni, J.M. Martinis, and A.N. Cleland, PRA 86, 032324 (2012)
4-qubit operators measuredData qubits and ancilla qubitsOnly nearest neighbors involved
Threshold theorem
Threshold theorem: If error correction lowers error probability and everything is fault-tolerant, then concatenation makes error probability arbitrarily small.
More quantitatively, if ππ < πππ‘π‘π‘ (ππ is failure probability for a component, πππ‘π‘π‘ is a threshold), then an ideal circuit with ππ(ππ) gates can be realized with error probability < ππ by a circuit with ππ[ππππππππ logππ ππ πππ‘π‘π‘
ππππ ππ ] gates. (A big overhead is possible, but it is not exponential.)
polynomial of a fixed degree
Problem: the threshold πππ‘π‘π‘ is usually low, because we need many qubitsfor error correction, and this increases the error probability
Currently πππ‘π‘π‘ βΌ 10β6 β 10β2 for different codes (surface codes claim πππ‘π‘π‘ βΌ 10β2)
Often people crudely say πππ‘π‘π‘ βΌ 10β4
This is what makes QC potentially possible