Quantum Error Correction Jian-Wei Pan Lecture Note 9.

45
Quantum Error Quantum Error Correction Correction Jian-Wei Pan Lecture Note 9

Transcript of Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Page 1: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Quantum Error Quantum Error CorrectionCorrection

Jian-Wei Pan

Lecture Note 9

Page 2: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Errors CorrectionErrors Correction• PROBLEMPROBLEM: When computing with a

quantum computer, you can’t look at what the computer is doingYou 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

Page 3: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Classical ErrorsClassical 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:

0 1

1 0

Page 4: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Classical Error Correcting Codes 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

Page 5: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Reversible networks for encoding and Reversible networks for encoding and decoding a single bit decoding a single bit ““bb””

00

b bbb

00

b bbb

Network for encoding

Network for decoding

Page 6: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Classical Error Correcting Codes 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:

31 P

23 1P P

23 1P P

3P

Page 7: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Classical Error Correcting Codes 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

000100

000010

000001

000000

111110

111101

111011

111111

3 2 2 31 3 1 1 3 2cP P P P P P

Page 8: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Correction for a long time 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/NAfter the time t

2 3

2

1 3 2

1 3

N

ct

ct

ct ctP

N N

P when N ct

P c

Zeno Zeno effect!effect!

Page 9: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• 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 Quantum Errors

Page 10: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Example of 3-qubit Error CorrectionExample of 3-qubit Error Correction

• A 3-bit quantum error correction scheme uses an encoder and a decoder circuit as shown below:

EncoderEncoder DecoderDecoder0

0

Input qubit Output qubit

OperationsOperations& Errors& Errors

We will distinguish among good states 0 and 1 and all other states

As we see one qubit is encoded to three qubits

Page 11: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

3-qubit Error Correction: 3-qubit Error Correction: the Encoderthe Encoder

• The encoder will entangle the two redundant qubits with the input qubit:

a|0> + b|1>

|0>

|0>

1.1. If the input If the input state is |0> then state is |0> then the encoder does nothing sothe encoder does nothing so the output state is |000>the output state is |000>

2.2. If the input If the input state is |1> then state is |1> then the encoder flips the lowerthe encoder flips the lower states so the output state isstates so the output state is |111>|111>

33. If the input. If the input is is an superposition statean superposition state, , thenthen the output the outputis the is the entangled stateentangled state a|000> + b|111> a|000> + b|111>

Page 12: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• 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 decoderIf the input to the decoder is |000> or |111> is |000> or |111> there wasthere wasno errorno error so the output of the decoder is: so the output of the decoder is:

Input OutputInput Output|000> |000>|000> |000>|111> |100> (the top 1 causes the bottom bits to flip) |111> |100> (the top 1 causes the bottom bits to flip)

Error free flag

3-qubit Error Correction: 3-qubit Error Correction: the Decoderthe Decoder

Page 13: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Example continued:Example continued:Consider all the possible error conditions:Consider all the possible error conditions:

No Errors:No Errors:

a|000> + b|111> decoded to a|000> + b|100> = (a|0> + b|1>)|00>

Top qubit flipped: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:Middle qubit flipped:

a|010> + b|101> decoded to a|010> + b|110> = (a|0> + b|1>)|10>

Bottom qubit flipped:Bottom qubit flipped:

a|001> + b|110> decoded to a|001> + b|101> = (a|0> + b|1>)|01>

Page 14: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Decoder without MeasurementDecoder without Measurement

• The prior decoder circuit requires the measurement of the two extra bits and a possible flip of the top bitBoth these operations can be implemented

automatically using a Toffoli gate

If these are both 1then flip the top bit

}

Thus we can correct single bit-flip errors

Page 15: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

The ErrorsThe Errors

Page 16: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Phase-shift Error CorrectionPhase-shift Error Correction

HH

HH

HH

a|0> + b|1>

|0>

|0>

0 1 0 1 0 1

0 1 0 1 0 1

EncodingEncoding

HH

HH

HH

Hadamards Gate

10 0 1

21

1 0 12

DecodingDecodingCorrected output

Measure: if 11 shift the phase ofthe top qubit

}

Page 17: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• The 2 codes earlier corrects either bit flips or or phase flips.

• Shor’s 9 qubits error correcting code combines both codes.

• It can correct any arbitrary single qubit error yzx ,,

Shor’s 9 Qubits Error Correcting Shor’s 9 Qubits Error Correcting CodeCode

Page 18: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

A full Error Correction CodeA full Error Correction Code

3

3

000 1110 0

2

000 1111 1

2

L

L

Page 19: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

encodeencoderr

decodedecoderr

Architecture of Shor CodeArchitecture of Shor Code

Page 20: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

A more efficient CodeA more efficient Code

Page 21: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Can it be more efficient?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?

zyx , ,

How to calculate this number?

Page 22: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

How to use syndrome bits to How to use syndrome bits to calculate the minimum lengthcalculate 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 2n-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.

1213 nn

Pauli rotations

Page 23: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Encoding

• Use 5 qubits to encode 1 qubit :

