Checkpoint-3

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\).

Checkpoints

Checkpoint 1

Suppose that we wish to prepare a logical two-qubit GHZ state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\) in the [[4,2,2]] code. To do so, we use the following state preparation circuit:

\[ (CNOT_{03}) (H_0) (CNOT_{21}) (H_2). \]

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.

What is the physical state fidelity of the final physical 4-qubit state at the end of the circuit as a function of the two-qubit gate error rate \(p\)?

Assistant #2
Reasoning (model)

The Problem of Quantum Error Correction

My task is to delve into the realm of quantum error correction using the [4,2,2] code. This involves understanding how to protect two logical qubits, A and B, encoded into four physical qubits labeled 0, 1, 2, and 3. The code’s distance of two implies the ability to detect single-qubit errors.

The code’s structure is defined by the following: * Stabilizers: * \(S_1 = X_0X_1X_2X_3\) (XXXX) * \(S_2 = Z_0Z_1Z_2Z_3\) (ZZZZ) * Logical Operators: * \(X_A = X_0I_1X_2I_3\) (XIXI) * \(X_B = X_0X_1I_2I_3\) (XXII) * \(Z_A = Z_0Z_1I_2I_3\) (ZZII) * \(Z_B = Z_0I_1Z_2I_3\) (ZIZI)

The objective is to prepare a two-qubit logical GHZ state: \(|\psi_L\rangle = \frac{1}{\sqrt{2}}(|00\rangle_{AB} + |11\rangle_{AB})\).

State Preparation

The circuit to prepare this state is defined by \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\). Starting from the initial state \(|0000\rangle\), I traced the state through each gate operation. I checked the ideal state and verified it to be a logical GHZ state.

The GHZ state is a simultaneous +1 eigenstate of \(Z_A Z_B\) and \(X_A X_B\) and belongs to the codespace of the code.

Error Model and Fidelity

The error model states that each CNOT gate is followed by a two-qubit depolarizing error channel \(\mathcal{E}_{ij}\). This depolarizing channel acts as a sum of Pauli error operators: \(\mathcal{E}_{ij}(\rho) = (1-p) \rho + p \sum_{P \in \{I,X,Y,Z\}^{\otimes 2} \setminus \{II\}} \frac{1}{15} P \rho P^\dagger\). My main goal is to calculate the physical state fidelity, which is \(F = \langle \psi_{ideal} | \rho_{final} | \psi_{ideal} \rangle\), as a function of the error probability \(p\).

The ideal final state, \(|\psi_{ideal}\rangle\), can be obtained by applying the state-preparation circuit U to the initial state, \(|0000\rangle\).

Deriving the Final Fidelity

By tracking the effects of the circuit and the error channels, I derived the following expression for the final fidelity:

\(F = (1-p)^2 + \frac{6 p(1-p)}{15} + \frac{9 p^2}{225}\)

Using some Pauli algebra with the stabilizer elements of the ideal state, I simplified this result:

\(F = (1 - \frac{4}{5}p)^2\)

This is the central result that describes the fidelity, with the error model, and how the quality of the state is degraded, in this particular error correction problem.

Step-by-Step Derivation

1. Determine the ideal final state

The circuit consists of the sequence of operations \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\) applied to the initial state \(|\psi_{init}\rangle = |0000\rangle\). The operations are applied from right to left.

  1. Initial state: \(|\psi_0\rangle = |0000\rangle\).
  2. Apply \(H_2\) (Hadamard on qubit 2):
\[ |\psi_1\rangle = H_2 |\psi_0\rangle = |00\rangle \otimes \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)_2 \otimes |0\rangle_3 = \frac{1}{\sqrt{2}}(|0000\rangle + |0010\rangle) \]
  1. Apply \(CNOT_{21}\) (control on 2, target on 1): This gate flips qubit 1 if qubit 2 is \(|1\rangle\).
\[ |\psi_2\rangle = CNOT_{21} |\psi_1\rangle = \frac{1}{\sqrt{2}}(CNOT_{21}|0000\rangle + CNOT_{21}|0010\rangle) = \frac{1}{\sqrt{2}}(|0000\rangle + |0110\rangle) \]
  1. Apply \(H_0\) (Hadamard on qubit 0):
\[ |\psi_3\rangle = H_0 |\psi_2\rangle = \frac{1}{\sqrt{2}} \left( H_0|0000\rangle + H_0|0110\rangle \right) = \frac{1}{\sqrt{2}} \left( \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)_0|000\rangle + \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)_0|110\rangle \right) \]
\[ |\psi_3\rangle = \frac{1}{2} (|0000\rangle + |1000\rangle + |0110\rangle + |1110\rangle) \]
  1. Apply \(CNOT_{03}\) (control on 0, target on 3): This gate flips qubit 3 if qubit 0 is \(|1\rangle\).
\[ |\psi_{ideal}\rangle = CNOT_{03} |\psi_3\rangle = \frac{1}{2} (CNOT_{03}|0000\rangle + CNOT_{03}|1000\rangle + CNOT_{03}|0110\rangle + CNOT_{03}|1110\rangle) \]
\[ |\psi_{ideal}\rangle = \frac{1}{2} (|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle) \]

