 the principle of majority logic. (X123456) A E (X456789)BC Corrective action Flip phase in block C Flip phase in block A Flip phase in block B In the Shor code, syndrome diagnosis and error correction works in a way conceptually similar to that in the bit-flip and phase-flip repetition codes described in the previous section, except that here we want to identify and correct both types of error. The task appears a bit tedious because the codewords are made of the 9-qubit states, |0) and []), defined in Eq. (24.23). I shall first consider the occurrences of phase-flip and bit-flip separately, and eventually show that both types of event can be corrected. Phase-flip error For instance, calling the three 3-qubit blocks A, B, C, if a single phase-flip occurs on any qubit within block A, the channel outputs: (24.24) The first step in the syndrome diagnosis consists of comparing the relative phase of blocks A, B then of blocks B, C (or any other two pair selection), just like in the 1-qubit phase-flip channel case described earlier. Majority logic then dictates which block may have been corrupted and where the phase correction applies. It is left as an (easy) exercise to show that comparing the signs of A, B blocks can be performed by measuring X123456 = X1X2X3X4X5X6, and likewise for the B, C blocks with X456789 X4X5X6X7X3X9, where Xi is the Pauli matrix X applied to the qubit i. The entire syndrome diagnostic, leading to the proper corrective action on the concerned block phase, thus, consists of performing the two measurements (X123456, X456789), while the other possibility is (X123456, X123789), both being applicable in any measurement order. Table 24.2 summarizes the corrective actions from the syndrome diagnostic based on (X123456,X456789). To restore the phase in the corrupted block, say, for instance, A, the corrective action is to apply the operator Z Z2Z3. Indeed, because of the properties Z|0) = |0) and Z|1) = - -|1), the phase of the 3-qubit block A is flipped according to Z,Z2Z3 (|000) - [111)] = |000) - (