10 00000 01111 10011 11100

8

00110 01001 10101 11010

encode

11 11111 10000 01100 00011

8

11001 10110 01010 00101

encode

Page 24: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

From above, we calculate:

• Encoding circuitEncoding circuit

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

1 2 3 4 5 1 2 3 4

0 1 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 11 1 0 08

0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 11 0 1 0

11 1 1 1 1 0 0 08

encode

5 1 2 3 4 5 1 2 3 4 5

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

0 0 1 1 0 0 0 0 0 1 1

11 0 0 1 1 0 11 0 0 1 0 1 0 0 0 1 0 1

Shift phase

Page 25: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

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

Page 26: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Signal after Hadamards:

Encoding circuit

Hadamards

Page 27: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

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”

Page 28: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

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

Page 29: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Step-by-step analysis of the encoding circuit

Shifting phase in data bit when bits 4 and 5 are “1”

Page 30: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• 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 circuitThis is the decoding circuit

Page 31: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Example: Error is phase and bit flip on 3Example: Error is phase and bit flip on 3rdrd qubitqubit

• Assume encoded qubit damaged such that:

Page 32: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Continuation of error analysis in decoderContinuation of error analysis in decoder

10000011100100110111

111000001000101110118

01111100011011001000

000111110111010001008

54321543215432154321

54321543215432154321

54321543215432154321

54321543215432154321

10000011100100110111

111000001000101110118

01111100011011001000

000111110111010001008

54321543215432154321

54321543215432154321

54321543215432154321

54321543215432154321

Phase and bit flip on 3rd qubit

Shift phase when bits 4 and 5 are “1”

Page 33: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Flipping bit 3 when bit 4 is “1” and flipping bit 5 when bit 2 is “1”

10000110100110100111

110001001000101011118

11011100010011001100

100111100101110001008

54321543215432154321

54321543215432154321

54321543215432154321

54321543215432154321

10000110101100110011

110001001010001110118

11111101011011011100

101111110111110101008

54321543215432154321

54321543215432154321

54321543215432154321

54321543215432154321

Continuation of error analysis in decoderContinuation 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”

Page 34: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

10000110101100110011

110001001010001110118

11111101011011011100

101111110111110101008

54321543215432154321

54321543215432154321

54321543215432154321

54321543215432154321

Continuation of error analysis in decoderContinuation of error analysis in decoder

Shifting phase on bit 5 when 2,3,4 are “1”

Page 35: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• Re-express equation to prepare for Hadamard transform:

12

1001

2

10

2

10

2

110101

2

10

2

10

0010112

11110122

10

2

10

00011011001110014

110101111111010142

10

10000110101100110011

110001001010001110118

11111101011011011100

101111110111110101008

54321543215432154321

54321543215432154321

54321543215432154321

54321543215432154321

Continuation of error analysis in decoderContinuation of error analysis in decoder

This is on inputs to Hadamards

Page 36: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• Qubits 1,2,4 and 5 are the syndrome bits which indicate the exact error that occurred and the current state of qubit 3.

544

332211 1

2

1001

2

10

2

10

543321 100111

Continuation of error analysis in decoderContinuation of error analysis in decoder

This syndrome on bits 1,2,4,5 will be now used to modify the bit 3

Page 37: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• BBnn denotes a denotes a bit-flipbit-flip on on NNth th qubitqubit

• SSnn denotes a denotes a phase-shiftphase-shift on on NNth th

qubitqubit

• BSBSn n denotes a denotes a bit-flip and a bit-flip and a phase-phase-

shiftshift on on NNth qubitth qubit

Syndromes Syndromes TableTable

From previous slide

Page 38: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Execution of correction based on syndromesExecution of correction based on syndromes

• According to syndrome table, the 3rd qubit is in state .

• So apply a phase shift and a bit flip to obtain the protected qubit .

544

332211 1

2

1001

2

10

2

10

543321 100111

1101 BS3 01

01

10

Page 39: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

The 5 qubits error correcting circuitThe 5 qubits error correcting circuit

Before transmission

After transmission

Page 40: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

Concatenated CodeConcatenated 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.

Page 41: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• Illustration:We will use the 5 qubit encoding.Assume probability of single qubit error is e and

that errors are uncorrelated.

Example of Concatenated CodeExample of Concatenated Code

Page 42: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• For 2 levels, number of qubits required is 52 = 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 = (e2)2 = e4

• e4 < e2. 2 levels encoding has better probability of error recovery than 1 level if e is small enough

Example of Concatenated CodeExample of Concatenated Code

Page 43: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• For 3 levels, number of qubits required is 53 = 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 = (e4)2 = e8

• e8 < e4. 3 levels encoding has better better probabilityprobability of error recovery than 2 levels if e is small enough.

Example of Concatenated CodeExample of Concatenated Code

Page 44: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• In general for L levels,Number of qubits required is 5L

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.

L

e2

Example of Concatenated CodeExample of Concatenated Code

Page 45: Quantum Error Correction Jian-Wei Pan Lecture Note 9.

• 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 CodeConcatenated Code