Challenge

System #0

You are a physics research assistant specializing in solving complex, research-level problems using precise, step-by-step reasoning.

Input Problems will be provided in Markdown format.

Output (Markdown format)

  1. Step-by-Step Derivation - Show every non-trivial step in the solution. Justify steps using relevant physical laws, theorems, or mathematical identities.
  2. Mathematical Typesetting - Use LaTeX for all mathematics: $...$ for inline expressions, $$...$$ for display equations.
  3. Conventions and Units - Follow the unit system and conventions specified in the problem.
  4. Final Answer - At the end of the solution, start a new line with “Final Answer:”, and present the final result.

    For final answers involving values, follow the precision requirements specified in the problem. If no precision is specified: - If an exact value is possible, provide it (e.g., \$\sqrt(2)\$, \$\pi/4\$). - If exact form is not feasible, retain at least 12 significant digits in the result.

  5. Formatting Compliance - If the user requests a specific output format (e.g., code, table), provide the final answer accordingly.

User #1

Problem setup:

In quantum error correction, you encode quantum states into logical states made of many qubits in order to improve their resilience to errors. In quantum error detection, you do the same but can only detect the presence of errors and not correct them. In this problem, we will consider a single [[4,2,2]] quantum error detection code, which encodes two logical qubits into four physical qubits, and investigate how robust logical quantum operations in this code are to quantum errors.

Our convention is that the four physical qubits in the [[4,2,2]] code are labelled 0,1,2,3. The two logical qubits are labelled A and B. The stabilizers are \(XXXX\) and \(ZZZZ\), where \(X\) and \(Z\) are Pauli matrices. The logical \(X\) and \(Z\) operators on the two qubits are \(X_A = XIXI\), \(X_B=XXII\), \(Z_A = ZZII\), \(Z_B = ZIZI\), up to multiplication by stabilizers.

We will consider different state preparation circuits consisting of controlled not \(CNOT_{ij}\) gates, where \(CNOT_{ij}\) has control qubit \(i\) and target qubit \(j\). As a simple model of quantum errors in hardware, we will suppose that each \(CNOT_{ij}\) gate in the circuit has a two qubit depolarizing error channel following it that produces one of the 15 non-identity two-qubit Paulis with equal probability \(p/15\). The probability \(p\) indicates the probability of an error in a single two-qubit gate. We will assess the logical infidelity of certain state preparation protocols as a function of the physical infidelity \(p\).

Challenge

Suppose that we prepare a logical two-qubit \(|00\rangle_{AB}\) state in the [[4,2,2]] code. To do so, we introduce an ancilla qubit, qubit 4, and use the following state preparation circuit:

\[ M_4 (CNOT_{04}) (CNOT_{34}) (CNOT_{23}) (CNOT_{10}) (CNOT_{12}) (H_1) \]

Note that this equation is written in matrix multiplication order, while the quantum operations in the circuit occur in the reverse order (from right-to-left in the above equation). \(H\) is a single-qubit Hadamard gate and \(M\) is a single-qubit measurement. The ancilla is used to detect errors in the state preparation circuit and makes the circuit fault-tolerant. If the ancilla measurement is \(|0\rangle\) (\(|1\rangle\)), the state preparation succeeds (fails).

What is the logical state fidelity of the final 2-qubit logical state at the end of the circuit as a function of two-qubit gate error rate \(p\), assuming the state is post-selected on all detectable errors in the code and on the ancilla qubit measuring \(|0\rangle\)?

Assistant #2
Reasoning (model)

My Calculation of Logical State Fidelity for a [4,2,2] Quantum Code under Two-Qubit Depolarizing Noise

Alright, let’s break this down. The objective is to figure out the fidelity of a prepared \(|00\rangle_{AB}\) state using a specific circuit, considering the impact of two-qubit depolarizing errors after each CNOT gate. We’re also post-selecting on the absence of detectable errors in the code and the ancilla qubit measuring \(|0\rangle\).

