1. Step–by–Step Derivation
We use the same error model as in Sub-problem 1:
after each CNOT a two–qubit depolarising channel acts on the same two qubits as the gate.
For the present circuit there are therefore two independent error channels
- \(\mathcal D_{21}\) acting on qubits (2,1) with Kraus operator \(E_1\),
- \(\mathcal D_{03}\) acting on qubits (0,3) with Kraus operator \(E_2\).
The total Pauli error on the four physical qubits is
\[
P \;=\;E_2^{(0,3)}\,E_1^{(1,2)} .
\]
Throughout we ignore the overall \(\pm1,\pm i\) phases of Pauli operators.
1.1 Parity vector of a two–qubit Pauli
For a single–qubit Pauli \(P\in\{I,X,Y,Z\}\) define
\[
\alpha(P)=
\begin{cases}
1 & \text{if }P\in\{Z,Y\}\\[2pt]
0 & \text{otherwise}
\end{cases},
\qquad
\beta(P)=
\begin{cases}
1 & \text{if }P\in\{X,Y\}\\[2pt]
0 & \text{otherwise}.
\end{cases}
\]
For a two–qubit Pauli on qubits \((i,j)\) let
\[
s\,\equiv\,\alpha(P_i)+\alpha(P_j)\pmod 2,\qquad
t\,\equiv\,\beta(P_i)+\beta(P_j)\pmod 2 .
\]
The ordered pair
\[
v(P)=(s,t)\in\{(0,0),(0,1),(1,0),(1,1)\}
\]
is called the parity vector of \(P\).
1.2 Detectability condition
The code stabilisers are
\[
S_X=XXXX,\qquad S_Z=ZZZZ .
\]
A Pauli commutes with both stabilisers iff its parity vector is \((0,0)\) on every qubit it acts on.
Hence for the total error
\[
P=E_2^{(0,3)}E_1^{(1,2)}
\]
to be undetectable (accepted) we must have
\[
v(E_2)=v(E_1).
\]
1.3 Statistics of the parity classes
For a single two–qubit depolarising channel
- probability of getting the identity \(II\) : \(1-p\)
- probability of any one non-identity Pauli : \(p/15\).
Counting the 16 Pauli operators according to their parity vector gives
• \((0,0)\)-class: \(II,\,XX,\,YY,\,ZZ\) (4 operators)
• each of the other three classes: 4 operators.
Therefore
\[
\begin{aligned}
P_{(0,0)} &\equiv\Pr\bigl[v(P)=(0,0)\bigr]
=(1-p)+3\!\left(\frac{p}{15}\right)
= 1-\frac{4p}{5},\\[6pt]
P_{\text{other}} &\equiv\Pr\bigl[v(P)=(0,1)\text{ or }(1,0)\text{ or }(1,1)\bigr]
=\frac{4p}{15}\quad\text{(for each of the three classes).}
\end{aligned}
\]
1.4 Acceptance probability
Because \(E_1\) and \(E_2\) are independent,
\[
\Pr(\text{accept}) = P_{(0,0)}^{\,2}+3P_{\text{other}}^{\,2}
=\Bigl(1-\frac{4p}{5}\Bigr)^{2}+3\Bigl(\frac{4p}{15}\Bigr)^{2}
=1-\frac{8p}{5}+\frac{64p^{2}}{75}.
\]
1.5 Logical action of the accepted errors
The physical operators that commute with both stabilisers form the code normaliser.
Within it, the logical Bell state
\[
|\Phi^+\rangle_{AB}=\frac{|00\rangle_{AB}+|11\rangle_{AB}}{\sqrt2}
\]
is stabilised by the two logical operators
\[
X_A X_B,\qquad Z_A Z_B .
\]
A convenient way to see the logical effect of a parity class is:
• \((0,0)\) on qubits \((0,3)\) and \((1,2)\)
\(\;\Longrightarrow\) the four–qubit operator is of the form
\(S\,(X_A X_B)^{u}(Z_A Z_B)^{v}\) with \(u,v\in\{0,1\}\) and \(S\) a code stabiliser.
These operators stabilise \(|\Phi^+\rangle_{AB}\), so they do not change the logical state.
• \((0,1),\,(1,0),\,(1,1)\) on both pairs produce, up to stabilisers, the single-qubit logical Paulis
\(X_A,\;Z_A,\;Y_A\) (or the corresponding operators on \(B\)).
Each of these maps \(|\Phi^+\rangle_{AB}\) to a state orthogonal to it.
Hence:
- accepted error with parity \((0,0)\) ⇒ no logical error (fidelity 1);
- accepted error with any other parity ⇒ logical error (fidelity 0).
1.6 Logical fidelity conditioned on acceptance
Let
\[
P_{\text{good}} = P_{(0,0)}^{\,2}=\Bigl(1-\frac{4p}{5}\Bigr)^{2}.
\]
The conditional logical fidelity is
\[
\begin{aligned}
F_{\text{logical}}(p)
&=\frac{P_{\text{good}}}{\Pr(\text{accept})}\\[4pt]
&=\frac{\bigl(1-\dfrac{4p}{5}\bigr)^{2}}
{\bigl(1-\dfrac{4p}{5}\bigr)^{2}+3\bigl(\dfrac{4p}{15}\bigr)^{2}}\\[10pt]
&=\frac{\bigl(1-\dfrac{4p}{5}\bigr)^{2}}
{1-\dfrac{8p}{5}+\dfrac{64p^{2}}{75}} .
\end{aligned}
\]
2. Final Answer
Final Answer: With post-selection on all detectable errors, the logical two-qubit state fidelity is
\[
\boxed{%
F_{\text{logical}}(p)=
\frac{\left(1-\dfrac{4p}{5}\right)^{2}}
{\,1-\dfrac{8p}{5}+\dfrac{64p^{2}}{75}} }.
\]