This is the pure quantum state produced by the circuit in the absence of errors.

2. Model the circuit with errors

The circuit contains two \(CNOT\) gates, each followed by a two-qubit depolarizing error channel. Let \(C_1 = CNOT_{21}\) and \(C_2 = CNOT_{03}\). The ideal unitaries between the CNOTs are \(U_1 = H_2\) and \(U_2 = H_0\). The error channel after a CNOT gate on qubits \(i,j\) is given by:

\[ \mathcal{E}_{ij}(\rho) = (1-p) \rho + p \sum_{P \in \mathcal{P}_{ij}^*} \frac{1}{15} P \rho P \]

where \(\mathcal{P}_{ij}^*\) is the set of 15 non-identity two-qubit Pauli operators on qubits \(i\) and \(j\).

The evolution of the density matrix \(\rho\) from the initial state \(\rho_0 = |\psi_{init}\rangle\langle\psi_{init}|\) is:

  1. \(\rho_1 = U_1 \rho_0 U_1^\dagger\)
  2. \(\rho_2 = C_1 \rho_1 C_1^\dagger\)
  3. \(\rho_3 = \mathcal{E}_{21}(\rho_2) = (1-p)\rho_2 + \frac{p}{15}\sum_{P_1 \in \mathcal{P}_{21}^*} P_1 \rho_2 P_1\)
  4. \(\rho_4 = U_2 \rho_3 U_2^\dagger\)
  5. \(\rho_5 = C_2 \rho_4 C_2^\dagger\)
  6. \(\rho_{final} = \mathcal{E}_{03}(\rho_5) = (1-p)\rho_5 + \frac{p}{15}\sum_{P_2 \in \mathcal{P}_{03}^*} P_2 \rho_5 P_2\)

Let’s express \(\rho_{final}\) in terms of \(|\psi_{ideal}\rangle\). Let \(U_{mid} = C_2 U_2\). The ideal state is \(|\psi_{ideal}\rangle = U_{mid} C_1 U_1 |\psi_{init}\rangle\). The density matrix before the second error channel is:

\[ \rho_5 = U_{mid} \mathcal{E}_{21}(C_1 U_1 \rho_0 U_1^\dagger C_1^\dagger) U_{mid}^\dagger \]
\[ \rho_5 = (1-p) U_{mid} \rho_2 U_{mid}^\dagger + \frac{p}{15}\sum_{P_1} U_{mid} P_1 \rho_2 P_1 U_{mid}^\dagger \]

Since \(\rho_2 = C_1 U_1 \rho_0 U_1^\dagger C_1^\dagger\), we have \(U_{mid} \rho_2 U_{mid}^\dagger = |\psi_{ideal}\rangle\langle\psi_{ideal}|\). Let \(\tilde{P}_1 = U_{mid} P_1 U_{mid}^\dagger\). Since \(P_1\) acts on qubits {1,2} and \(U_{mid}=CNOT_{03}H_0\) acts on qubits {0,3}, they commute, so \(\tilde{P}_1 = P_1\).

\[ \rho_5 = (1-p) |\psi_{ideal}\rangle\langle\psi_{ideal}| + \frac{p}{15}\sum_{P_1 \in \mathcal{P}_{21}^*} P_1 |\psi_{ideal}\rangle\langle\psi_{ideal}| P_1 \]

Now we apply the second error channel \(\mathcal{E}_{03}\):

\[ \rho_{final} = (1-p)\rho_5 + \frac{p}{15}\sum_{P_2 \in \mathcal{P}_{03}^*} P_2 \rho_5 P_2 \]

Substituting the expression for \(\rho_5\):

\[ \rho_{final} = (1-p)^2 |\psi_{ideal}\rangle\langle\psi_{ideal}| + \frac{p(1-p)}{15}\sum_{P_1} P_1 |\psi_{ideal}\rangle\langle\psi_{ideal}| P_1 + \frac{p(1-p)}{15}\sum_{P_2} P_2 |\psi_{ideal}\rangle\langle\psi_{ideal}| P_2 + \frac{p^2}{15^2}\sum_{P_1,P_2} P_2 P_1 |\psi_{ideal}\rangle\langle\psi_{ideal}| P_1 P_2 \]

3. Calculate the fidelity

The physical state fidelity is \(F = \langle\psi_{ideal}|\rho_{final}|\psi_{ideal}\rangle\). Let \(|\psi\rangle = |\psi_{ideal}\rangle\).

\[ F = (1-p)^2 |\langle\psi|\psi\rangle|^2 + \frac{p(1-p)}{15}\sum_{P_1} |\langle\psi|P_1|\psi\rangle|^2 + \frac{p(1-p)}{15}\sum_{P_2} |\langle\psi|P_2|\psi\rangle|^2 + \frac{p^2}{15^2}\sum_{P_1,P_2} |\langle\psi|P_2 P_1|\psi\rangle|^2 \]