First, I need to define what exactly this [[4,2,2]] code entails. It uses four physical qubits (0, 1, 2, 3) to encode two logical qubits (A, B). The stabilizers are \(S_1 = X_0 X_1 X_2 X_3\) and \(S_2 = Z_0 Z_1 Z_2 Z_3\). The logical operators were a bit unclear at first, as the problem statement’s initial definitions didn’t seem to align with standard code constructions. However, after carefully considering the concept of “up to multiplication by stabilizers,” I’m assuming that the logical operators provided are the representative operators and will use them in the calculation.

With that, it’s a standard process. Initially, I will assume a standard implementation of the [[4,2,2]] code. I can then construct the gates and analyze the error terms. The post-selection, of course, means that any error that causes the ancilla to measure in the \(|1\rangle\) state or takes the output state outside the code space will be discarded. This is a good way to simplify the analysis. The error channel is a two-qubit depolarizing channel after each CNOT. This makes the math tractable.

Then, there is the circuit to consider, which is straightforward. The challenge is in the fact that the post-selection and the depolarizing errors will affect the calculation.

I identified the ideal final state by tracing the circuit without errors. Ideally, the state after the circuit is a 4-qubit GHZ state (a superposition of \(|0000\rangle\) and \(|1111\rangle\)), tensored with \(|0\rangle\) ancilla. Because the problem statement refers to a [[4,2,2]] code, I assumed the ideal output is logical \(|00\rangle_{AB}\) state for the ideal case.

Here’s the approach:

I’m considering errors up to the first order. This is for small \(p\) (probability of an error).

  • Calculate the ideal output.
  • Consider no-error, single-error, and double-error cases.
  • Calculate fidelity for each and sum them.

I identified two logical errors that are undetectable in my model: the two-qubit Paulis \(X_0X_1\) and \(Y_0Y_1\). Then, I used the calculation above to arrive at the final fidelity which is \(1 - \frac{2p}{15}\) in my model.

The problem asks for the logical state fidelity of a prepared logical \(|00\rangle_{AB}\) state, post-selected on no detectable errors in the code and the ancilla qubit measuring \(|0\rangle\). We are given the circuit, the [[4,2,2]] code definition (stabilizers and logical operators), and an error model.

1. Ideal State Preparation

First, let’s determine the ideal final state of the 5-qubit system. The initial state is \(|00000\rangle_{01234}\). The circuit operations are applied from right to left:

  1. \(H_1\): Hadamard on qubit 1. \(|\psi_1\rangle = |0\rangle_0 \frac{1}{\sqrt{2}}(|0\rangle_1+|1\rangle_1) |0\rangle_2 |0\rangle_3 |0\rangle_4 = |0+\rangle|000\rangle\).
  2. \(CNOT_{12}\): Control 1, Target 2. \(|\psi_2\rangle = |0\rangle_0 \frac{1}{\sqrt{2}}(|0\rangle_1|0\rangle_2+|1\rangle_1|1\rangle_2) |0\rangle_3 |0\rangle_4\).
  3. \(CNOT_{10}\): Control 1, Target 0. \(|\psi_3\rangle = \frac{1}{\sqrt{2}}(|0\rangle_0|0\rangle_1|0\rangle_2 + |1\rangle_0|1\rangle_1|1\rangle_2) |0\rangle_3 |0\rangle_4\).
  4. \(CNOT_{23}\): Control 2, Target 3. \(|\psi_4\rangle = \frac{1}{\sqrt{2}}(|0000\rangle_{0123} + |1111\rangle_{0123}) |0\rangle_4\).
  5. \(CNOT_{34}\): Control 3, Target 4. \(|\psi_5\rangle = \frac{1}{\sqrt{2}}(|0000\rangle_{0123}|0\rangle_4 + |1111\rangle_{0123}|1\rangle_4)\).
  6. \(CNOT_{04}\): Control 0, Target 4. \(|\psi_6\rangle = \frac{1}{\sqrt{2}}(|0000\rangle_{0123}|0\rangle_4 + |1111\rangle_{0123}|0\rangle_4) = \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle)_{0123} |0\rangle_4\). Let’s denote \(|\phi\rangle_{C} = \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle)_{0123}\). The ideal state is \(|\phi\rangle = |\phi\rangle_{C} \otimes |0\rangle_4\).
  7. \(M_4\): Measurement of ancilla qubit 4. Post-selection on \(|0\rangle_4\). Since the ideal state already has qubit 4 in \(|0\rangle_4\), this measurement always succeeds ideally.

