1. Step-by-Step Derivation
- Ideal circuit action
• Start from the computational vacuum
\[
|0000\rangle_{0123}.
\]
• Apply the gates in the (right-to-left) order given in the problem
\[
(CNOT_{03})\; H_0\; (CNOT_{21})\; H_2 .
\]
• After the first two operations
\[
H_2 :\; |0000\rangle \;\longrightarrow\;
\frac{|0\rangle_2+|1\rangle_2}{\sqrt2}\otimes|000\rangle_{013},
\]
\[
CNOT_{21} :\;
\frac{|0\rangle_2|0\rangle_1+|1\rangle_2|1\rangle_1}{\sqrt2}\otimes|00\rangle_{03}
= |\Phi^{+}\rangle_{21}\otimes|00\rangle_{03},
\]
where \( |\Phi^{+}\rangle\equiv (|00\rangle+|11\rangle)/\sqrt2 \).
• After the last two operations
\[
H_0:\; |00\rangle_{03}\;\longrightarrow\;
\frac{|0\rangle_0+|1\rangle_0}{\sqrt2}\otimes|0\rangle_3 ,
\]
\[
CNOT_{03}:\;
\frac{|0\rangle_0|0\rangle_3 + |1\rangle_0|1\rangle_3}{\sqrt2}
= |\Phi^{+}\rangle_{03}.
\]
• Hence the ideal final 4-qubit state
\[
|\psi_{\text{ideal}}\rangle
= |\Phi^{+}\rangle_{21}\;\otimes\;|\Phi^{+}\rangle_{03}.
\]
It is a stabilizer state whose independent generators can be chosen as
\[
\bigl\{\,Z_2Z_1,\;X_2X_1,\;Z_0Z_3,\;X_0X_3\,\bigr\}.
\]
- Error model
• After each CNOT gate a two-qubit depolarising channel acts on the same two qubits:
\[
\mathcal{D}_{ij}^{(p)}(\rho)=
(1-p)\,\rho+\frac{p}{15}\sum_{P\neq I\otimes I}P_{ij}\,\rho\,P_{ij}.
\]
• There are two such channels:
– \(\mathcal{D}_{21}^{(p)}\) immediately after \(CNOT_{21}\)
– \(\mathcal{D}_{03}^{(p)}\) immediately after \(CNOT_{03}\).
• Denote the Pauli error applied by the first channel by \(E_{21}\)
(acting only on qubits 2 and 1) and the second by \(E_{03}\)
(acting only on qubits 0 and 3).
• Because the gates following \(E_{21}\) touch only qubits 0 and 3, the two
error operators act on disjoint pairs and therefore commute.
The final physical state is
\[
\rho(p)=
\sum_{E_{21},E_{03}}
p(E_{21})\,p(E_{03})\;
E_{03}\,E_{21}\;
|\psi_{\text{ideal}}\rangle\langle\psi_{\text{ideal}}|\;
E_{21}\,E_{03},
\]
\[
p(E)=
\begin{cases}
1-p, & E=I\otimes I,\\[4pt]
p/15,& \text{any of the 15 non-identity Paulis.}
\end{cases}
\]
- When does a Pauli error leave the state invariant?
• For any stabilizer state \(|\psi\rangle\), a Pauli operator \(P\) satisfies
\(\langle\psi|P|\psi\rangle=\pm1\) if \(P\) is in the stabilizer group
and \(0\) otherwise, hence
\[
F=\langle\psi_{\text{ideal}}|\rho(p)|\psi_{\text{ideal}}\rangle
=\sum_{E_{21},E_{03}}
p(E_{21})\,p(E_{03})
\,\delta\bigl(E_{21}E_{03}\in\mathcal{S}\bigr).
\]
• Because the stabilizer factors into the two Bell-pair stabilizers,
\(E_{21}E_{03}\in\mathcal{S}\)
⇔ \(E_{21}\in\{I,X_2X_1,Z_2Z_1,Y_2Y_1\}\) and
\(E_{03}\in\{I,X_0X_3,Z_0Z_3,Y_0Y_3\}\).
• For one depolarising channel
\[
P_{\text{pair}}(E\in\text{local stabilizer})
=(1-p)+\frac{3p}{15}=1-\frac{4p}{5}.
\]
- Physical state fidelity
• The two error channels are independent, so the total fidelity is the
product of the two probabilities:
\[
F(p)=\Bigl(1-\frac{4p}{5}\Bigr)^2.
\]
2. Mathematical Typesetting
All equations above are typeset in LaTeX.
3. Conventions and Units
The error rate \(p\) is dimensionless. Fidelity is dimensionless and lies in
[0\le F\le1.]
4. Final Answer
Final Answer:
\[
\boxed{\,F(p)=\Bigl(1-\dfrac{4p}{5}\Bigr)^2\,}
\]