To evaluate the sums, we need to find which Pauli operators have non-zero expectation value with respect to \(|\psi\rangle\). A Pauli operator \(P\) has a non-zero expectation value \(\langle\psi|P|\psi\rangle\) only if \(|\psi\rangle\) is an eigenstate of \(P\). Since \(|\psi\rangle\) is a stabilizer state, this means \(P\) must be an element of the stabilizer group \(\mathcal{S}_\psi\) of \(|\psi\rangle\) (or \(-P \in \mathcal{S}_\psi\)). For such a \(P\), \(|\langle\psi|P|\psi\rangle|^2=1\). Otherwise, it is 0.

4. Determine the stabilizer group of the ideal state

The state \(|\psi\rangle = \frac{1}{2} (|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\) is a logical GHZ state in the [[4,2,2]] code. It is stabilized by the code’s stabilizers \(S_1=XXXX\) and \(S_2=ZZZZ\). It is also a logical Bell state, so it is an eigenstate of \(X_A X_B\) and \(Z_A Z_B\). \(X_A X_B = (XIXI)(XXII) = I_0X_1X_2I_3\). \(Z_A Z_B = (ZZII)(ZIZI) = I_0Z_1Z_2I_3\). One can verify that \(|\psi\rangle\) is a +1 eigenstate of both \(IXXI\) and \(IZZI\). The stabilizer group \(\mathcal{S}_\psi\) is generated by \(\langle XXXX, ZZZZ, IXXI, IZZI \rangle\). A simpler set of generators can be found: * \(g_1 = (XXXX)(IXXI) = X_0 I_1 I_2 X_3 = X_0X_3\) * \(g_2 = (ZZZZ)(IZZI) = Z_0 I_1 I_2 Z_3 = Z_0Z_3\) * \(g_3 = I_0 X_1 X_2 I_3 = X_1X_2\) * \(g_4 = I_0 Z_1 Z_2 I_3 = Z_1Z_2\) So \(\mathcal{S}_\psi = \langle X_0X_3, Z_0Z_3, X_1X_2, Z_1Z_2 \rangle\). This group consists of Pauli operators that are tensor products of a Pauli on {0,3} and a Pauli on {1,2}. Let \(G_{03} = \langle X_0X_3, Z_0Z_3 \rangle = \{I, X_0X_3, Z_0Z_3, Y_0Y_3\}\) (up to phases). Let \(G_{12} = \langle X_1X_2, Z_1Z_2 \rangle = \{I, X_1X_2, Z_1Z_2, Y_1Y_2\}\) (up to phases). Then \(\mathcal{S}_\psi\) consists of products of elements from \(G_{03}\) and \(G_{12}\).

5. Evaluate the sums

  • Sum over \(P_1 \in \mathcal{P}_{21}^*\): \(P_1\) acts on qubits {1,2}. We need to count how many non-identity Paulis on {1,2} are in \(\mathcal{S}_\psi\). These are the non-identity elements of \(G_{12}\): \(X_1X_2\), \(Z_1Z_2\), and \(Y_1Y_2\). There are 3 such operators.
\[ \sum_{P_1 \in \mathcal{P}_{21}^*} |\langle\psi|P_1|\psi\rangle|^2 = 1+1+1 = 3 \]
  • Sum over \(P_2 \in \mathcal{P}_{03}^*\): \(P_2\) acts on qubits {0,3}. We need to count how many non-identity Paulis on {0,3} are in \(\mathcal{S}_\psi\). These are the non-identity elements of \(G_{03}\): \(X_0X_3\), \(Z_0Z_3\), and \(Y_0Y_3\). There are 3 such operators.
\[ \sum_{P_2 \in \mathcal{P}_{03}^*} |\langle\psi|P_2|\psi\rangle|^2 = 1+1+1 = 3 \]
  • Sum over \(P_1 \in \mathcal{P}_{21}^*\) and \(P_2 \in \mathcal{P}_{03}^*\): The product \(P_2P_1\) is in \(\mathcal{S}_\psi\) if and only if \(P_1\) is one of the 3 non-identity elements in \(G_{12}\) and \(P_2\) is one of the 3 non-identity elements in \(G_{03}\). This gives \(3 \times 3 = 9\) pairs \((P_1, P_2)\).
\[ \sum_{P_1,P_2} |\langle\psi|P_2 P_1|\psi\rangle|^2 = 9 \]

6. Combine the terms to find the final fidelity

Substitute the values of the sums into the expression for \(F\):

\[ F = (1-p)^2 + \frac{p(1-p)}{15}(3) + \frac{p(1-p)}{15}(3) + \frac{p^2}{15^2}(9) \]
\[ F = (1-p)^2 + \frac{6p(1-p)}{15} + \frac{9p^2}{225} \]
\[ F = (1-p)^2 + \frac{2p(1-p)}{5} + \frac{p^2}{25} \]

Now, expand and simplify the polynomial in \(p\):

\[ F = (1 - 2p + p^2) + \left(\frac{2}{5}p - \frac{2}{5}p^2\right) + \frac{1}{25}p^2 \]
\[ F = 1 + \left(-2 + \frac{2}{5}\right)p + \left(1 - \frac{2}{5} + \frac{1}{25}\right)p^2 \]
\[ F = 1 - \frac{8}{5}p + \left(\frac{25 - 10 + 1}{25}\right)p^2 \]
\[ F = 1 - \frac{8}{5}p + \frac{16}{25}p^2 \]

This expression is a perfect square:

\[ F = \left(1 - \frac{4}{5}p\right)^2 \]

Final Answer: The physical state fidelity of the final 4-qubit state is \(F(p) = \left(1 - \frac{4}{5}p\right)^2\).

User #3

The correct answer is: $ F_{\rm{physical}}=(1-\frac{12}{15}p)^2 $

Now let’s solve the next Checkpoint.

Checkpoint 2

Suppose that we wish to prepare a logical two-qubit GHZ state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\) in the [[4,2,2]] code. To do so, we use the following state preparation circuit:

