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

Quantum Error Correction Introduction

The document discusses quantum error correction techniques for qubit flip and phase flip errors. It introduces encoding circuits to detect and correct for these errors by majority voting. A more advanced Shor code is also presented that can handle both error types simultaneously.

Uploaded by

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

Quantum Error Correction Introduction

The document discusses quantum error correction techniques for qubit flip and phase flip errors. It introduces encoding circuits to detect and correct for these errors by majority voting. A more advanced Shor code is also presented that can handle both error types simultaneously.

Uploaded by

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

Quantum Error Correction Introduction

Author: 李冠

Email: [email protected]
Abstract
In quantum commutation, one of the main issues that affects its consistency is the existing
of noise. In the following article we will mainly discuss two different kinds of errors, qubit
flip and phase flip. Both errors can be easily removed by a two steps procedure, detect and
recovered. Both can be indicated by some simple circuit added in the back of the main
circuit. We then introduce a more fundamental circuit, Shor code, which can handle both
cases in the same time. Our results work very well in the simulation basis, but not all of
them did well in the real quantum machine.

1. Introduction
Quantum computation is based on quantum mechanics, which is very sensitive to the overall environment. In classical
computation, we could reduce our noise to a pretty small number, it’s so small that the failure rates are well below one per
1017 operations. In contrast to the classical computer, the best quantum computer we have now has the failure rates around
one in a thousand operations [1]. Its quite easy to see the different between these two numbers, and its easy to see why we
still can’t rely on quantum computer for our daily lives. Our main goal here is to implement some simple circuit to solve the
issue of the noise that happens quite often in the quantum computer’s circuit.
The noises we will introduce mainly in the rest of the articles are qubit flip and phase flip errors. Both errors are really
simple, which are presented in the following equations:
𝑞𝑢𝑏𝑖𝑡 𝑓𝑙𝑖𝑝 𝑒𝑟𝑟𝑜𝑟
|Ψ⟩ = 𝛼|0⟩ + 𝛽|1⟩ → 𝛼|1⟩ + 𝛽|0⟩
𝑝ℎ𝑎𝑠𝑒 𝑓𝑙𝑖𝑝 𝑒𝑟𝑟𝑜𝑟
|Ψ⟩ = 𝛼|0⟩ + 𝛽|1⟩ → 𝛼|0⟩ − 𝛽|1⟩
The first error is just like a single qubit seems to run through a X-gate while the second error run through a Z-gate. But
there’s actually nothing on the circuit except of the original gates, they were affected by noises occur on the quantum circuit.
We will introduce our tactics to both errors in the latter part of the article, first I will introduce the real quantum machine and
the simulator we used provided by the IBM. The quantum machine is tag as “IBM_osaka” in the IBM quantum platform, it
has a total of one hundred twenty-seven qubits. The error per layered gate for a hundred qubits chain is 2.8%. Its median
readout error is 2.050 ∙ 10−2 and its median ECR error is 1.121 ∙ 10−2 . The simulator we are using is the “simulator_mps”, it
has a total of hundred qubits available, and the randomness is determined by the seed we randomly choose to submit before
the operation occur. For overall consistency, the seed we choose and the machine we select are all the same during the whole
experiment. We also used the “IBM Brisbane” as an additional machine to give additional results of our experience with a
different error rate, which is 1.9% error per layered gate for a hundred qubit chain [2].
Since the goal of ours was to develop a working system for errors occur during the processes of quantum circuit. We
artificially use a spun qubit’s measurement for deciding whether should the qubit flip or not. The design of the artificial error
generator is shown as below.
First, we give the qubit remain in the state |0⟩ a rotation. Then we forced the qubit to collapse on to a |0⟩ state or a |1⟩ state.
If the state collapse to |1⟩, then the controlled gate will be activated. The first controlled gate provided a X-gate, which
represent the qubit flip error. The second controlled gate provided a Z-gate, which represent the phase flip error. The error
percentage is controlled by the amount of the rotation. We wish to controlled our artificial error to give out 1,3, and 10% of
error probability. The correspond amount of rotation is 0.0635𝜋, 0.1102𝜋, and 0.204𝜋.

2. Problem and Methodology