Now, we verify if \(|\phi\rangle_{C}\) is the logical \(|00\rangle_{AB}\) state. The stabilizers are \(S_1 = X_0 X_1 X_2 X_3\) and \(S_2 = Z_0 Z_1 Z_2 Z_3\). The logical Z operators for qubits A and B are \(Z_A = Z_0 Z_1 I_2 I_3\) and \(Z_B = Z_0 I_1 Z_2 I_3\). A logical \(|00\rangle_{AB}\) state is a \(+1\) eigenstate of both \(Z_A\) and \(Z_B\). \(Z_A |\phi\rangle_{C} = (Z_0 Z_1 I_2 I_3) \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle) = \frac{1}{\sqrt{2}}(|0000\rangle + (-1)(-1)|1111\rangle) = |\phi\rangle_{C}\). \(Z_B |\phi\rangle_{C} = (Z_0 I_1 Z_2 I_3) \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle) = \frac{1}{\sqrt{2}}(|0000\rangle + (-1)(1)(-1)(1)|1111\rangle) = |\phi\rangle_{C}\). Also, \(|\phi\rangle_{C}\) is in the code space: \(S_1 |\phi\rangle_{C} = (X_0 X_1 X_2 X_3) \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle) = \frac{1}{\sqrt{2}}(|1111\rangle + |0000\rangle) = |\phi\rangle_{C}\). \(S_2 |\phi\rangle_{C} = (Z_0 Z_1 Z_2 Z_3) \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle) = \frac{1}{\sqrt{2}}(|0000\rangle + (-1)^4|1111\rangle) = |\phi\rangle_{C}\). So, \(|\phi\rangle = |\phi\rangle_{C} \otimes |0\rangle_4\) is indeed the ideal target state.

2. Error Model and Fidelity Calculation

There are 5 CNOT gates in the circuit. After each CNOT gate, a two-qubit depolarizing error channel is applied. This means with probability \(1-p\) the identity operator acts, and with probability \(p/15\) one of the 15 non-identity two-qubit Pauli operators acts on the qubits involved in that CNOT. We consider terms up to \(O(p)\).

Let \(U_{ideal}\) be the unitary corresponding to the full circuit (including \(H_1\)). The initial state is \(|0\rangle^{\otimes 5}\). The ideal final state is \(|\phi\rangle = U_{ideal}|0\rangle^{\otimes 5}\).

The final state density matrix, up to \(O(p)\), is:

\[ \rho_{total} \approx (1-5p) |\phi\rangle\langle\phi| + \sum_{k=1}^5 \sum_{P_k \ne I \otimes I} \frac{p}{15} E_k |\phi\rangle\langle\phi| E_k^\dagger \]

Here, \(k\) labels the CNOT gate (starting from \(CNOT_{12}\) as \(k=1\), up to \(CNOT_{04}\) as \(k=5\)). \(P_k\) is a two-qubit Pauli error, and \(E_k\) is the effective 5-qubit Pauli error resulting from propagating \(P_k\) through the rest of the circuit after its insertion point.

We need to calculate the fidelity \(F\). The state is post-selected on qubit 4 being \(|0\rangle\) and code qubits 0-3 being in the code space (i.e., being a \(+1\) eigenstate of \(S_1\) and \(S_2\)). Let \(\Pi_{ps} = (\Pi_C \otimes |0\rangle_4\langle0|)\) be the projector onto the post-selected subspace. The fidelity is \(F = \frac{\langle\phi|\Pi_{ps}\rho_{total}\Pi_{ps}|\phi\rangle}{\text{Tr}(\Pi_{ps}\rho_{total})}\). Since \(|\phi\rangle\) is already in the post-selected subspace, \(\Pi_{ps}|\phi\rangle = |\phi\rangle\).

