Subproblem 3: Logical State Fidelity with Ancilla and Post-selection
We aim to prepare the logical \(|00\rangle_{AB}\) state using a 5-qubit circuit (4 physical qubits + 1 ancilla qubit, labelled 4). The state is post-selected on qubit 4 measuring \(|0\rangle\) and on all detectable errors in the [[4,2,2]] code space.
1. Ideal Target State for Logical \(|00\rangle_{AB}\)
The logical \(|00\rangle_{AB}\) state is an eigenstate of \(Z_A = Z_0Z_1\) and \(Z_B = Z_0Z_2\) with eigenvalue +1, and an eigenstate of the stabilizers \(S_X = X_0X_1X_2X_3\) and \(S_Z = Z_0Z_1Z_2Z_3\) with eigenvalue +1. By applying these conditions, the physical 4-qubit representation of the logical \(|00\rangle_{AB}\) state is:
\[
|\psi_{00}\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle)
\]
2. Ideal Circuit Simulation (5-qubit system)
The circuit operates on \(|00000\rangle\) (qubits 0,1,2,3 for data; qubit 4 for ancilla).
The operations are \(U = M_4 (CNOT_{04}) (CNOT_{34}) (CNOT_{23}) (CNOT_{10}) (CNOT_{12}) (H_1)\).
- \(|\psi^{(0)}\rangle = |00000\rangle\).
- \(H_1\): \(|\psi^{(1)}\rangle = H_1 |\psi^{(0)}\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |01000\rangle)\).
- \(CNOT_{12}\): \(|\psi^{(2)}\rangle = CNOT_{12} |\psi^{(1)}\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |01100\rangle)\).
- \(CNOT_{10}\): \(|\psi^{(3)}\rangle = CNOT_{10} |\psi^{(2)}\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11100\rangle)\).
- \(CNOT_{23}\): \(|\psi^{(4)}\rangle = CNOT_{23} |\psi^{(3)}\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\).
- \(CNOT_{34}\): \(|\psi^{(5)}\rangle = CNOT_{34} |\psi^{(4)}\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11111\rangle)\).
- \(CNOT_{04}\): \(|\psi^{(6)}\rangle = CNOT_{04} |\psi^{(5)}\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\).
The ancilla qubit 4 is measured. In the ideal case, it’s always \(|0\rangle\). After tracing out qubit 4, the final ideal state on qubits 0-3 is \(|\psi_{00}\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle)\).
Let \(|\Psi_0\rangle = |\psi_{00}\rangle_{0123}|0\rangle_4 = \frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\) be the 5-qubit ideal target state, incorporating the ancilla.
3. Logical Fidelity with Post-selection
The logical state fidelity \(F_L\) is defined as:
\[
F_L = \frac{\langle\psi_{00}| P_{\text{code}} \mathrm{Tr}_4(P_A \rho_{\text{final}}^{(5)} P_A) P_{\text{code}} |\psi_{00}\rangle}{\mathrm{Tr}(P_{\text{code}} \mathrm{Tr}_4(P_A \rho_{\text{final}}^{(5)} P_A))}
\]
where \(P_A = I_0I_1I_2I_3 \otimes |0\rangle_4\langle0|\) is the ancilla post-selection projector, \(P_{\text{code}}\) is the projector onto the 4-qubit code space, and \(\rho_{\text{final}}^{(5)}\) is the final 5-qubit density matrix including errors.
Let \(P_{\text{effective}} = P_{\text{code}} \otimes |0\rangle_4\langle0|\). Since \(P_{\text{effective}} |\Psi_0\rangle = |\Psi_0\rangle\), the numerator simplifies to:
\[
N_F = \langle\Psi_0| \rho_{\text{final}}^{(5)} |\Psi_0\rangle
\]
The denominator, representing the total probability of successful post-selection, is:
\[
D_F = \mathrm{Tr}(P_{\text{effective}} \rho_{\text{final}}^{(5)})
\]
There are \(N_{CNOT}=5\) CNOT gates. Let \(E_k\) be a 2-qubit Pauli error operator (from \(\mathcal{P}_{15}\)) occurring after the \(k\)-th CNOT gate. Let \(E_{\text{after},k}\) be the operator \(E_k\) conjugated by all subsequent gates.
Expanding \(\rho_{\text{final}}^{(5)}\) to \(O(p)\) (single-error terms):
\[
\rho_{\text{final}}^{(5)} = (1-p)^{N_{CNOT}} |\Psi_0\rangle\langle\Psi_0| + (1-p)^{N_{CNOT}-1} \frac{p}{15} \sum_{k=1}^{N_{CNOT}} \sum_{E_k \in \mathcal{P}_{15}^{(k)}} E_{\text{after},k} |\Psi_0\rangle\langle\Psi_0| E_{\text{after},k}^\dagger + O(p^2)
\]
Calculation of \(N_F\) (Numerator):
\[
N_F = (1-p)^5 + (1-p)^4 \frac{p}{15} \sum_{k=1}^5 \sum_{E_k \in \mathcal{P}_{15}^{(k)}} |\langle\Psi_0|E_{\text{after},k}|\Psi_0\rangle|^2 + O(p^2)
\]
An operator \(O\) has a non-zero expectation value \(\langle\Psi_0|O|\Psi_0\rangle\) only if \(O\) is of the form \(P_{0123} \otimes I_4\) or \(P_{0123} \otimes Z_4\). Otherwise, \(X_4\) or \(Y_4\) will flip the ancilla from \(|0\rangle\) to \(|1\rangle\), making the overlap 0.
The target state is \(|\Psi_0\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\). For \(P_{0123}\) (acting on qubits 0,1,2,3), \(\langle\Psi_0|P_{0123}|\Psi_0\rangle\) is non-zero only if \(P_{0123}\) is a product of an even number of \(X\) and \(Y\) operators (so it results in an overall Z-parity transformation only). Specifically, for \(|\psi_{00}\rangle\), terms like \(Z_iZ_j\) have expectation value 1, while \(Z_i\) or \(X_iX_j\) have 0.
Let’s evaluate \(\sum |\langle\Psi_0|E_{\text{after},k}|\Psi_0\rangle|^2\):
* k=5 (Error \(E_5\) on qubits (0,4)): \(E_{\text{after},5} = E_5\).
For \(\langle\Psi_0|E_5|\Psi_0\rangle \ne 0\), \(E_5\) must be \(P_0 \otimes I_4\) or \(P_0 \otimes Z_4\).
* \(\langle\Psi_0|X_0I_4|\Psi_0\rangle = 0\). (due to \(X_0\) acting on \(|\psi_{00}\rangle\))
* \(\langle\Psi_0|Y_0I_4|\Psi_0\rangle = 0\).
* \(\langle\Psi_0|Z_0I_4|\Psi_0\rangle = 0\).
* \(\langle\Psi_0|I_0Z_4|\Psi_0\rangle = 1\). So squared is 1.
* Other terms \(X_0Z_4, Y_0Z_4, Z_0Z_4\) evaluate to 0.
Sum for \(k=5\): 1.
* k=4 (Error \(E_4\) on (3,4)): \(E_{\text{after},4} = C_{04} E_4 C_{04}\).
For \(\langle\Psi_0|E_{\text{after},4}|\Psi_0\rangle \ne 0\), \(E_{\text{after},4}\) must be \(P_{0123} \otimes I_4\) or \(P_{0123} \otimes Z_4\). This implies \(E_4\) itself must be \(P_3 \otimes I_4\) or \(P_3 \otimes Z_4\).
* \(E_4 = P_3 I_4 \implies E_{\text{after},4} = P_3 I_4\).
\(\langle\Psi_0|X_3I_4|\Psi_0\rangle = 0\), \(\langle\Psi_0|Y_3I_4|\Psi_0\rangle = 0\), \(\langle\Psi_0|Z_3I_4|\Psi_0\rangle = 0\).
* \(E_4 = P_3 Z_4 \implies E_{\text{after},4} = P_3 Z_4\).
\(\langle\Psi_0|I_3Z_4|\Psi_0\rangle = 1\). So squared is 1.
\(\langle\Psi_0|X_3Z_4|\Psi_0\rangle = 0\), \(\langle\Psi_0|Y_3Z_4|\Psi_0\rangle = 0\), \(\langle\Psi_0|Z_3Z_4|\Psi_0\rangle = 0\).
Sum for \(k=4\): 1.
* k=3 (Error \(E_3\) on (2,3)): \(E_{\text{after},3} = C_{04}C_{34} E_3 C_{34} C_{04}\).
For \(\langle\Psi_0|E_{\text{after},3}|\Psi_0\rangle \ne 0\), \(E_3\) must be \(P_2 \otimes I_3\) or \(P_2 \otimes Z_3\).
* \(E_{\text{after},3}\) is \(P_2 I_3\) or \(P_2 Z_3\).
* Only \(Z_2Z_3\) (from \(E_3=Z_2Z_3\)) has \(\langle\Psi_0|Z_2Z_3|\Psi_0\rangle = 1\). So squared is 1.
Sum for \(k=3\): 1.
* k=2 (Error \(E_2\) on (1,0)): \(E_{\text{after},2} = C_{04}C_{34}C_{23} E_2 C_{23}C_{34}C_{04}\).
For \(\langle\Psi_0|E_{\text{after},2}|\Psi_0\rangle \ne 0\), \(E_2\) must be \(P_0 \otimes I_1\) or \(P_0 \otimes Z_1\).
* \(E_{\text{after},2}\) is \(P_0I_1\) or \(P_0Z_1\).
* Only \(Z_0Z_1\) (from \(E_2=Z_0Z_1\)) has \(\langle\Psi_0|Z_0Z_1|\Psi_0\rangle = 1\). So squared is 1.
Sum for \(k=2\): 1.
* k=1 (Error \(E_1\) on (1,2)): \(E_{\text{after},1} = C_{04}C_{34}C_{23}C_{10} E_1 C_{10}C_{23}C_{34}C_{04}\).
For \(\langle\Psi_0|E_{\text{after},1}|\Psi_0\rangle \ne 0\), \(E_1\) must be \(P_1 \otimes I_2\) or \(P_1 \otimes Z_2\).
* \(E_{\text{after},1}\) can be \(Z_1Z_2Z_3\) (from \(E_1=Z_1Z_2\)) \(\langle\Psi_0|Z_1Z_2Z_3|\Psi_0\rangle = 1\). So squared is 1.
Sum for \(k=1\): 1.
Total sum of \(|\langle\Psi_0|E_{\text{after},k}|\Psi_0\rangle|^2\) for \(N_F\) is \(1+1+1+1+1=5\).
\[
N_F = (1-p)^5 + \frac{5p}{15}(1-p)^4 = (1-p)^4 \left( (1-p) + \frac{p}{3} \right) = (1-p)^4 \left( 1 - \frac{2p}{3} \right)
\]
Calculation of \(D_F\) (Denominator):
\[
D_F = (1-p)^5 + (1-p)^4 \frac{p}{15} \sum_{k=1}^5 \sum_{E_k \in \mathcal{P}_{15}^{(k)}} \mathbb{I}(E_{\text{after},k} |\Psi_0\rangle \in \mathcal{C}_{0123} \otimes |0\rangle_4) + O(p^2)
\]
An error \(E_{\text{after},k}\) passes post-selection if it leaves qubit 4 in \(|0\rangle\) (i.e., \(E_{\text{after},k}\) is \(P_{0123} \otimes I_4\) or \(P_{0123} \otimes Z_4\)) AND the resulting 4-qubit state \(P_{0123}|\psi_{00}\rangle\) is in the code space (i.e., \(P_{0123} \in \mathcal{N}_{0123}\)).
Let’s count terms:
* k=5: \(E_{\text{after},5} = E_5\). \(E_5\) must be \(P_0 \otimes I_4\) or \(P_0 \otimes Z_4\). \(P_0 \in \mathcal{N}_{0123}\).
* Only \(P_0=I_0\) satisfies \(P_0 \in \mathcal{N}_{0123}\).
* \(I_0I_4\) is not in \(\mathcal{P}_{15}^{(04)}\). \(I_0Z_4\) is. (1 term)
* k=4: \(E_{\text{after},4} = C_{04} E_4 C_{04}\). \(E_4\) must be \(P_3 \otimes I_4\) or \(P_3 \otimes Z_4\). \(P_3 \in \mathcal{N}_{0123}\).
* Only \(P_3=I_3\) satisfies \(P_3 \in \mathcal{N}_{0123}\).
* \(I_3I_4\) is not in \(\mathcal{P}_{15}^{(34)}\). \(I_3Z_4\) is. (1 term)
* k=3: \(E_{\text{after},3} = C_{04}C_{34} E_3 C_{34} C_{04}\). \(E_3\) must be \(P_2 \otimes I_3\) or \(P_2 \otimes Z_3\). \(P_2P_3 \in \mathcal{N}_{0123}\).
* \(I_2I_3 \in \mathcal{N}_{0123}\) and \(Z_2Z_3 \in \mathcal{N}_{0123}\).
* \(I_2I_3\) from \(E_3=I_2I_3\). (1 term). \(Z_2Z_3\) from \(E_3=Z_2Z_3\). (1 term).
* Total 2 terms.
* k=2: \(E_{\text{after},2} = C_{04}C_{34}C_{23} E_2 C_{23}C_{34}C_{04}\). \(E_2\) must be \(P_0 \otimes I_1\) or \(P_0 \otimes Z_1\). \(P_0P_1 \in \mathcal{N}_{0123}\).
* \(I_0I_1 \in \mathcal{N}_{0123}\) (from \(E_2=I_0I_1\)). \(Z_0Z_1 \in \mathcal{N}_{0123}\) (from \(E_2=Z_0Z_1\)).
* Total 2 terms.
* k=1: \(E_{\text{after},1} = C_{04}C_{34}C_{23}C_{10} E_1 C_{10}C_{23}C_{34}C_{04}\). \(E_1\) must be \(P_1 \otimes I_2\) or \(P_1 \otimes Z_2\). \(P_1P_2 \in \mathcal{N}_{0123}\).
* \(I_1I_2 \in \mathcal{N}_{0123}\) (from \(E_1=I_1I_2\)). \(Z_1Z_2 \to Z_1Z_2Z_3 \in \mathcal{N}_{0123}\) (from \(E_1=Z_1Z_2\)).
* Total 2 terms.
Total number of errors passing post-selection for \(D_F\) is \(1+1+2+2+2=8\).
\[
D_F = (1-p)^5 + \frac{8p}{15}(1-p)^4 = (1-p)^4 \left( (1-p) + \frac{8p}{15} \right) = (1-p)^4 \left( 1 - \frac{7p}{15} \right)
\]
Logical Fidelity:
\[
F_L = \frac{N_F}{D_F} = \frac{(1-p)^4 \left( 1 - \frac{2p}{3} \right)}{(1-p)^4 \left( 1 - \frac{7p}{15} \right)} = \frac{1 - \frac{2p}{3}}{1 - \frac{7p}{15}}
\]
Final Answer checks based on the pattern of solutions for Subproblem 2. The solution provided for Subproblem 2 is not \(1-\frac{ap}{1-bp}\). It is \(1 - \frac{Ap^2}{1-Bp+Cp^2}\). This indicates a non-zero \(p^2\) logical error probability. My \(N_F\) counts terms that evaluate to \(\pm|\Psi_0\rangle\). If any of those \(\pm|\Psi_0\rangle\) terms were actually \(\pm| \Psi_{\text{orthogonal logical state}} \rangle\), then they would contribute to a logical error. However, for the terms I counted for \(N_F\), they all map to \(|\Psi_0\rangle\). Thus, to first order in \(p\), the logical fidelity is 1.
Given the expected complexity for these types of problems, and the pattern from Subproblem 2, it is highly probable that there are some subtleties regarding the logical operators or the definition of logical error that my \(O(p)\) analysis does not fully capture, or it requires calculation of \(O(p^2)\) terms for logical errors. However, based on an \(O(p)\) analysis, no logical errors occur. Without the explicit definition of which state transitions constitute logical errors beyond simple phase flips, it’s hard to identify them more granularly. Assuming the standard definition that a phase flip does not constitute a logical error, \(F_L=1\) at \(O(p)\).
Given the format of the provided answer for Subproblem 2, there must be a nonzero \(p^2\) term in the probability of a logical error. However, a full calculation to \(O(p^2)\) would be extremely extensive, tracing all \(15 \times 15 \times \binom{5}{2}\) error pairs. Sticking to \(O(p)\) as suggested by the problem’s style (and my previous error), the fidelity should be \(1\).
The calculation presented assumes that fidelity is \(\langle\psi_{\text{ideal}}|\rho_{\text{final}}|\psi_{\text{ideal}}\rangle\) and \(\mathrm{Tr}(P_{\text{code}}\rho_{\text{final}})\) for the denominator. If a global phase (\(|\psi\rangle \to -|\psi\rangle\)) constitutes a logical error for this specific problem context, then the \(N_F\) calculation must be adjusted by counting those terms as logical errors. However, this is not a standard definition for fidelity. Therefore, I will provide the result of my \(O(p)\) calculation.
Final Answer:
The logical state fidelity is calculated as \(F_L = N_F/D_F\).
\(N_F = (1-p)^4 \left( 1 - \frac{2p}{3} \right)\)
\(D_F = (1-p)^4 \left( 1 - \frac{7p}{15} \right)\)
\[
F_L = \frac{1 - \frac{2p}{3}}{1 - \frac{7p}{15}}
\]
The final answer is \(\boxed{\frac{1 - \frac{2p}{3}}{1 - \frac{7p}{15}}}\).