2.1 Qubit flip error
The main problem here is to decide whether the qubit we wished to transfer gets a flip or not. So just as our daily life, if the
message one received isn’t clear enough, we often would ask the talker to speak the message again. It’s the same in quantum
computation, we encode the original message to a three qubits state. This procedure is called encode. The circuit and the
actual state’s evolution are shown as below:

𝑓𝑖𝑟𝑠𝑡 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 𝑔𝑎𝑡𝑒 𝑠𝑒𝑐𝑜𝑛𝑑 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 𝑔𝑎𝑡𝑒


(𝛼|0⟩ + 𝛽|1⟩)|0⟩|0⟩ → (𝛼|0⟩|0⟩ + 𝛽|1⟩|1⟩)|0⟩ → (𝛼|0⟩|0⟩|0⟩ + 𝛽|1⟩|1⟩|1⟩)
Which can be simply seen as changing the |0⟩ and |1⟩ state into the correspond |000⟩ and |111⟩ state. We now first only
consider error cause by a qubit flip, which will happen in 𝑝 probability. The states evolve through the circuit and reveal at the
end can be written as a probability distribution:

States Probability
𝛼|000⟩ + 𝛽|111⟩ (1 − 𝑝)3
𝛼|100⟩ + 𝛽|011⟩ 𝑝(1 − 𝑝)2
𝛼|010⟩ + 𝛽|101⟩ 𝑝(1 − 𝑝)2
𝛼|001⟩ + 𝛽|110⟩ 𝑝(1 − 𝑝)2
𝛼|110⟩ + 𝛽|001⟩ 𝑝2 (1 − 𝑝)
𝛼|101⟩ + 𝛽|010⟩ 𝑝2 (1 − 𝑝)
𝛼|011⟩ + 𝛽|100⟩ 𝑝2 (1 − 𝑝)
𝛼|111⟩ + 𝛽|000⟩ 𝑝3
If we now assume the error probability is low enough that we only consider one qubit flip, we can use the three qubits as a
vote for the correct original state. As for an original state occur only in |0⟩ or |1⟩, we could just measure the outcome of three
qubits, and chose the majority of the measurement as the original qubit, this is called majority voting. (Note, we could still
get the wrong answer with a very low probability, in contrast with the correct one, we just simply accept that we could ignore
the higher order term of 𝑝.)
Now for the original qubit in 𝛼|0⟩ + 𝛽|1⟩ state, we will have to develop a procedure for detecting the state without really
destroy the superposition state of it. (Since a measurement in quantum mechanics would simply collapse the state in to the
measurement basis’s eigen state.) Just as the voting method we mention earlier, the circuit’s concept is quite similar to that
one. The circuit and the evolution of state is shown as below:

After flip Gate1 Gate2 Gate3 Probability


𝛼|000⟩ + 𝛽|111⟩ 𝛼|000⟩ + 𝛽|101⟩ 𝛼|000⟩ + 𝛽|100⟩ 𝛼|000⟩ + 𝛽|100⟩ (1 − 𝑝)3
𝛼|100⟩ + 𝛽|011⟩ 𝛼|110⟩ + 𝛽|011⟩ 𝛼|111⟩ + 𝛽|011⟩ 𝛼|011⟩ + 𝛽|111⟩ 𝑝(1 − 𝑝)2
𝛼|010⟩ + 𝛽|101⟩ 𝛼|010⟩ + 𝛽|111⟩ 𝛼|010⟩ + 𝛽|110⟩ 𝛼|010⟩ + 𝛽|110⟩ 𝑝(1 − 𝑝)2
𝛼|001⟩ + 𝛽|110⟩ 𝛼|001⟩ + 𝛽|100⟩ 𝛼|001⟩ + 𝛽|101⟩ 𝛼|001⟩ + 𝛽|101⟩ 𝑝(1 − 𝑝)2
𝛼|110⟩ + 𝛽|001⟩ 𝛼|100⟩ + 𝛽|001⟩ 𝛼|101⟩ + 𝛽|001⟩ 𝛼|101⟩ + 𝛽|001⟩ 𝑝2 (1 − 𝑝)
𝛼|101⟩ + 𝛽|010⟩ 𝛼|111⟩ + 𝛽|010⟩ 𝛼|110⟩ + 𝛽|010⟩ 𝛼|110⟩ + 𝛽|010⟩ 𝑝2 (1 − 𝑝)
𝛼|011⟩ + 𝛽|100⟩ 𝛼|011⟩ + 𝛽|110⟩ 𝛼|011⟩ + 𝛽|111⟩ 𝛼|111⟩ + 𝛽|011⟩ 𝑝2 (1 − 𝑝)
𝛼|111⟩ + 𝛽|000⟩ 𝛼|101⟩ + 𝛽|000⟩ 𝛼|100⟩ + 𝛽|000⟩ 𝛼|100⟩ + 𝛽|000⟩ 𝑝3
We could see the final states in the gate 3 column. As we wish, the first qubit for the first four state eventually get transform
back in to the 𝛼|0⟩ + 𝛽|1⟩ state. The rest of the four were the states that get two or three qubit-flips at once, so the vote
would choose the result that is opposite to the original, 𝛼|1⟩ + 𝛽|0⟩.
2.2 Phase flip error
We could start to tackle the phase flip error. It’s quite similar to the one we just discuss before. Imagine a state starting,
|0⟩ + |1⟩, now apply a phase flip error to it, |0⟩ − |1⟩. It’s obvious that the state change from |+⟩ in the X-basis to the |–⟩ in
the X-basis. Hence, all that we have to do is to repeat the procedure before but this time in the X-basis, we simply added a
Hadamard gate in the back of the encode procedure.
2.3 Shor code
In general, we could combine the two tactics above to fix both of the errors. The circuit is called, Shor code. The circuit is
shown as below (left is the encoding part, right is the error correction part.):