\[ (CNOT_{03}) (H_0) (CNOT_{21}) (H_2). \]

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.

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

Assistant #4
Reasoning (model)

Recap of My Strategy for Calculating Logical Fidelity

Okay, so I’m tasked with figuring out the logical state fidelity after some post-selection. I’ve already handled the physical fidelity in the first subproblem, so I’ve got that part down. Essentially, what I need to do is incorporate this post-selection step and then determine the fidelity of the final state with the ideal logical state.

Step-by-Step Breakdown:

  1. Post-Selection Mechanics: The post-selection is based on detecting specific errors. My code here is a [[4,2,2]] code, which has stabilizers like XXXX and ZZZZ, meaning I have a subspace that is the codespace, C. The project onto the codespace is \(\Pi_{\mathcal{C}}\). After measuring stabilizers (+1), I project the final state onto the codespace.

  2. State After Post-Selection: After post-selection, I get a new state, \(\rho_{ps} = \frac{\Pi_{\mathcal{C}} \rho_{final} \Pi_{\mathcal{C}}}{\text{Tr}(\Pi_{\mathcal{C}} \rho_{final} \Pi_{\mathcal{C}})}\). I want to calculate the logical fidelity, which is \(\langle\psi_{ideal}| \rho_{ps} |\psi_{ideal}\rangle\).

  3. Logical Fidelity is Simplified: Because the ideal state already lives in the codespace, the formula \(\langle\psi_{ideal}| \rho_{ps} |\psi_{ideal}\rangle = \frac{\langle\psi_{ideal}| \rho_{final} |\psi_{ideal}\rangle}{\text{Tr}(\Pi_{\mathcal{C}} \rho_{final})}\) boils down to \(F_{logical} = \frac{F_{physical}}{P_{success}}\) where \(P_{success} = \text{Tr}(\Pi_{\mathcal{C}} \rho_{final})\). This also means, \(F_{logical} = F_{physical} / P_{success}\).

  4. Calculating Success Probability, P\(_{success}\): This is the most involved part. I need to figure out what the probability is that the system survives post-selection. To do this I needed to classify the effects that the errors and stabilizers play on each other.

  • To figure out \(P_{success}\), I break down the final density matrix \(\rho_{final}\) into a sum of terms based on different Pauli errors.
  • I can also define detectable vs undetectable by the Pauli error and whether or not it commutes. Undetectable means no projection.
  • The math works out where errors that anticommute with stabilizers get projected out. This means that my total probability of success is a product of these two numbers (the sum of the terms that contribute to \(\rho_{final}\) and \(\Pi_\mathcal{C}\))
  1. Putting it all Together: I have \(F_{physical} = (1 - \frac{4}{5}p)^2\) and I worked my way through to get \(P_{success} = 1 - \frac{8}{5}p + \frac{64}{75}p^2\). Therefore \(F_{logical} = \frac{(1 - \frac{4}{5}p)^2}{1 - \frac{8}{5}p + \frac{64}{75}p^2}\) which is my final answer.

Step-by-Step Derivation

1. Define Logical Fidelity with Post-Selection

The logical state fidelity is the fidelity of the final state with the ideal logical state, conditioned on passing the error detection check. The error detection check consists of measuring the code stabilizers, \(S_1 = XXXX\) and \(S_2 = ZZZZ\), and accepting the state only if both measurement outcomes are +1. This corresponds to projecting the final state onto the codespace \(\mathcal{C}\).

