24.2 Shor code 503
is actually errored (or flipped), we may perform as many successive measurements as
required to reach an unambiguous error diagnostic. The nice feature of the approach is
that these projective measurements do not alter the codeword, i.e., they leave it in the
same post-measurement state! In the 3-qubit coding example, let us see that it merely
suffices to perform two such measurements in a row. Indeed, assume we obtain the two
measurements Z
12
and Z
13
.IfZ
12
=Z
13
=1, there is no error and, therefore, no
action is required. If Z
12
=1 and Z
13
=−1, we have detected an error on the third
qubit and, therefore, the corrective action is to flip it. We may reach the same conclusion
for the measurement pair Z
12
, Z
23
or Z
13
, Z
23
. Thus, any arbitrary choice of only
two successive measurements of this type altogether yields 2
2
= 4 possible syndrome
diagnostics, covering all patterns from zero error to one single error concerning any of
the three qubits. The result is the same as using the measurement set P
i=1,2,3,4
, except
that only two projection operators instead of four have been used. In any case, it is
important to recall that the output codeword |q
and the post-measurement states P
i
|q
or Z
ij
|q
are identical.
It is now only a straightforward technical matter to describe how the Z
ij
projectors
defined in Eq. (24.19) can be realized. We recall from Chapter 16 the Z-gate, also
referred to as the σ
3
or σ
z
Pauli matrix, whose action is to introduce a π phase flip
between the qubit amplitudes (see Table 16.2). It is left as an easy exercise to show that
the measurement projector Z
ij
, as defined in Eq. (24.19), in fact summarizes into the
simultaneous application of Z onto the qubits i and j in the codeword to be analyzed.
Namely,
Z
12
= Z ⊗ Z ⊗ I ≡ Z
⊗2
⊗ I
Z
23
= I ⊗ Z ⊗ Z ≡ I ⊗ Z
⊗2
Z
13
= Z ⊗ I ⊗ Z .
(24.20)
We may write the above definitions in the compact form: Z
12
≡ Z
1
Z
2
I
3
≡ Z
1
Z
2
, Z
23
≡
I
1
Z
2
Z
3
≡ Z
2
Z
3
, and Z
13
≡ Z
1
I
2
Z
3
≡ Z
1
Z
3
, with the indices in the right-hand side
referring to the action of the operator onto the corresponding qubits, and with the
identity matrix applying to the remaining qubit being overlooked.
24.2 Shor code
In this section, I describe the Shor code, a QECC that concatenates the features of the
bit-flip and phase-flip repetition codes, as implemented with 9-qubit codewords. The
nice feature of the Shor code is that it can correct any single bit-flip or phase-flip error,
and as a matter of fact, any error, as will be established. The encoding principle proceeds
as follows. First, consider the 3-qubit phase-flip repetition code. The quantum circuit is
the same as shown in Fig. 24.3, with the last wire removed. As we have seen earlier, this
code performs the following transformation:
|0→|
ˆ
0=
|
+++
|1→|
ˆ
1=
|
−−−
.
(24.21)