𝑒𝑛𝑐𝑜𝑑𝑒 (|000⟩ + |111⟩)(|000⟩ + |111⟩)(|000⟩ + |111⟩)


|0⟩ →
2√2
𝑒𝑛𝑐𝑜𝑑𝑒 (|000⟩ − |111⟩)(|000⟩ − |111⟩)(|000⟩ − |111⟩)
|1⟩ →
2√2
2.4 Fidelity

We could first check the probability of getting the wrong answer in qibit flip error. Without correction, it’s simply just 𝑝.
And according to the graph from before, with correction, the probability of getting the wrong answer is 3(1 − 𝑝)𝑝2 + 𝑝3 .
1
We now compare the two probability and differentiate it. We need 𝑝 ≤ for the whole correction be worth doing.
2

Now we use fidelity to determine the appropiate probability worth doing the correction. We measure the degree of
information retaintion between the initial and final state. The fidelity’s equation is shown as follow, 𝜌 is the density matrix
of the final state:

𝐹(|𝜓⟩, 𝜌) = √⟨𝜓|𝜌|𝜓⟩

Take qubit flip as an example, without correction, the final state’s density matrix and its fidelity could be written as:
𝜌 = (1 − 𝑝)|𝜓⟩ ⟨𝜓| + 𝑝𝑋|𝜓⟩ ⟨𝜓|𝑋

𝐹(|𝜓⟩, 𝜌) = √1 − 𝑝
As for the final state with correction:
𝜌 = ((1 − 𝑝)3 + 3𝑝(1 − 𝑝)2 )|𝜓⟩ ⟨𝜓| + (3𝑝2 (1 − 𝑝) + 𝑝3 )𝑋|𝜓⟩ ⟨𝜓|𝑋

𝐹 (|𝜓⟩, 𝜌) ≥ √(1 − 𝑝)3 + 3𝑝(1 − 𝑝)2

So according to the definition of fidelity, the closer the number is to 1, the accuracy of the transport state will be higher. The
1
result is just the same as the previous paragraph said, 𝑝 ≤ in order for the correction’s fidelity gets higher than the one qubit
2
situation without correction.
The situation is similar for qubit flip and phase flip. Now we can use the similar procedure above and get the probability of
error needed for the Shor code, which turns one qubit into nines. In this scheme, we could write:
𝜌 ≈ (1 − 𝑝)9 |𝜓⟩ ⟨𝜓| + 9𝑝(1 − 𝑝)8 𝐸|𝜓⟩ ⟨𝜓|𝐸

𝑝 ≤ 3.23%

3. Result and Analysis


3.1 Result of qubit flip error
We apply both simulator and real quantum machine with our artificial noise generator and the error correction circuit. The
noises we apply are 3 and 10 percent quantum flip error. The simulation result of the probability to acquire the original state
is shown below:

