 # Quantum Error Correction Jian-Wei Pan Lecture Note 9.

## Presentation on theme: "Quantum Error Correction Jian-Wei Pan Lecture Note 9."— Presentation transcript:

Quantum Error Correction Jian-Wei Pan Lecture Note 9

Errors Correction PROBLEMPROBLEM: When computing with a quantum computer, you can’t look at what the computer is doing  You are only allowed to look at the end RESULTRESULT: What happens if an error is introduced during calculation? SOLUTIONSOLUTION: We need some sort of quantum error detection/correction procedure

Classical Errors Goal: store an unknown single bit for a time t. Errors: in a time interval τ one error occurs with the probability P τ.  The probability that the bit flips:

Classical Error Correcting Codes Suppose errors in our physical system for storing 0 and 1 cause each physical bit to be flipped independently with the probability P τ We can correct the errors by using a “redundant coding” e.g. : encode a logical 0 with the state 000 and a logical 1 with the state 111

Reversible networks for encoding and decoding a single bit “ b ” Network for encoding Network for decoding

Classical Error Correcting Codes After the errors occur Probability of no errors: Probability of error in one bit: Probability of error in two bits: Probability of error in three bits:

Classical Error Correcting Codes Decode the logical bits by taking the majority answer of the three bits and correct the encoded bits So We will have the correct state with a probability

Correction for a long time Goal: keep the state for a very long time t Perform many measurements  Consider for time τ sufficiently short  Divide t in N intervals of duration τ ＝ t/N  After the time t Zeno effect!

Measurement of error destroys superpositions. No-cloning theorem prevents repetition. Must correct multiple types of errors (e.g., bit flip and phase errors). Quantum Errors

Example of 3-qubit Error Correction A 3-bit quantum error correction scheme uses an encoder and a decoder circuit as shown below: Encoder Decoder 0 0 Input qubit Output qubit Operations & Errors We will distinguish among good states 0 and 1 and all other states As we see one qubit is encoded to three qubits

3-qubit Error Correction: the Encoder The encoder will entangle the two redundant qubits with the input qubit: a|0> + b|1> |0> 1. If the input state is |0> then the encoder does nothing so the encoder does nothing so the output state is |000> the output state is |000> 2. If the input state is |1> then the encoder flips the lower the encoder flips the lower states so the output state is states so the output state is |111> |111> 3. If the input is an superposition state, then the output is the entangled state a|000> + b|111>

Problem: Any correction must be done without looking at the output  The decoder looks just like the encoder: Corrected output Measure: if 11 flip the top qubit } If the input to the decoder is |000> or |111> there was no error so the output of the decoder is: Input Output |000> |000> |111> |100> (the top 1 causes the bottom bits to flip) Error free flag 3-qubit Error Correction: the Decoder

Example continued: Consider all the possible error conditions: No Errors: a|000> + b|111> decoded to a|000> + b|100> = (a|0> + b|1>)|00> Top qubit flipped: a|100> + b|011> decoded to a|111> + b|011> = (a|1> + b|0>)|11> So, flip the top qubit = (a|0> + b|1>)|11> Middle qubit flipped: a|010> + b|101> decoded to a|010> + b|110> = (a|0> + b|1>)|10> Bottom qubit flipped: a|001> + b|110> decoded to a|001> + b|101> = (a|0> + b|1>)|01>

Decoder without Measurement The prior decoder circuit requires the measurement of the two extra bits and a possible flip of the top bit  Both these operations can be implemented automatically using a Toffoli gate If these are both 1 then flip the top bit } Thus we can correct single bit-flip errors

The Errors

Phase-shift Error Correction H H H a|0> + b|1> |0> Encoding H H H Hadamards Gate Decoding Corrected output Measure: if 11 shift the phase of the top qubit }

orThe 2 codes earlier corrects either bit flips or phase flips. Shor’s 9 qubits error correcting code combines both codes. It can correct any arbitrary single qubit error Shor’s 9 Qubits Error Correcting Code

A full Error Correction Code

encoder decoder Architecture of Shor Code

A more efficient Code

Can it be more efficient? Shor’s code uses 9 qubits to encode 1 qubit, but more efficient codes exist. Given our error model where errors can be any of the Pauli matrices applied to any qubit. To recover from 1 qubit errors, what is the minimum number to encode 1 qubit? How to calculate this number?