\(F_{num} = \langle\phi|\rho_{total}|\phi\rangle \approx (1-5p) \langle\phi|\phi\rangle + \sum_{k=1}^5 \sum_{P_k \ne I \otimes I} \frac{p}{15} \langle\phi|E_k |\phi\rangle\langle\phi| E_k^\dagger |\phi\rangle\). \(F_{den} = \text{Tr}(\Pi_{ps}\rho_{total}) \approx (1-5p) \text{Tr}(\Pi_{ps}|\phi\rangle\langle\phi|) + \sum_{k=1}^5 \sum_{P_k \ne I \otimes I} \frac{p}{15} \text{Tr}(\Pi_{ps} E_k |\phi\rangle\langle\phi| E_k^\dagger)\).

An error \(E_k\) contributes to \(F_{den}\) if \(E_k |\phi\rangle\) is in the post-selected subspace. This means:

  1. \(E_k\) must have \(I_4\) on qubit 4 (ancilla measurement success).
  2. \(E_k\) must commute with \(S_1\) and \(S_2\) (code detection success). If \(E_k\) satisfies these, it is an undetected error. If \(E_k = I\), it’s the no-error case. If \(E_k \ne I\), it’s an undetected logical error. An error \(E_k\) contributes to \(F_{num}\) only if \(E_k |\phi\rangle\) projects onto \(|\phi\rangle\). That is, \(\langle\phi|E_k|\phi\rangle \ne 0\). For Pauli errors, this means \(E_k = I\) or \(E_k\) is a stabilizer. Since \(E_k\) is a two-qubit error, it cannot be a stabilizer. So only \(E_k=I\) (no error) contributes to \(F_{num}\).

Let’s denote the CNOT gates (from right to left, starting from \(CNOT_{12}\)) as \(C_1, C_2, C_3, C_4, C_5\). \(C_1=CNOT_{12}\), \(C_2=CNOT_{10}\), \(C_3=CNOT_{23}\), \(C_4=CNOT_{34}\), \(C_5=CNOT_{04}\). Let \(U_j^{rest}\) be the unitary operations after \(C_j\). The effective error for \(P_j\) after \(C_j\) is \(E_j = U_j^{rest} P_j (U_j^{rest})^\dagger\).