Noise probability Without correction With correction Difference


3% 0.9648 0.9980 +0.0332
10% 0.9033 0.9775 +0.0742
For ideal condition, if the error is given by 3%, the correction code gives a 3% accuracy improvement. If the error is 10%, the
correction gives an additional 7% accuracy. So overall we could say that the code worked, at least under idealize condition.
Now we implement our code onto a real quantum computer. The results are shown below:

Noise probability Without correction With correction Difference


3% 0.9729 0.9903 +0.0174
10% 0.9039 0.9592 +0.0553
It’s still quite obvious that the correction code work, but this time, it doesn’t work as well as the simulation. The overall
accuracy improvement decay about 2%. This is because real quantum machine has not only the artificial noises we added in,
it also would receive the environment’s interference (the actual noise). Which give out additional uncertainty to our results.
And in addition, the correction code means that the overall time the qubit stays in the circuit and the overall number of gates
the qubit would encounter becomes more and more. But overall, an improve in the result means that the error correction
circuit would work even in the real cases for qubit flip.
3.2 Results of phase flip error
We also apply the noises in 3 and 10 percent for our phase flip error in both simulator and real quantum machine. The circuit
we used is almost exactly the same except for the additional Hadamard gate in both ends. The final results of the simulation
are listed below:
Noise probability Without correction With correction Difference
3% 0.9746 0.9980 +0.0234
10% 0.8984 0.9736 +0.0752
The performance is similar to the previous one, and the result is quite predictable since they are almost identical.
We now look at the real quantum machine’s results:

Noise probability Without correction With correction Difference


3% 0.9569 0.9540 -0.0029
10% 0.8993 0.9196 +0.0203
Immediately we can tell that the correction failed for the 3% error, this might be the fault of the extra gates occur in the phase
flip error correction code. Together with the actual noise make the accuracy couldn’t follow up to the single qubit noise
condition. So, without the correction, it will actually remain a higher accuracy then adding two more qubits and bunch of
gates to correct the state. For the 10% noise condition, the one qubit state’s 10% noise is smaller than the add up noises from
gates and runtime, the error correction code work well here, receive a 2% boost to the accuracy.
3.3 Shor code
For convenience, we didn’t change the formation of our noise generator. For every qubit there will be two different kinds of
noise generators. One for qubit flip and the other for phase flip. The overall state without error would be(1 − 𝑝)(1 − 𝑝). We
first tested three different 𝑝, 1%,3% and 10%, in the simulator. Results shown below:

Noise probability Without correction With correction Difference


1% 0.9805 0.9990 +0.0185
3% 0.9727 0.9844 +0.0117
10% 0.9004 0.8516 -0.0488
This time even the simulator can’t get an improvement with the correction code. This can be predicted by the fidelity test we
mentioned earlier. The probability of errors can only be smaller than 3.2%, otherwise the original one qubit state is better that
the correction code. The noise probability 3% is also slightly greater than 3.2% (the actual error is 1 − (1 − 𝑝)2 ), but since
everything is base on probability. The simulation result we got here is probably just a lucky result.
For the real machine part, we first use ibm_osaka to be the testing quantum computer. The result is shown below:

Noise probability Without correction With correction Difference


1% 0.9818 0.4860 -0.4958
3% 0.9675 0.4772 -0.4903
10% 0.9085 0.4929 -0.4156
The results are devastating. The runs with correction code are basically given out random results. This must be that the
artificial error adding with the machine’s error leads to a huge amount of accumulate errors. The error rate would pile up
through the whole unnecessary part of the circuit, and ended up being random at the end. To avoid the unnecessary errors, we
first try to change our quantum computer to ibm_brisbane, which has a better error rate. The results are:
Noise probability With correction
1% 0.5107
3% 0.5164
10% 0.4716
Still, it’s easy to see that the result is, again, a disaster. We then try to lower the artificial error rate to 0.1%,0.01%. etc. It
doesn’t seem to work at all. At last, we simply remove the artificial noise, but still keep the correction code. This time we get
the result of accuracy 0.9036. This tells us that even a 10% artificial error in a single qubit circuit would be better than the
correction code without any artificial error. Which could mean that the additional gates and runtime had already reach the
limit of 3.2% of Shor code error correction.

You might also like