The problem asks for the logical state fidelity of the prepared two-qubit logical \(|00\rangle_{AB}\) state as a function of the two-qubit gate error rate \(p\). The fidelity is to be calculated assuming post-selection on the ancilla qubit measuring \(|0\rangle\) and on the final state being in the code space (i.e., detectable errors in the code are discarded).
Let the initial state of the five qubits (0,1,2,3,4) be \(|00000\rangle\).
The circuit operations, applied from right to left as written in the problem, are:
\(U_{circuit} = M_4 (CNOT_{04}) (CNOT_{34}) (CNOT_{23}) (CNOT_{10}) (CNOT_{12}) (H_1)\)
1. Ideal Circuit Evolution and Final State:
Let’s first determine the ideal final state before any errors.
Initial state: \(|\psi_0\rangle = |00000\rangle\).
- \(H_1\): \(|\psi_1\rangle = |0\rangle_0 \frac{1}{\sqrt{2}}(|0\rangle_1 + |1\rangle_1) |000\rangle_{234}\)
- \(CNOT_{12}\): \(|\psi_2\rangle = |0\rangle_0 \frac{1}{\sqrt{2}}(|00\rangle_{12} + |11\rangle_{12}) |00\rangle_{34}\)
- \(CNOT_{10}\): \(|\psi_3\rangle = \frac{1}{\sqrt{2}}(|000\rangle_{012} + |111\rangle_{012}) |00\rangle_{34}\)
- \(CNOT_{23}\): \(|\psi_4\rangle = \frac{1}{\sqrt{2}}(|0000\rangle_{0123} + |1111\rangle_{0123}) |0\rangle_4\)
- \(CNOT_{34}\): \(|\psi_5\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11111\rangle)\)
- \(CNOT_{04}\): \(|\psi_6\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\)
Now, we perform the measurement \(M_4\) on qubit 4. We post-select on measuring \(|0\rangle_4\).
The projector for this measurement outcome is \(P_0^4 = I_{0123} \otimes |0\rangle_4\langle 0|_4\).
The ideal state after post-selection is \(P_0^4 |\psi_6\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\). This state is already normalized and has qubit 4 in \(|0\rangle\). We denote this 5-qubit ideal state as \(|\psi_{ideal\_5Q}\rangle\).
The logical state \(|\Psi_L\rangle\) is the 4-qubit component: \(|\Psi_L\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle)_{0123}\).
Let’s verify this is the logical \(|00\rangle_{AB}\) state:
Stabilizers are \(S_1 = X_0X_1X_2X_3\) and \(S_2 = Z_0Z_1Z_2Z_3\).
\(S_1|\Psi_L\rangle = \frac{1}{\sqrt{2}}(X_0X_1X_2X_3|0000\rangle + X_0X_1X_2X_3|1111\rangle) = \frac{1}{\sqrt{2}}(|1111\rangle + |0000\rangle) = |\Psi_L\rangle\).
\(S_2|\Psi_L\rangle = \frac{1}{\sqrt{2}}(Z_0Z_1Z_2Z_3|0000\rangle + Z_0Z_1Z_2Z_3|1111\rangle) = \frac{1}{\sqrt{2}}(|0000\rangle + (-1)^4|1111\rangle) = |\Psi_L\rangle\).
Logical \(Z_A = Z_0Z_1I_2I_3\) and \(Z_B = Z_0I_1Z_2I_3\).
\(Z_A|\Psi_L\rangle = \frac{1}{\sqrt{2}}(Z_0Z_1|0000\rangle + Z_0Z_1|1111\rangle) = \frac{1}{\sqrt{2}}(|0000\rangle + (-1)^2|1111\rangle) = |\Psi_L\rangle\).
\(Z_B|\Psi_L\rangle = \frac{1}{\sqrt{2}}(Z_0Z_2|0000\rangle + Z_0Z_2|1111\rangle) = \frac{1}{\sqrt{2}}(|0000\rangle + (-1)^2|1111\rangle) = |\Psi_L\rangle\).
The state \(|\Psi_L\rangle\) is indeed the logical \(|00\rangle_{AB}\) state.
2. Error Model and Fidelity Calculation:
There are 5 CNOT gates (\(U_k\), \(k=2 \dots 6\)) in the circuit, each followed by a two-qubit depolarizing channel. The Hadamard gate \(H_1\) (denoted \(U_1\)) is not followed by an error channel.
The noisy evolution leads to a density matrix \(\rho_{raw}\). We are interested in the fidelity of the post-selected state:
\[
F = \frac{\langle \psi_{ideal\_5Q} | \rho_{raw} | \psi_{ideal\_5Q} \rangle}{\text{Tr}(P_A \rho_{raw})}
\]
where \(P_A = P_S^{0-3} \otimes P_0^4\) is the projector onto the code space (qubits 0-3) and ancilla 4 being \(|0\rangle\). \(P_S^{0-3}\) is the projector onto the \(+1\) eigenspace of \(S_1\) and \(S_2\).
We calculate this fidelity to first order in \(p\).
\(\rho_{raw} = (1-5p) |\psi_{ideal\_5Q}\rangle\langle\psi_{ideal\_5Q}| + \sum_{k=2}^6 \frac{p}{15} \sum_{G_k \in \mathcal{P}_{Q_k}^*} |\phi_{k,G_k}\rangle\langle\phi_{k,G_k}| + O(p^2)\),
where \(U_{final\_k} = U_6 \dots U_{k+1}\) and \(U_{initial\_k} = U_k \dots U_1\).
And \(|\phi_{k,G_k}\rangle = U_{final\_k} G_k U_{initial\_k} |\psi_0\rangle = U_{final\_k} G_k U_{final\_k}^{-1} |\psi_{ideal\_5Q}\rangle\).
Let \(G_k^{\text{transformed}} = U_{final\_k} G_k U_{final\_k}^{-1}\). So \(|\phi_{k,G_k}\rangle = G_k^{\text{transformed}} |\psi_{ideal\_5Q}\rangle\).
Numerator: \(N = \langle \psi_{ideal\_5Q} | \rho_{raw} | \psi_{ideal\_5Q} \rangle\).
\[
N = (1-5p) + \sum_{k=2}^6 \frac{p}{15} \sum_{G_k \in \mathcal{P}_{Q_k}^*} |\langle\psi_{ideal\_5Q}| G_k^{\text{transformed}} |\psi_{ideal\_5Q}\rangle|^2 + O(p^2)
\]
The term \(|\langle\psi_{ideal\_5Q}| G_k^{\text{transformed}} |\psi_{ideal\_5Q}\rangle|^2\) is non-zero if and only if:
- \(G_k^{\text{transformed}}\) acts as \(I_4\) on qubit 4 (because \(Z_4\) anticommutes with one state, \(X_4, Y_4\) flip the state).
- \(G_k^{\text{transformed}}\) on qubits 0-3 is a product of \(Z\) operators (\(P_{0123} = Z_0^{a_0}Z_1^{a_1}Z_2^{a_2}Z_3^{a_3}\)) such that the total number of \(Z\) operators \(\sum a_i\) is even. (This is because \(\langle\Psi_L| P_{0123} |\Psi_L\rangle = \frac{1}{2}(1 + (-1)^{\sum a_i})\)).
So, for \(N\) contribution, \(G_k^{\text{transformed}}\) must be \(P_{0123} \otimes I_4\) and \(P_{0123} \in \{I, Z_0Z_1, Z_0Z_2, Z_1Z_2, Z_2Z_3, Z_1Z_3, Z_0Z_3, Z_0Z_1Z_2Z_3\}\). All these 8 operators yield 1.
Denominator: \(D = \text{Tr}(P_A \rho_{raw})\).
\[
D = (1-5p) + \sum_{k=2}^6 \frac{p}{15} \sum_{G_k \in \mathcal{P}_{Q_k}^*} \langle\psi_{ideal\_5Q}| (G_k^{\text{transformed}})^\dagger P_A G_k^{\text{transformed}} |\psi_{ideal\_5Q}\rangle + O(p^2)
\]
The term \(\langle\psi_{ideal\_5Q}| (G_k^{\text{transformed}})^\dagger P_A G_k^{\text{transformed}} |\psi_{ideal\_5Q}\rangle\) is non-zero if and only if:
- \(G_k^{\text{transformed}}\) does not flip qubit 4. So \(G_k^{\text{transformed}}\) must not contain \(X_4\) or \(Y_4\). (\(P_0^4 G_k^{\text{transformed}} |\psi_{ideal\_5Q}\rangle \neq 0\)).
- \(G_k^{\text{transformed}}\) on qubits 0-3 must preserve the code space (\(P_S^{0-3} G_k^{\text{transformed}} |\psi_{ideal\_5Q}\rangle \neq 0\)). This means \(G_k^{\text{transformed}}\) must commute with the stabilizers \(S_1\) and \(S_2\). Thus \(P_{0123} \in N(S)\), the normalizer of the stabilizer group.
So, for \(D\) contribution, \(G_k^{\text{transformed}}\) must be \(P_{0123} \otimes I_4\) or \(P_{0123} \otimes Z_4\), where \(P_{0123} \in N(S)\). All such errors yield 1.
3. Pauli Error Propagation Analysis:
Let’s analyze each of the 5 CNOT gates (\(U_k\), \(k=2 \dots 6\)). \(G_k\) is a two-qubit Pauli error on the qubits of \(U_k\). \(G_k^{\text{transformed}} = U_{final\_k} G_k U_{final\_k}^{-1}\).
-
CNOT Rules for \(U_{c,t} P U_{c,t}^{-1}\):
- \(X_c \to X_c X_t\)
- \(Z_c \to Z_c\)
- \(X_t \to X_t\)
- \(Z_t \to Z_c Z_t\)
- \(Y_c \to Y_c X_t\)
- \(Y_t \to Z_c Y_t\)
- Paulis on qubits not involved commute.
-
List of \(N(S)\) elements (\(P_{0123}\)): There are 256 such elements. These are products of \(X_A, X_B, Z_A, Z_B, S_1, S_2\).
Case by Case Analysis:
-
\(k=6\): \(CNOT_{04}\) (qubits 0,4). \(U_{final_6} = I\). So \(G_6^{\text{transformed}} = G_6\). (15 errors)
- \(N\): No error (non-identity) can satisfy the condition \(P_0 \otimes I_4\) and \(P_0=I_0\). So 0 contribution.
- \(D\):
- Errors with \(X_4\) or \(Y_4\) (8 errors like \(I_0X_4, X_0X_4, \dots\)): \(0\) contribution as they flip ancilla.
- Errors with \(I_4\): \(X_0I_4, Y_0I_4, Z_0I_4\). None of \(X_0, Y_0, Z_0\) are in \(N(S)\). \(0\) contribution.
- Errors with \(Z_4\): \(I_0Z_4, X_0Z_4, Y_0Z_4, Z_0Z_4\).
- \(I_0Z_4\): \(I_0 \in N(S)\). This contributes 1 to \(D\).
- \(X_0Z_4, Y_0Z_4, Z_0Z_4\): \(X_0, Y_0, Z_0 \notin N(S)\). \(0\) contribution.
- Total for \(k=6\): \(N=0\), \(D=1\).
-
\(k=5\): \(CNOT_{34}\) (qubits 3,4). \(U_{final_5} = CNOT_{04}\). (15 errors)
- \(N\): No error can satisfy the condition \(P_3 \otimes I_4\) and \(P_3=I_3\). So 0 contribution.
- \(D\):
- Errors with \(X_4\) or \(Y_4\) (8 errors like \(I_3X_4, X_3X_4, \dots\)): \(G_5^{\text{transformed}}\) will contain \(X_4\) or \(Y_4\). \(0\) contribution.
- Errors with \(I_4\): \(X_3I_4, Y_3I_4, Z_3I_4\). These map to themselves by \(CNOT_{04}\). None of \(X_3, Y_3, Z_3\) are in \(N(S)\). \(0\) contribution.
- Errors with \(Z_4\): \(I_3Z_4, X_3Z_4, Y_3Z_4, Z_3Z_4\).
- \(I_3Z_4 \xrightarrow{C_{04}} I_3Z_0Z_4\). \(Z_0 \notin N(S)\). \(0\) contribution.
- \(X_3Z_4 \xrightarrow{C_{04}} X_3Z_0Z_4\). \(X_3Z_0 \notin N(S)\). \(0\) contribution.
- \(Y_3Z_4 \xrightarrow{C_{04}} Y_3Z_0Z_4\). \(Y_3Z_0 \notin N(S)\). \(0\) contribution.
- \(Z_3Z_4 \xrightarrow{C_{04}} Z_3Z_0Z_4\). \(Z_3Z_0 \in N(S)\) (it’s \(Z_A Z_B S_2\)). This contributes 1 to \(D\).
- Total for \(k=5\): \(N=0\), \(D=1\).
-
\(k=4\): \(CNOT_{23}\) (qubits 2,3). \(U_{final_4} = CNOT_{04} CNOT_{34}\). (15 errors)
- \(N\): No \(G_4\) error results in \(P_{0123} \otimes I_4\) where \(P_{0123}\) is an even-weight Z-type. \(0\) contribution.
- \(D\):
- Errors with \(Z_3\) (9 errors, e.g. \(I_2Z_3, X_2Z_3, \dots\)): \(G_4\) containing \(Z_3\) (e.g., \(I_2Z_3\)) will propagate to \(I_2Z_3Z_4\) (via \(CNOT_{34}\)). So \(G_4^{\text{transformed}}\) will contain \(Z_4\).
- \(Z_2Z_3 \xrightarrow{C_{34}} Z_2Z_3Z_4 \xrightarrow{C_{04}} Z_2Z_3Z_4\). \(Z_2Z_3 \in N(S)\) (it’s \(Z_A S_2\)). This contributes 1 to \(D\).
- Other 8 errors with \(Z_3\): e.g. \(I_2Z_3 \to Z_3Z_4\), \(Z_3 \notin N(S)\). Check other \(X,Y\) combinations, e.g. \(X_2Z_3 \to X_2Z_3Z_4\), \(X_2Z_3 \notin N(S)\). So 1 from \(Z_2Z_3\).
- Errors without \(Z_3\) (6 errors): \(I_2X_3, I_2Y_3, X_2I_3, X_2X_3, X_2Y_3, Y_2I_3, Y_2X_3, Y_2Y_3\). These propagate to \(P_{0123} \otimes I_4\).
- \(X_2X_3 \xrightarrow{U_{final_4}} X_2X_3\). \(X_2X_3 \in N(S)\). This contributes 1 to \(D\).
- \(Y_2Y_3 \xrightarrow{U_{final_4}} Y_2Y_3\). \(Y_2Y_3 \in N(S)\). This contributes 1 to \(D\).
- Others: \(X_2, Y_2, X_3, Y_3, X_2Y_3, Y_2X_3\) are not in \(N(S)\). \(0\) contribution.
- Total for \(k=4\): \(N=0\), \(D=3\).
-
\(k=3\): \(CNOT_{10}\) (qubits 1,0). \(U_{final_3} = CNOT_{04} CNOT_{34} CNOT_{23}\). (15 errors)
- \(N\): No \(G_3\) error results in \(P_{0123} \otimes I_4\) where \(P_{0123}\) is an even-weight Z-type. \(0\) contribution.
- \(D\):
- Errors with \(Z_0\) (9 errors): \(G_3\) containing \(Z_0\) (e.g., \(I_1Z_0\)) will propagate to \(Z_0Z_4\) (via \(CNOT_{04}\)).
- \(Z_1Z_0 \xrightarrow{U_{final_3}} Z_1Z_0Z_4\). \(Z_1Z_0 \in N(S)\) (it’s \(Z_A\)). This contributes 1 to \(D\).
- Other 8 errors with \(Z_0\): E.g. \(X_1Z_0 \to X_1Z_0Z_4\). \(X_1Z_0 \notin N(S)\). \(0\) contribution.
- Errors without \(Z_0\) (6 errors): \(I_1X_0, I_1Y_0, X_1I_0, X_1X_0, X_1Y_0, Y_1I_0, Y_1X_0, Y_1Y_0\). These propagate to \(P_{0123} \otimes I_4\).
- \(X_1X_0 \xrightarrow{U_{final_3}} X_1X_0\). \(X_1X_0 \in N(S)\) (it’s \(X_B\)). This contributes 1 to \(D\).
- \(Y_1Y_0 \xrightarrow{U_{final_3}} Y_1Y_0\). \(Y_1Y_0 \in N(S)\). This contributes 1 to \(D\).
- Others (4 errors): not in \(N(S)\). \(0\) contribution.
- Total for \(k=3\): \(N=0\), \(D=3\).
-
\(k=2\): \(CNOT_{12}\) (qubits 1,2). \(U_{final_2} = CNOT_{04} CNOT_{34} CNOT_{23} CNOT_{10}\). (15 errors)
- \(N\):
- \(G_2=Z_1Z_2 \xrightarrow{U_{final_2}} Z_1Z_2\). \(Z_1Z_2 \in N(S)\) and is even-weight \(Z\)-type. This contributes 1 to \(N\).
- No other error contributes to \(N\).
- \(D\): No error originating from \(G_2\) will propagate to \(Z_0\) or \(Z_3\) (which would then become \(Z_0Z_4\) or \(Z_3Z_4\)). So all 15 errors effectively become \(P_{0123} \otimes I_4\).
- \(Z_1Z_2 \xrightarrow{U_{final_2}} Z_1Z_2\). \(Z_1Z_2 \in N(S)\). This contributes 1 to \(D\).
- \(X_1X_2 \xrightarrow{U_{final_2}} X_1X_2\). \(X_1X_2 \in N(S)\). This contributes 1 to \(D\).
- \(Y_1Y_2 \xrightarrow{U_{final_2}} Y_1Y_2\). \(Y_1Y_2 \in N(S)\). This contributes 1 to \(D\).
- Other 12 errors (e.g. \(I_1X_2, Z_1I_2\)): Not in \(N(S)\). \(0\) contribution.
- Total for \(k=2\): \(N=1\), \(D=3\).
Summary of Contributions:
Number of CNOT gates \(N_{CNOT}=5\).
Sum of \(N\) contributions from errors: \(0+0+0+0+1 = 1\).
Sum of \(D\) contributions from errors: \(1+1+3+3+3 = 11\).
Substituting these into the fidelity formula:
\[
N = (1-5p) + \frac{p}{15} \times 1 = 1 - 5p + \frac{p}{15} = 1 - \frac{75p-p}{15} = 1 - \frac{74p}{15}
\]
\[
D = (1-5p) + \frac{p}{15} \times 11 = 1 - 5p + \frac{11p}{15} = 1 - \frac{75p-11p}{15} = 1 - \frac{64p}{15}
\]
The logical state fidelity is:
\[
F = \frac{1 - \frac{74p}{15}}{1 - \frac{64p}{15}}
\]
For small \(p\), we can use the approximation \(\frac{1}{1-x} \approx 1+x\):
\[
F \approx \left(1 - \frac{74p}{15}\right) \left(1 + \frac{64p}{15}\right) = 1 + \left(\frac{64}{15} - \frac{74}{15}\right)p + O(p^2) = 1 - \frac{10p}{15} + O(p^2) = 1 - \frac{2p}{3} + O(p^2)
\]
The final answer is \(\boxed{\frac{1 - \frac{74p}{15}}{1 - \frac{64p}{15}}}\).