How to use syndrome bits to calculate the minimum length Argument:  Supposing we encode 1 qubit using n qubits.  We can have n-1 syndrome bits, the values of which tells us the exact error that occurred. Hence 2 n-1 errors can be represented by the syndrome bits  We have n qubits, and so 3n possible errors. Consider also the case of no errors.  Hence,  Least value of n solving this is 5. Pauli rotations

Encoding Use 5 qubits to encode 1 qubit :  

From above, we calculate: Encoding circuitEncoding circuit Shift phase

Rules of shifting phase and flip bit If qubits 2,3 and 4 are ‘1’, shift the phase If qubits 2 and 4 is ‘0’ and qubit 3 is ‘1’, shift the phase If qubit 1 is ‘1’, flip qubits 3 and 5

Step-by-step analysis of the encoding circuit Shifting phase when 2,3,4 are “1” Shifting phase when 2,4 are “0” and 3 is “1”

Step-by-step analysis of the encoding circuit Flipping bits 5 when bit 3 is “1” and then flipping bit 3 and 5 when bit 1 is “1” Flipping bits 3 and 5 with “1” in bits 2 and 4

Step-by-step analysis of the encoding circuit Shifting phase in data bit when bits 4 and 5 are “1”

Assuming at most 1 qubit error and the error is just as likely to affect any qubit. The decoding circuit is the encoding circuit in reverse: Step-by-step analysis of the decoding circuit This is the decoding circuit

Example: Error is phase and bit flip on 3 rd qubit Assume encoded qubit damaged such that:

Continuation of error analysis in decoder Phase and bit flip on 3 rd qubit Shift phase when bits 4 and 5 are “1”

Flipping bit 3 when bit 4 is “1” and flipping bit 5 when bit 2 is “1” Continuation of error analysis in decoder Flipping bits 3 and 5 when bit 1 is “1” and then flipping bit 5 when bit 3 is “1”

Continuation of error analysis in decoder Shifting phase on bit 5 when 2,3,4 are “1”

Re-express equation to prepare for Hadamard transform: Continuation of error analysis in decoder This is on inputs to Hadamards

Qubits 1,2,4 and 5 are the syndrome bits which indicate the exact error that occurred and the current state of qubit 3. Continuation of error analysis in decoder This syndrome on bits 1,2,4,5 will be now used to modify the bit 3

B n denotes a bit-flip on Nth qubit B n denotes a bit-flip on Nth qubit S n denotes a phase-shift on Nth S n denotes a phase-shift on Nth qubit qubit BS n denotes a bit-flip and a phase- BS n denotes a bit-flip and a phase- shift on Nth qubit shift on Nth qubit Syndromes Table From previous slide

Execution of correction based on syndromes According to syndrome table, the 3 rd qubit is in state. So apply a phase shift and a bit flip to obtain the protected qubit.

The 5 qubits error correcting circuit Before transmission After transmission

Concatenated Code 1 qubit can be encoded using 5 qubits. Each of the 5 qubits can be further encoded using 5 qubits. Continue doing this until some number of hierarchical levels is reached.

Illustration:  We will use the 5 qubit encoding.  Assume probability of single qubit error is e and that errors are uncorrelated. Example of Concatenated Code

For 2 levels, number of qubits required is 5 2 = 25 This encoding will fail when 2 or more sub blocks of 5 qubits cannot recover from errors. Hence probability of recovery failure is in order of = (e 2 ) 2 = e 4 e 4 < e 2. 2 levels encoding has better probability of error recovery than 1 level if e is small enough Example of Concatenated Code

For 3 levels, number of qubits required is 5 3 = 125 This encoding will fail when 2 or more sub blocks of 25 qubits cannot recover from errors. Hence probability of recovery failure is in order of = (e 4 ) 2 = e 8 better probabilitye 8 < e 4. 3 levels encoding has better probability of error recovery than 2 levels if e is small enough. Example of Concatenated Code

In general for L levels,  Number of qubits required is 5 L  Probability of recovery failure is in the order of Advantages of concatenated code:  If probability of individual qubit error, e, is pushed below a certain threshold value, adding more levels will reduce probability of recovery failure.  i.e. we can increase the accuracy of our encoding indefinitely by adding more levels.  Error correction is simple using a divide and conquer strategy. Example of Concatenated Code

Disadvantages of concatenated coding:  If probability of individual qubit error, e, is above the threshold value, adding more levels will make things worse.( i.e. probability of recovery failure will be higher)  Exponential number of qubits needed. Note:  Threshold value depends on Type of encoding used Types of errors that occurs. When the errors are likely to occur (during qubit storage, or gate processing) Concatenated Code Concatenated Code