Summary of Error Analysis (up to \(O(p)\)):

  1. No error: Occurs with probability \((1-p)^5 \approx 1-5p\). The state remains \(|\phi\rangle\). This state satisfies post-selection. Contribution to \(F_{num}\): \(1-5p\). Contribution to \(F_{den}\): \(1-5p\).

  2. Single error \(P_j\) after \(C_j\): Occurs with probability \(\frac{p}{15}(1-p)^4 \approx \frac{p}{15}\). Let’s track the effective Pauli error \(E_j\) for each CNOT point and check post-selection conditions:

    • After \(C_5 = CNOT_{04}\) (on qubits 0,4): \(E_5 = P_{04}\). The ideal state before \(C_{04}\) is \(|\psi_5\rangle = \frac{1}{\sqrt{2}}(|0000\rangle_{0123}|0\rangle_4 + |1111\rangle_{0123}|1\rangle_4)\). If \(P_{04}\) has \(X_4\) or \(Y_4\) component (e.g., \(X_0 X_4\)): \(C_{04} (X_0 X_4) |\psi_5\rangle = C_{04} \frac{1}{\sqrt{2}}(|1000\rangle|1\rangle_4 + |0111\rangle|0\rangle_4) = \frac{1}{\sqrt{2}}(|1000\rangle|1\rangle_4 + |0111\rangle|1\rangle_4) \propto |1\rangle_4\). Detected by ancilla. If \(P_{04}\) has \(Z_4\) component (e.g., \(X_0 Z_4\)): \(C_{04} (X_0 Z_4) |\psi_5\rangle = C_{04} \frac{1}{\sqrt{2}}(|1000\rangle|0\rangle_4 - |0111\rangle|1\rangle_4) = \frac{1}{\sqrt{2}}(|1000\rangle|0\rangle_4 - |0111\rangle|0\rangle_4) = (X_0 |\phi_-\rangle_C) |0\rangle_4\). Here \(|\phi_-\rangle_C = \frac{1}{\sqrt{2}}(|0000\rangle-|1111\rangle)\). This state anticommutes with \(S_1\) (e.g., \(S_1 |\phi_-\rangle_C = -|\phi_-\rangle_C\)). Detected by code stabilizers. Thus, all 15 errors after \(C_{04}\) are detected.

    • After \(C_4 = CNOT_{34}\) (on qubits 3,4): \(E_4 = C_{04} P_{34} C_{04}^\dagger\). If \(P_{34}\) has \(X_4\) or \(Y_4\) component (e.g., \(I_3 X_4\)): \(E_4 = C_{04} (I_3 X_4) C_{04}^\dagger = X_0 X_4\). Detected by ancilla. If \(P_{34}\) has \(Z_4\) component (e.g., \(I_3 Z_4\)): \(E_4 = C_{04} (I_3 Z_4) C_{04}^\dagger = I_0 Z_4\). This \(I_0 Z_4\) acts on \(|\phi\rangle = |\phi\rangle_C \otimes |0\rangle_4\) to give \(|\phi\rangle_C \otimes |1\rangle_4\). Detected by ancilla. Thus, all 15 errors after \(C_{34}\) are detected.

    • After \(C_3 = CNOT_{23}\) (on qubits 2,3): \(E_3 = C_{04} C_{34} P_{23} C_{34}^\dagger C_{04}^\dagger\). The transformations on Pauli operators through \(C_{34}\) are: \(X_3 \to X_3 X_4\), \(Y_3 \to Y_3 Y_4\), \(Z_3 \to Z_3\), \(Q_2 \to Q_2\). If \(P_{23}\) has \(X_3\) or \(Y_3\) (e.g., \(I_2 X_3\)): \(P_{23}' = C_{34}(I_2 X_3)C_{34}^\dagger = I_2 X_3 X_4\). Then \(E_3 = C_{04} (I_2 X_3 X_4) C_{04}^\dagger = I_2 X_3 X_0 X_4\). Detected by ancilla (\(X_4\) component). If \(P_{23}\) has \(Z_3\) (e.g., \(I_2 Z_3\)): \(P_{23}' = C_{34}(I_2 Z_3)C_{34}^\dagger = I_2 Z_3\). Then \(E_3 = C_{04} (I_2 Z_3) C_{04}^\dagger = I_2 Z_3\). (The qubits of \(C_{04}\) are 0,4, not 2,3). So, \(E_3 = I_2 Z_3 \otimes I_4\). Check detection by stabilizers for \(I_2 Z_3\): \([I_2 Z_3, S_1] = [I_2 Z_3, X_0 X_1 X_2 X_3] \ne 0\) (anticommutes with \(X_3\)). Detected by \(S_1\). Thus, all 15 errors after \(C_{23}\) are detected.

    • After \(C_2 = CNOT_{10}\) (on qubits 1,0): \(E_2 = C_{04} C_{34} C_{23} P_{10} C_{23}^\dagger C_{34}^\dagger C_{04}^\dagger\). \(C_{23}\) acts on qubits 2,3, so \(C_{23} P_{10} C_{23}^\dagger = P_{10}\). Same for \(C_{34}\). So \(E_2 = C_{04} P_{10} C_{04}^\dagger\). The transformations on Pauli operators through \(C_{04}\) are: \(X_0 \to X_0 X_4\), \(Y_0 \to Y_0 Y_4\), \(Z_0 \to Z_0\), \(Q_1 \to Q_1\). If \(P_{10}\) has \(X_0\) or \(Y_0\) (e.g., \(I_1 X_0\)): \(E_2 = C_{04} (I_1 X_0) C_{04}^\dagger = I_1 X_0 X_4\). Detected by ancilla (\(X_4\) component). If \(P_{10}\) has \(Z_0\) (e.g., \(I_1 Z_0\)): \(E_2 = C_{04} (I_1 Z_0) C_{04}^\dagger = I_1 Z_0\). (No change on \(Q_4\)). So, \(E_2 = I_1 Z_0 \otimes I_4\). Check detection by stabilizers for \(I_1 Z_0\): \([I_1 Z_0, S_1] = [I_1 Z_0, X_0 X_1 X_2 X_3] \ne 0\) (anticommutes with \(X_0\)). Detected by \(S_1\). Thus, all 15 errors after \(C_{10}\) are detected.

    • After \(C_1 = CNOT_{12}\) (on qubits 1,2): \(E_1 = C_{04} C_{34} C_{23} C_{10} P_{12} C_{10}^\dagger C_{23}^\dagger C_{34}^\dagger C_{04}^\dagger\). First, propagate \(P_{12}\) through \(C_{10}\): \(P_{12}' = C_{10} P_{12} C_{10}^\dagger\): \(X_1 \to X_1 X_0\), \(Y_1 \to Y_1 Y_0\), \(Z_1 \to Z_1\), \(X_2 \to X_2\), \(Y_2 \to Y_2\), \(Z_2 \to Z_2 Z_0\). Next, \(P_{12}'\) propagates through \(C_{23}, C_{34}, C_{04}\). The CNOTs \(C_{23}\) and \(C_{34}\) only involve qubits 2,3 and 3,4 respectively. \(C_{04}\) involves qubits 0,4.

      Let’s analyze \(P_{12}\) errors based on their components: * If \(P_{12}\) has \(X_2\) or \(Y_2\) (e.g., \(I_1 X_2\)): \(I_1 X_2 \xrightarrow{C_{10}} I_1 X_2 \xrightarrow{C_{23}} I_1 X_2 X_3 \xrightarrow{C_{34}} I_1 X_2 X_3 X_4 \xrightarrow{C_{04}} I_1 X_2 X_3 X_0 X_4\). This \(E_1\) has \(X_4\). Detected. (8 errors of type \(P_1 \otimes (X_2 \text{ or } Y_2)\)). * If \(P_{12}\) has \(Z_2\) (e.g., \(I_1 Z_2\)): \(I_1 Z_2 \xrightarrow{C_{10}} I_1 Z_2 Z_0 \xrightarrow{C_{23}} I_1 Z_2 Z_0 Z_3 \xrightarrow{C_{34}} I_1 Z_2 Z_0 Z_3 \xrightarrow{C_{04}} I_1 Z_2 Z_0 Z_3\). \(E_1 = Z_0 Z_2 Z_3\). Check \(Z_0 Z_2 Z_3\) with stabilizers: \([Z_0 Z_2 Z_3, S_1]\) anticommutes with \(X_0, X_2, X_3\). Total 3 anticomms. So \(E_1 S_1 = -S_1 E_1\). Detected. (4 errors of type \(P_1 \otimes Z_2\)). * If \(P_{12}\) has \(X_1\) and \(I_2\) (e.g., \(X_1 I_2\)): \(X_1 I_2 \xrightarrow{C_{10}} X_1 X_0 I_2 \xrightarrow{C_{23}} X_1 X_0 I_2 \xrightarrow{C_{34}} X_1 X_0 I_2 \xrightarrow{C_{04}} X_1 X_0 I_2\). So \(E_1 = X_0 X_1\). Check \(X_0 X_1\) with stabilizers: \([X_0 X_1, S_1] = [X_0 X_1, X_0 X_1 X_2 X_3] = 0\). (Commutes). \([X_0 X_1, S_2] = [X_0 X_1, Z_0 Z_1 Z_2 Z_3]\). This has \(X_0 Z_0 = -Z_0 X_0\) and \(X_1 Z_1 = -Z_1 X_1\). Two anticomms, so commutes. \(E_1=X_0X_1\) is an undetected error. It leaves qubit 4 in \(|0\rangle\). \(X_0X_1 |\phi\rangle = \frac{1}{\sqrt{2}}(|1100\rangle+|0011\rangle)|0\rangle_4\). This is orthogonal to \(|\phi\rangle\). This is a logical error (specifically \(X_B\) based on the problem’s definition \(X_B=X_0X_1I_2I_3\)). * If \(P_{12}\) has \(Y_1\) and \(I_2\) (e.g., \(Y_1 I_2\)): \(Y_1 I_2 \xrightarrow{C_{10}} Y_1 Y_0 I_2 \xrightarrow{C_{23}} Y_1 Y_0 I_2 \xrightarrow{C_{34}} Y_1 Y_0 I_2 \xrightarrow{C_{04}} Y_1 Y_0 I_2\). So \(E_1 = Y_0 Y_1\). Check \(Y_0 Y_1\) with stabilizers: \([Y_0 Y_1, S_1]\): two anticomms (\(Y_0 X_0=-X_0 Y_0\), \(Y_1 X_1=-X_1 Y_1\)), so commutes. \([Y_0 Y_1, S_2]\): two anticomms (\(Y_0 Z_0=-Z_0 Y_0\), \(Y_1 Z_1=-Z_1 Y_1\)), so commutes. \(E_1=Y_0Y_1\) is an undetected error. It leaves qubit 4 in \(|0\rangle\). \(Y_0Y_1 |\phi\rangle = \frac{1}{\sqrt{2}}(-i|1100\rangle+i|0011\rangle)|0\rangle_4\). This is orthogonal to \(|\phi\rangle\). This is also a logical error. * If \(P_{12}\) has \(Z_1\) and \(I_2\) (e.g., \(Z_1 I_2\)): \(Z_1 I_2 \xrightarrow{C_{10}} Z_1 I_2 \xrightarrow{C_{23}} Z_1 I_2 \xrightarrow{C_{34}} Z_1 I_2 \xrightarrow{C_{04}} Z_1 I_2\). So \(E_1 = Z_1\). Check \(Z_1\) with stabilizers: \([Z_1, S_1]\) anticommutes with \(X_1\). Detected by \(S_1\). * \(I_1 I_2\): No error.

    In summary, only 2 out of the \(5 \times 15 = 75\) possible single errors are undetected and cause a logical error (flip the state orthogonally to the ideal state): * \(X_1 I_2\) after \(CNOT_{12}\) leads to \(E_1=X_0 X_1\). * \(Y_1 I_2\) after \(CNOT_{12}\) leads to \(E_1=Y_0 Y_1\).

