Step-by-Step Derivation
We wish to prepare the logical two-qubit GHZ state
\[
\lvert\psi_L\>=\frac{\lvert00\>_{AB}+\lvert11\>_{AB}}{\sqrt2}
\]
in the \([[4,2,2]]\) code via
\[
\bigl(CNOT_{03}\bigr)\;\bigl(H_0\bigr)\;\bigl(CNOT_{21}\bigr)\;\bigl(H_2\bigr)
\]
with two independent two-qubit depolarizing errors (rate \(p\)) acting
immediately after each CNOT. We then measure the two stabilizers
\(\;S_X=X^{\otimes4},\;S_Z=Z^{\otimes4}\), post-select on the “\(+1,+1\)” outcome,
and ask for the fidelity of the logical 2-qubit state (i.e.\ the overlap with \(\lvert\psi_L\>\)) in that post-selected ensemble.
- Error model and final error operator
• After \(CNOT_{21}\) an error \(E_{21}\in\{I\otimes I,P\}/\{P\neq I\}\) occurs on qubits \((2,1)\), with
\[
\Pr[E_{21}=I\otimes I]=1-p,\quad
\Pr[E_{21}=P]=\frac p{15}\;(P\neq I\otimes I).
\]
• After \(CNOT_{03}\) an independent error \(E_{03}\) of the same form acts on qubits \((0,3)\).
• Because all intervening gates either act on \((0,3)\) or on \((2,1)\), the two errors commute and never spread between the two pairs. Hence the total physical error on the final codeword is
\[
E \;=\; E_{03}\,\otimes\,E_{21}\,,
\]
acting on disjoint qubit‐pairs \((0,3)\) and \((2,1)\).
- Post-selection condition (“undetectable” errors)
We measure \(S_X=X^{\otimes4},\;S_Z=Z^{\otimes4}\) on the final 4-qubit state and keep only the “\(+1,+1\)” outcomes. Equivalently, we keep only those Pauli errors \(E\) which commute with both \(S_X\) and \(S_Z\). The set of all Pauli operators that commute with every stabilizer is the normalizer \(N\). Among these, the stabilizer subgroup \(S\subset N\) acts trivially on the code space (i.e.\ no logical error), while the remaining \(N\setminus S\) are non-trivial logical errors.
Thus, if we let
\[
\mathcal{P}_2=\{\,\text{all 2-qubit Paulis}\}
\quad\text{and}\quad
q(P)=
\begin{cases}
1-p,&P=I\otimes I,\\
\tfrac p{15},&P\neq I\otimes I,
\end{cases}
\]
then the joint law is \(\Pr[E_{21}=P_{21},E_{03}=P_{03}]=q(P_{21})\,q(P_{03})\). We define
• Denominator (probability undetected):
\[
D
=\sum_{\substack{P_{21},P_{03}\\(P_{21}\otimes P_{03})\in N}}
q(P_{21})\,q(P_{03})\,.
\]
• Numerator (probability undetected & no logical error):
\[
N
=\sum_{\substack{P_{21},P_{03}\\(P_{21}\otimes P_{03})\in S}}
q(P_{21})\,q(P_{03})\,.
\]
Then the logical fidelity (post-selected on no syndrome) is
\[
F_{\rm logical}
=\frac{N}{D}\,.
\]
- Characterizing \(N\) vs.\ \(S\) for disjoint pairs
The stabilizer group of the \([[4,2,2]]\) code is generated by
\[
S_X = X_0X_1X_2X_3,\qquad
S_Z = Z_0Z_1Z_2Z_3,
\]
and has four elements
\(\{I,\,X^{\otimes4},\,Z^{\otimes4},\,Y^{\otimes4}\}\).
Because \(E=E_{03}\otimes E_{21}\) acts on disjoint pairs,
\(E\in S\) if and only if
\[
E_{03}\otimes E_{21}\;\in\;\{\,I,I\},\;\{X_0X_3,X_1X_2\},\;\{Z_0Z_3,Z_1Z_2\},\;\{Y_0Y_3,Y_1Y_2\}.
\]
Hence there are exactly four joint events in the numerator:
\[
\bigl(P_{03},P_{21}\bigr)
=
(I\!,I),\;(X\!X,X\!X),\;(Z\!Z,Z\!Z),\;(Y\!Y,Y\!Y),
\]
each occurring with probability
\[
q(P)^2
=
\begin{cases}
(1-p)^2,&P=I\!,\\
\bigl(\tfrac p{15}\bigr)^2,&P\neq I.
\end{cases}
\]
Thus
\[
N
=(1-p)^2 \;+\;3\;\Bigl(\frac p{15}\Bigr)^{\!2}
=1-2p+p^2\;+\;\frac{3p^2}{225}
=1-2p+\frac{76\,p^2}{75}\,.
\]
- Computing \(D\) by parity classes
A Pauli \(P\in\mathcal P_4\) commutes with
\(S_X\) iff it has an even number of factors in \(\{Y,Z\}\),
and commutes with \(S_Z\) iff it has an even number of factors in \(\{X,Y\}\).
Restricting to each 2-qubit block \(\mathcal P_2\), these two parity conditions split the 16 two-qubit Paulis into four equally-sized “parity classes” of size 4. Label these classes by \((r,s)\in\{0,1\}^2\). Denote
\[
p_{r,s}\;=\;\sum_{\substack{P\in\mathcal P_2\\\text{class}(P)=(r,s)}}
q(P)\,.
\]
By inspection one finds
\[
p_{0,0}=(1-p)+3\,\frac{p}{15}
=1-\frac{4p}{5},
\quad
p_{0,1}=p_{1,0}=p_{1,1}
=4\,\frac{p}{15}
=\frac{4p}{15}\,.
\]
Since \(E_{03},E_{21}\) must lie in the same parity class in order for
\(E_{03}\otimes E_{21}\in N\), the total undetected probability is
\[
D
=\sum_{(r,s)\in\{0,1\}^2} p_{r,s}^{\,2}
=\Bigl(1-\tfrac{4p}{5}\Bigr)^2
+3\;\Bigl(\tfrac{4p}{15}\Bigr)^2
=1-\frac{8p}{5}+\frac{64\,p^2}{75}\,.
\]
- Assembling the logical fidelity
\[
F_{\rm logical}
=\frac{N}{D}
=\frac{\,1-2p+\tfrac{76\,p^2}{75}\,}
{\,1-\tfrac{8p}{5}+\tfrac{64\,p^2}{75}\,}
\;=\;
\frac{75-150p+76p^2}{75-120p+64p^2}\,.
\]
Final Answer:
\[
\boxed{
F_{\rm logical}(p)
=
\frac{\,1-2p+\tfrac{76}{75}\,p^2\,}
{\,1-\tfrac{8}{5}\,p+\tfrac{64}{75}\,p^2\,}
\;=\;
\frac{75-150p+76\,p^2}{75-120p+64\,p^2}\,.}
\]