s achieved by appending an n-qubit ancilla |0) to the recipient's codeword |x*) = |x + ex), and passing the result through a quantum circuit that achieves the transformation /x*) |0) |x*)|Hx*). Recall from Chapter 11 that if x is a codeword, then Hx = 0, and hence |Hx*) = |(x + ex)) = |Hex). Measuring each of the qubits in the ancilla |Hex) yields the syndrome vector Hex and, hence, the full error diagnosis ex, which is common to each of the series terms in Eq. (24.38). The ancilla can then be discarded and each of the errored qubits can be corrected (or back flipped) by applying X gates in the corresponding circuit wires, to obtain the X-corrected state (24.39) quantum circuit performing the operation |z>|0) |Uz) for any nxn matrix U (here with U = and |z) = |(x +C2)*)) can be realized by exclusively using CCNOT (controlled-CNOT) gates, as illustrated in Fig. 24.5. The design concept of such a circuit can be grasped by analyzing the basic functionality |z) -> |Uz) with U where we used the (equivalent) bit-wise addition properties x = 0 and x' = -x'. The same result obtained with the assumption x +x' E C2. It shows that the cosets x + C2 and x' + C2 have two elements in common, which necessarily implies that hence, |x+C2Y = |x' + C2>. Quantum error correction U21Z1+U22ZZ Figure 24.5 Quantum circuit to achieve the transformation |z) |0) |z) |Uz), given an n-qubit |z) and an n X n matrix U with binary coefficients. being a 2 X 2 matrix with binary coefficients, which is left as an interesting exercise. The figure actually shows that the binary coefficients Uij = 0, 1 of U can be directly used as corresponding ancilla qubits |Uij) = |0),|1), with the input state of the circuit being /z) |1) u2n) /Un1...Unn). After discarding the useless (or "garbage") computation qubits, the circuit output is indeed |z) |Uz). To summarize, we have shown that the CSS(C1, C2) code can correct all t errors of the X type, as allowed by the C1 linear block code, and the syndromes Hex) and Hex, can be generated through a basic quantum cir