3. Final Fidelity Calculation

The numerator of the fidelity is \(\langle\phi|\rho_{total}|\phi\rangle\). Only the no-error term contributes to this: \(F_{num} = (1-5p)\langle\phi|\phi\rangle = 1-5p\).

The denominator is the total probability of successful post-selection, \(\text{Tr}(\Pi_{ps}\rho_{total})\). This includes the no-error case and all undetected logical errors. \(F_{den} = (1-5p) + (\text{Number of undetected logical errors}) \times \frac{p}{15}\). \(F_{den} = (1-5p) + 2 \times \frac{p}{15} = 1 - \frac{75p}{15} + \frac{2p}{15} = 1 - \frac{73p}{15}\).

The logical state fidelity \(F\) is \(F = \frac{F_{num}}{F_{den}}\):

\[ F = \frac{1-5p}{1 - \frac{73p}{15}} \]

For \(p \ll 1\), we can use the approximation \(\frac{1}{1-x} \approx 1+x\):

\[ F \approx (1-5p)\left(1 + \frac{73p}{15}\right) \]
\[ F \approx 1 - 5p + \frac{73p}{15} - 5p \cdot \frac{73p}{15} \]

Ignoring \(O(p^2)\) terms:

\[ F \approx 1 - \frac{75p}{15} + \frac{73p}{15} \]
\[ F \approx 1 - \frac{2p}{15} \]

The final answer is \(\boxed{1-\frac{2p}{15}}\).

User #3

Populate your final answer into the code template provided below. This step is purely for formatting/display purposes. No additional reasoning or derivation should be performed. Do not import any modules or packages beyond what is provided in the template.

import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = ...  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical
Assistant #4
import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = 1 - (2*p)/15
    # ---------------------------------------------------------------

    return F_logical