The projector onto the codespace is \(\Pi_{\mathcal{C}} = \frac{1}{4}(I+S_1)(I+S_2)\). The final physical density matrix, derived in Subproblem 1, is \(\rho_{final}\). After the stabilizer measurements, the unnormalized post-selected state is \(\rho'_{ps} = \Pi_{\mathcal{C}} \rho_{final} \Pi_{\mathcal{C}}\). The probability of successfully passing the check is \(P_{success} = \text{Tr}(\rho'_{ps}) = \text{Tr}(\Pi_{\mathcal{C}} \rho_{final})\). The normalized post-selected state is \(\rho_{ps} = \rho'_{ps} / P_{success}\).

The ideal state \(|\psi_{ideal}\rangle = \frac{1}{2} (|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\) is a codeword, so it lies within the codespace, meaning \(\Pi_{\mathcal{C}}|\psi_{ideal}\rangle = |\psi_{ideal}\rangle\).

The logical fidelity is the fidelity of the post-selected state with the ideal state:

\[ F_{logical} = \langle\psi_{ideal}| \rho_{ps} |\psi_{ideal}\rangle = \frac{\langle\psi_{ideal}| \Pi_{\mathcal{C}} \rho_{final} \Pi_{\mathcal{C}} |\psi_{ideal}\rangle}{P_{success}} \]

Using \(\Pi_{\mathcal{C}}|\psi_{ideal}\rangle = |\psi_{ideal}\rangle\), the numerator simplifies to:

\[ \langle\psi_{ideal}| \rho_{final} |\psi_{ideal}\rangle = F_{physical} \]

where \(F_{physical}\) is the physical fidelity calculated in Subproblem 1. Thus, we have:

\[ F_{logical} = \frac{F_{physical}}{P_{success}} \]

From Subproblem 1, we have \(F_{physical} = \left(1 - \frac{4}{5}p\right)^2\). We now need to compute \(P_{success}\).

2. Calculate the Success Probability (\(P_{success}\))

The success probability is \(P_{success} = \text{Tr}(\Pi_{\mathcal{C}} \rho_{final})\). The final density matrix is:

\[ \rho_{final} = (1-p)^2 |\psi\rangle\langle\psi| + \frac{p(1-p)}{15}\sum_{P_1} P_1 |\psi\rangle\langle\psi| P_1 + \frac{p(1-p)}{15}\sum_{P_2} P_2 |\psi\rangle\langle\psi| P_2 + \frac{p^2}{225}\sum_{P_1,P_2} P_2 P_1 |\psi\rangle\langle\psi| P_1 P_2 \]

where \(|\psi\rangle = |\psi_{ideal}\rangle\), \(P_1 \in \mathcal{P}_{21}^*\) (non-identity Paulis on qubits {1,2}), and \(P_2 \in \mathcal{P}_{03}^*\) (non-identity Paulis on qubits {0,3}).

The trace of a generic term \(P|\psi\rangle\langle\psi|P\) is \(\text{Tr}(\Pi_{\mathcal{C}} P|\psi\rangle\langle\psi|P) = \langle\psi|P\Pi_{\mathcal{C}}P|\psi\rangle\). An error operator \(P\) is detectable if it anticommutes with at least one code stabilizer (\(S_1\) or \(S_2\)). If an error \(P\) is detectable, the state \(P|\psi\rangle\) is in an error space orthogonal to the codespace, so \(\Pi_{\mathcal{C}} P|\psi\rangle = 0\). Consequently, for a detectable error \(P\), \(\text{Tr}(\Pi_{\mathcal{C}} P|\psi\rangle\langle\psi|P) = 0\). An error \(P\) is undetectable if it commutes with all code stabilizers. For such a \(P\), the state \(P|\psi\rangle\) remains in the codespace. Thus, \(\text{Tr}(\Pi_{\mathcal{C}} P|\psi\rangle\langle\psi|P) = \text{Tr}(P|\psi\rangle\langle\psi|P) = 1\).

So, to calculate \(P_{success}\), we need to count the number of undetectable errors for each term in \(\rho_{final}\).

  • Classification of single CNOT errors: A two-qubit Pauli \(P_{ij}\) is undetectable if it commutes with both \(S_1=XXXX\) and \(S_2=ZZZZ\). This occurs if \(P_{ij}\) is one of \(\{X_iX_j, Y_iY_j, Z_iZ_j\}\). There are 3 undetectable errors out of 15 non-identity Paulis. The remaining 12 are detectable.

  • Classification of two CNOT errors: An error \(P = P_1P_2\) is undetectable if it commutes with both \(S_1\) and \(S_2\). Since \(P_1\) and \(P_2\) act on disjoint sets of qubits, \(P\) commutes with a stabilizer \(S\) if either both \(P_1, P_2\) commute with \(S\) or both anticommute with \(S\). Let’s classify the 15 errors on a given pair of qubits based on their commutation with \((S_1, S_2)\):

    • Commute with both (C,C): 3 operators (\(\{XX, YY, ZZ\}\))
    • Commute with \(S_1\), anticommute with \(S_2\) (C,A): 4 operators (\(\{IX, XI, YZ, ZY\}\))
    • Anticommute with \(S_1\), commute with \(S_2\) (A,C): 4 operators (\(\{IZ, ZI, XY, YX\}\))
    • Anticommute with both (A,A): 4 operators (\(\{IY, YI, XZ, ZX\}\)) The total number of pairs \((P_1, P_2)\) for which \(P_1P_2\) is undetectable is the sum of products of counts for matching types:
\[ N_{undetect} = N_{CC}^2 + N_{CA}^2 + N_{AC}^2 + N_{AA}^2 = 3^2 + 4^2 + 4^2 + 4^2 = 9 + 16 + 16 + 16 = 57 \]
  • Calculating \(P_{success}\): We sum the probabilities of all events that result in an overall undetectable error.
    1. No error (Identity operator, is undetectable): \((1-p)^2\)
    2. One error on first CNOT, none on second: \(p(1-p) \times \frac{3}{15}\) (3 undetectable errors)
    3. One error on second CNOT, none on first: \((1-p)p \times \frac{3}{15}\) (3 undetectable errors)
    4. Errors on both CNOTs: \(p^2 \times \frac{57}{225}\) (57 undetectable pairs)
\[ P_{success}(p) = (1-p)^2 + \frac{3p(1-p)}{15} + \frac{3p(1-p)}{15} + \frac{57p^2}{225} \]
\[ P_{success}(p) = (1-p)^2 + \frac{6p(1-p)}{15} + \frac{57p^2}{225} \]
\[ P_{success}(p) = (1-2p+p^2) + \frac{2}{5}(p-p^2) + \frac{19}{75}p^2 \]
\[ P_{success}(p) = 1 + (-2+\frac{2}{5})p + (1-\frac{2}{5}+\frac{19}{75})p^2 \]
\[ P_{success}(p) = 1 - \frac{8}{5}p + \left(\frac{75-30+19}{75}\right)p^2 = 1 - \frac{8}{5}p + \frac{64}{75}p^2 \]

3. Final Calculation of Logical Fidelity

Now we combine our results for \(F_{physical}\) and \(P_{success}\).

\[ F_{physical} = \left(1 - \frac{4}{5}p\right)^2 = 1 - \frac{8}{5}p + \frac{16}{25}p^2 \]
\[ F_{logical}(p) = \frac{F_{physical}(p)}{P_{success}(p)} = \frac{1 - \frac{8}{5}p + \frac{16}{25}p^2}{1 - \frac{8}{5}p + \frac{64}{75}p^2} \]

The logical infidelity \(1-F_{logical}\) to leading order in \(p\) is:

\[ 1 - F_{logical} = 1 - \frac{1 - \frac{8}{5}p + \frac{16}{25}p^2}{1 - \frac{8}{5}p + \frac{64}{75}p^2} = \frac{(1 - \frac{8}{5}p + \frac{64}{75}p^2) - (1 - \frac{8}{5}p + \frac{16}{25}p^2)}{1 - \frac{8}{5}p + \frac{64}{75}p^2} \]
\[ 1 - F_{logical} = \frac{(\frac{64}{75} - \frac{16}{25})p^2}{1 - \frac{8}{5}p + \frac{64}{75}p^2} = \frac{(\frac{64-48}{75})p^2}{1 - O(p)} = \frac{16}{75}p^2 + O(p^3) \]

This confirms that logical errors are a second-order effect, as single undetectable errors from one CNOT happen to be stabilizers of the final state and thus cause no logical error.

Final Answer: The logical state fidelity is given by the function:

\[ F_{logical}(p) = \frac{1 - \frac{8}{5}p + \frac{16}{25}p^2}{1 - \frac{8}{5}p + \frac{64}{75}p^2} \]
User #5

The correct answer is: $ F_{\rm{logical}}=1 - \frac{\frac{16}{75}p^2}{1-\frac{8}{5}p + \frac{64}{75}p^2} $

Now let’s solve the next Checkpoint.

Checkpoint 3

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 #6
Reasoning (model)

Analysis of a Quantum Circuit for State Preparation

I’m tasked with analyzing a quantum circuit designed to prepare the logical \(|00\rangle_{AB}\) state using a [[4,2,2]] code, which involves some stabilizer checks and post-selection on an ancilla qubit. I will first understand the ideal circuit, then incorporate the error model and post-selection to calculate the logical state fidelity.

The Ideal Scenario:

  1. Ideal Circuit:

    • Initialize with \(|00000\rangle\), including an ancilla qubit.
    • Apply a Hadamard gate to qubit 1: \(H_1|00000\rangle = |00000\rangle + |10000\rangle\), which will lead to a superposition.
    • Apply CNOT gates.
      • CNOT(1,2), CNOT(1,0), CNOT(2,3), CNOT(3,4), CNOT(0,4)
    • This ideal process results in a state prior to measurement of the ancilla in the Z basis, and prior to our post-selection step on stabilizer checks.
  2. State Verification: Through the CNOT process, I derive that my ideal final data-qubit state is indeed a logical \(|00\rangle_{AB}\) eigenstate. My ideal state is simply the logical \(|00\rangle_{AB}\) combined with the ancilla in state \(|0\rangle\), a good sign.

Error Model and Fidelity Calculation:

  1. Fault Tolerance Analysis: The circuit includes 5 CNOT gates, each of which has a two-qubit depolarizing channel error probability of p. My ultimate goal is to determine fidelity of the state, given that I post-select on ancilla value as well as stabilizer values. I need to calculate the probability of success, Psuccess, given by \(\text{Tr}((\Pi_{\mathcal{C}} \otimes P_0) \rho_{final})\), along with Fphysical, the overlap of the noisy final state with the ideal state, and the ratio of these: Flogical = Fphysical/Psuccess.

  2. Identifying Logical Errors: I am using the standard framework, as this should be fault tolerant: The circuit is designed such that there can be no single error that will lead to a logical error and pass post-selection. This means all single physical errors on the CNOTs are detected. Errors that lead to logical faults must therefore come from pairs of errors. In the ideal case, the system can have at most an \(O(p^2)\) fidelity. In other words, with post-selection, I need to count pairs of errors.

  3. Error Propagation: I will break down each gate and identify all Pauli errors. If the circuit is fault-tolerant, any single error will either fail the ancilla check or fail the stabilizer check.

  4. Logical Errors. To estimate the linear term, I will calculate which Pauli-error(s) will go undetected and cause logical errors.

  • Gate CNOT(1,2): Errors X1X2, Y1Y2. Both are logical errors. (2 errors)
  • Gate CNOT(1,0): Errors X0X1, Y0Y1. (2 logical errors).
  • Gate CNOT(2,3): 0 logical errors.
  • Gate CNOT(3,4): I will include two logical errors \(X_3X_4\), \(Y_3Y_4\). \(I_3Z_4\) causes no logical error. (2 logical errors).
  • Gate CNOT(0,4): \(X_0 \otimes I_4\). \(Y_0 \otimes I_4\). (0 errors).
  1. Calculate Logical Fidelity.

From those results, the logical infidelity is \(1-F_L = \frac{p}{15}N\), meaning linear in error-probability p, where N = 6. Thus the final solution to the problem, given the error model, is that the logical fidelity equals \(1 - \frac{2}{5}p\).

Step-by-Step Derivation

1. Ideal State Preparation

The circuit is \(U = (M_4) (CNOT_{04}) (CNOT_{34}) (CNOT_{23}) (CNOT_{10}) (CNOT_{12}) (H_1)\) applied to the initial state \(|\psi_0\rangle = |0000\rangle \otimes |0\rangle_4\).

  1. \(H_1|00000\rangle = |0\rangle_0 (\frac{|0\rangle+|1\rangle}{\sqrt{2}})_1 |000\rangle_{234}\)
  2. \(CNOT_{12}\) creates entanglement: \(\frac{1}{\sqrt{2}}(|000\rangle+|011\rangle)_{012}|00\rangle_{34}\)
  3. \(CNOT_{10}\) creates more entanglement: \(\frac{1}{\sqrt{2}}(|000\rangle+|111\rangle)_{012}|00\rangle_{34}\)
  4. \(CNOT_{23}\) creates a 4-qubit GHZ state: \(\frac{1}{\sqrt{2}}(|0000\rangle+|1111\rangle)_{0123}|0\rangle_4\). Let’s call the data qubit state \(|\psi_L\rangle = \frac{1}{\sqrt{2}}(|0000\rangle+|1111\rangle)\). This is the logical \(|00\rangle_{AB}\) state.
  5. \(CNOT_{34}\) acts on \(|\psi_L\rangle|0\rangle_4\): \(\frac{1}{\sqrt{2}}(|00000\rangle+|11111\rangle)\).
  6. \(CNOT_{04}\) acts: \(\frac{1}{\sqrt{2}}(CNOT_{04}|00000\rangle + CNOT_{04}|11111\rangle) = \frac{1}{\sqrt{2}}(|00000\rangle+|11110\rangle)\).
  7. The state just before measurement is \(|\Psi_{ideal}\rangle = \frac{1}{\sqrt{2}}(|0000\rangle+|1111\rangle) \otimes |0\rangle_4 = |\psi_L\rangle \otimes |0\rangle_4\).
  8. The measurement \(M_4\) on the ancilla qubit yields \(|0\rangle\) with probability 1. The state of the data qubits remains \(|\psi_L\rangle\).

The ideal final state of the data qubits is \(|\psi_L\rangle = \frac{1}{\sqrt{2}}(|0000\rangle+|1111\rangle)\), which is the logical \(|00\rangle_{AB}\) state. Its stabilizer group is \(\mathcal{S}_L = \langle XXXX, Z_0Z_1, Z_1Z_2, Z_2Z_3 \rangle\).

2. Logical Fidelity and Error Analysis

The logical fidelity under post-selection is \(F_L = F_{phys} / P_{success}\). A single error event occurs with probability \(p\). For small \(p\), the dominant contribution to infidelity comes from single error events. The logical infidelity is \(1 - F_L \approx \frac{p}{15}N_{logical\_err}\), where \(N_{logical\_err}\) is the number of single two-qubit Pauli errors (out of \(15 \times 5 = 75\) possibilities) that cause a logical error.

A single error event causes a logical error if the propagated error operator \(\tilde{P}\) satisfies all of the following conditions:

  1. Undetected by Ancilla: The error does not cause the ancilla to measure \(|1\rangle\). The measurement part of the circuit (\(CNOT_{04}CNOT_{34}\) with ancilla input \(|0\rangle\)) is designed to measure the operator \(Z_0Z_3\) on the data qubits. An error occurring before this block is undetected by the ancilla if it commutes with \(Z_0Z_3\).
  2. Undetected by Code Stabilizers: The error on the data qubits must commute with the code stabilizers \(S_1=XXXX\) and \(S_2=ZZZZ\).
  3. Causes a Logical State Change: The error must not be a stabilizer of the ideal logical state \(|\psi_L\rangle\).

We count the number of such logical errors (\(N_k\)) for each of the 5 CNOT gates.

  • Gate 1: \(CNOT_{12}\) An error \(P_{12}\) is propagated by \(U_{prop} = C_{23}C_{10}\). An error undetectable by code stabilizers must be in the set \(\{X_1X_2, Y_1Y_2, Z_1Z_2\}\).

    • \(P=X_1X_2 \implies \tilde{P} = C_{23}C_{10}X_1X_2C_{10}^\dagger C_{23}^\dagger = C_{23}X_0X_1X_2C_{23}^\dagger = X_0X_1X_2X_3\). This is the stabilizer \(S_1=XXXX\) (up to a phase), which is in \(\mathcal{S}_L\). Not a logical error.
    • \(P=Y_1Y_2 \implies \tilde{P} = X_0Y_1Z_2Y_3\). This anticommutes with \(S_1=XXXX\) and is therefore detected by the stabilizer measurement.
    • \(P=Z_1Z_2\). This propagates to \(\tilde{P}=Z_1Z_2\), which is a stabilizer of the state, \(Z_1Z_2 \in \mathcal{S}_L\). Not a logical error. Thus, \(N_1=0\).
  • Gate 2: \(CNOT_{10}\) An error \(P_{10}\) is propagated by \(U_{prop} = C_{23}\). Undetectable-by-stabilizer errors are \(\{X_0X_1, Y_0Y_1, Z_0Z_1\}\).

    • \(P=X_0X_1 \implies \tilde{P}=X_0X_1\). Commutes with \(Z_0Z_3\) (ancilla check pass). Not in \(\mathcal{S}_L\). This is a logical error.
    • \(P=Y_0Y_1 \implies \tilde{P}=Y_0Y_1\). Commutes with \(Z_0Z_3\). Not in \(\mathcal{S}_L\). This is a logical error.
    • \(P=Z_0Z_1 \implies \tilde{P}=Z_0Z_1\). This is in \(\mathcal{S}_L\). Not a logical error. Thus, \(N_2=2\).
  • Gate 3: \(CNOT_{23}\) No propagation before ancilla measurement, \(\tilde{P}=P_{23}\). Undetectable-by-stabilizer errors are \(\{X_2X_3, Y_2Y_3, Z_2Z_3\}\).

    • \(P=X_2X_3\). Antico with \(Z_0Z_3\). Detected by ancilla.
    • \(P=Y_2Y_3\). Antico with \(Z_0Z_3\). Detected by ancilla.
    • \(P=Z_2Z_3\). Commutes with \(Z_0Z_3\). This is in \(\mathcal{S}_L\). Not a logical error. Thus, \(N_3=0\).
  • Gate 4: \(CNOT_{34}\) An error \(P_{34}\) is propagated by \(C_{04}\). The final error operator on the 5-qubit space is \(\tilde{P} = C_{04} P_{34} C_{04}^\dagger\). The ancilla measurement must be \(|0\rangle\) and the data part of the error must pass stabilizer checks but not be in \(\mathcal{S}_L\).

    • \(P=X_3X_4 \implies \tilde{P}=X_3X_0X_4\). Data part is \(X_0X_3\). Undetectable by stabilizers. Not in \(\mathcal{S}_L\). Logical error.
    • \(P=X_3Y_4 \implies \tilde{P}=X_3Y_0Z_4\). Data part is \(X_3Y_0\). Undetectable by stabilizers. Not in \(\mathcal{S}_L\). Logical error.
    • \(P=Y_3X_4 \implies \tilde{P}=Y_3X_0Z_4\). Data part is \(Y_3X_0\). Undetectable by stabilizers. Not in \(\mathcal{S}_L\). Logical error.
    • \(P=Y_3Y_4 \implies \tilde{P}=Y_3Y_0\). Data part is \(Y_0Y_3\). Undetectable by stabilizers. Not in \(\mathcal{S}_L\). Logical error. (Other errors are either detected or are state stabilizers). Thus, \(N_4=4\).
  • Gate 5: \(CNOT_{04}\) The error \(P_{04}\) occurs at the end. An error \(P_0 \otimes P_4\) is undetectable if \(P_4 \in \{I_4, Z_4\}\) and the data part \(P_0\) is undetectable by stabilizers. However, no single-qubit Pauli error \(P_0\) is undetectable by both \(S_1\) and \(S_2\). Therefore, no error of the form \(P_0 \otimes P_4\) can be a logical error. We need to check two-qubit errors on {0,4}. A detailed check shows none of these survive all checks to become logical errors. For example, for \(P=X_0X_4\), the ancilla flips, detecting the error. For \(P=X_0Z_4\), the data part is \(X_0\), which is detected by stabilizers. Thus, \(N_5=0\).

3. Final Fidelity Calculation

The total count of single-Pauli error events that cause a logical error is:

\[ N_{logical\_err} = N_1 + N_2 + N_3 + N_4 + N_5 = 0 + 2 + 0 + 4 + 0 = 6 \]

The logical infidelity to first order in \(p\) is the probability of one of these events occurring:

\[ 1 - F_L(p) \approx \frac{N_{logical\_err}}{15} p = \frac{6}{15}p = \frac{2}{5}p \]

Therefore, the logical fidelity is:

\[ F_L(p) \approx 1 - \frac{2}{5}p \]

Final Answer: The logical state fidelity of the final 2-qubit logical state is \(F_L(p) = 1 - \frac{2}{5}p + O(p^2)\).

User #7

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 #8
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 - sp.Rational(2, 5) * p
    # ---------------------------------------------------------------

    return F_logical