Checkpoint-2

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)

Problem: Calculating Fidelity of a Noisy GHZ State Preparation

My task is to determine the fidelity of the final four-qubit state after a quantum circuit designed to prepare a logical GHZ state in a [[4,2,2]] quantum error-correcting code. The circuit consists of two CNOT gates, each followed by a two-qubit depolarizing channel with error rate p.

Breakdown of the Problem:

  1. Code and Basics: I start with a four-qubit system (qubits 0, 1, 2, and 3). The stabilizers are defined by \(S_1 = X_0 X_1 X_2 X_3\) and \(S_2 = Z_0 Z_1 Z_2 Z_3\). The logical operators are \(X_A = X_0 I_1 X_2 I_3\), \(X_B = X_0 X_1 I_2 I_3\), \(Z_A = Z_0 Z_1 I_2 I_3\), and \(Z_B = Z_0 I_1 Z_2 I_3\), representing two logical qubits A and B. After careful commutation checks, I’ve confirmed that these logical operators are consistent with the stabilizers and commutation relations.
  2. Target State: The goal is to prepare the logical GHZ state, \(|\Psi_L\rangle = \frac{1}{\sqrt{2}}(|00\rangle_{AB} + |11\rangle_{AB})\). After detailed analysis, I’ve realized that the logical zero state \(|00\rangle_{AB}\) is a simultaneous +1 eigenstate of \(Z_A\), \(Z_B\), and stabilizers \(S_1\), \(S_2\). Consequently, the state \(|\psi_{00}\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle)\), while \(|\psi_{11}\rangle = X_A X_B |\psi_{00}\rangle\). Thus, the target state can be written as \(|\Psi_L\rangle = \frac{1}{\sqrt{2}}(|\psi_{00}\rangle + X_A X_B |\psi_{00}\rangle)\), which leads me to \(|\Psi_{ideal}\rangle = \frac{1}{2} (|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\).
  3. Circuit and State Evolution: The state preparation circuit is given by \(U = CNOT_{03} H_0 CNOT_{21} H_2\). When applied to the initial state \(|0000\rangle\), the circuit ideally generates the ideal state, \(|\Psi_{ideal}\rangle\). I then work out the ideal time evolution of the system.
  4. Error Model: Each CNOT gate is followed by a two-qubit depolarizing channel, represented by \(\mathcal{E}(\rho) = (1-p)\rho + p \sum_{P \in \mathcal{P}_2 \setminus \{II\}} \frac{1}{15} P \rho P^\dagger\). My goal is to calculate the fidelity \(F = \langle\Psi_{ideal}|\rho_f|\Psi_{ideal}\rangle\), where \(\rho_f\) is the final density matrix after the circuit and errors.
  5. Fidelity Calculation: This is the most complex part. I use a step-by-step approach. First, the noisy gate \(C_{21}\) creates the state \(\rho_2\), where the state evolves to \(\mathcal{E}_{21}(\rho_2)\). Then I calculated the expectation value of this in the ideal state. I make use of the fact that the Pauli operators will take the state to an orthogonal state, in most cases, but some leave the state invariant (up to a phase). I also take advantage of the fact that \(U' = C_{03}H_0\), such that the effect of noise and ideal gates commute. I find that this value is equivalent to the state fidelity with the ideal state at the moment the ideal gates are applied: \(1 - \frac{4p}{5}\). The second step follows a similar approach. I end up with the same state fidelity as the previous case.

Final Result: The final fidelity is \(F = (1 - \frac{4p}{5})^2\).

Conclusion: The fidelity decreases quadratically with the error rate p. The reason for this is that for the given logical code, the error operators that change the ideal state (up to a phase) are identical in the first and second stage of noise, such that this

Step-by-Step Derivation

1. Ideal State Preparation

First, let’s determine the ideal final state of the four physical qubits, assuming no errors. The initial state is \(|\psi_{init}\rangle = |0000\rangle\). The circuit applies a sequence of gates: \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\). The state evolves as follows:

  1. Apply \(H_2\): The Hadamard gate on qubit 2 acts on the initial state.
\[ |\psi_1\rangle = H_2 |\psi_{init}\rangle = |00\rangle \otimes \left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}\right)_2 \otimes |0\rangle_3 = \frac{1}{\sqrt{2}}(|0000\rangle + |0010\rangle) \]
  1. Apply \(CNOT_{21}\): The controlled-NOT gate with control qubit 2 and target qubit 1 acts on \(|\psi_1\rangle\).
\[ |\psi_2\rangle = CNOT_{21} |\psi_1\rangle = \frac{1}{\sqrt{2}}(CNOT_{21}|0000\rangle + CNOT_{21}|0010\rangle) \]
The control qubit (2) is $|0\rangle$ for the first term and $|1\rangle$ for the second.
\[ |\psi_2\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0110\rangle) \]
  1. Apply \(H_0\): The Hadamard gate on qubit 0 acts on \(|\psi_2\rangle\).
\[ |\psi_3\rangle = H_0 |\psi_2\rangle = \frac{1}{\sqrt{2}}(H_0|0000\rangle + H_0|0110\rangle) = \frac{1}{\sqrt{2}}\left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}|000\rangle + \frac{|0\rangle+|1\rangle}{\sqrt{2}}|110\rangle\right) \]
\[ |\psi_3\rangle = \frac{1}{2}(|0000\rangle + |1000\rangle + |0110\rangle + |1110\rangle) \]
  1. Apply \(CNOT_{03}\): The final CNOT gate with control qubit 0 and target qubit 3 acts on \(|\psi_3\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) \]
The control qubit (0) is $|0\rangle$ for the first and third terms, and $|1\rangle$ for the second and fourth terms.
\[ |\Psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle) \]

This is the ideal final state of the circuit.

2. Error Model and Fidelity Calculation Strategy

The circuit contains two CNOT gates, each followed by a two-qubit depolarizing error channel. Let’s denote the gates as \(H_2\), \(C_1 = CNOT_{21}\), \(H_0\), \(C_2 = CNOT_{03}\). The error channels are \(\mathcal{E}_1\) on qubits (2,1) and \(\mathcal{E}_2\) on qubits (0,3).

The evolution of the density matrix \(\rho\) is:

  1. \(\rho_0 = |0000\rangle\langle 0000|\).
  2. \(\rho_1 = H_2 \rho_0 H_2^\dagger = |\psi_1\rangle\langle\psi_1|\).
  3. \(\rho_{2,ideal} = C_1 \rho_1 C_1^\dagger = |\psi_2\rangle\langle\psi_2|\).
  4. \(\rho_2 = \mathcal{E}_1(\rho_{2,ideal})\).
  5. \(\rho_3 = H_0 \rho_2 H_0^\dagger\).
  6. \(\rho_{4,ideal} = C_2 \rho_3 C_2^\dagger\).
  7. \(\rho_{final} = \mathcal{E}_2(\rho_{4,ideal})\).

The depolarizing channel on a two-qubit state \(\rho\) is given by:

\[ \mathcal{E}(\rho) = (1-p)\rho + p \sum_{P \in \mathcal{P}_2 \setminus \{II\}} \frac{1}{15} P \rho P^\dagger \]

where \(\mathcal{P}_2\) is the set of 16 two-qubit Pauli operators.

We want to calculate the physical state fidelity \(F = \langle \Psi_{ideal} | \rho_{final} | \Psi_{ideal} \rangle\).

3. Fidelity After the First Noisy Gate

Let’s first calculate the fidelity of the state after the first CNOT and its error channel, followed by the remaining ideal gates. Let this intermediate state be \(\rho' = C_2 H_0 \mathcal{E}_1(C_1 H_2 \rho_0 H_2^\dagger C_1^\dagger) H_0^\dagger C_2^\dagger\). The fidelity with the ideal final state is \(F_1 = \langle \Psi_{ideal} | \rho' | \Psi_{ideal} \rangle\).

Using the cyclic property of the trace and that \(|\Psi_{ideal}\rangle = C_2 H_0 |\psi_2\rangle\), this simplifies to:

\[ F_1 = \langle \psi_2 | \mathcal{E}_1(|\psi_2\rangle\langle\psi_2|) | \psi_2 \rangle \]

where \(|\psi_2\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0110\rangle)\). The error channel \(\mathcal{E}_1\) acts on qubits 2 and 1.

\[ F_1 = (1-p)\langle\psi_2|\psi_2\rangle + \frac{p}{15} \sum_{P \in \mathcal{P}_{21}\setminus\{II\}} \langle\psi_2| P |\psi_2\rangle\langle\psi_2| P^\dagger |\psi_2\rangle \]
\[ F_1 = (1-p) + \frac{p}{15} \sum_{P \in \mathcal{P}_{21}\setminus\{II\}} |\langle\psi_2| P |\psi_2\rangle|^2 \]

The expectation value \(\langle\psi_2| P |\psi_2\rangle\) is non-zero only if \(P\) commutes with all stabilizers of \(|\psi_2\rangle\). The state \(|\psi_2\rangle\) can be written as \(|0\rangle_0 \otimes \frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)_{12} \otimes |0\rangle_3\). The stabilizers of the Bell state on qubits 1 and 2 are \(X_1X_2\) and \(Z_1Z_2\). The stabilizers for the full state are \(S^{(2)} = \langle Z_0, Z_3, X_1X_2, Z_1Z_2 \rangle\).

The Pauli operator \(P\) acts on qubits 1 and 2, so it naturally commutes with \(Z_0\) and \(Z_3\). For the expectation value to be non-zero, \(P\) must also commute with \(X_1X_2\) and \(Z_1Z_2\). The two-qubit Pauli operators on (1,2) that commute with both \(X_1X_2\) and \(Z_1Z_2\) are \(\{II, X_1X_2, Y_1Y_2, Z_1Z_2\}\).

Let’s evaluate the expectation values for the non-identity operators: * \(P = X_1X_2\): \(X_1X_2 |\psi_2\rangle = |0\rangle_0 \otimes X_1X_2 \frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)_{12} \otimes |0\rangle_3 = |\psi_2\rangle\). So \(\langle\psi_2|X_1X_2|\psi_2\rangle = 1\). * \(P = Z_1Z_2\): \(Z_1Z_2 |\psi_2\rangle = |0\rangle_0 \otimes Z_1Z_2 \frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)_{12} \otimes |0\rangle_3 = |\psi_2\rangle\). So \(\langle\psi_2|Z_1Z_2|\psi_2\rangle = 1\). * \(P = Y_1Y_2 = (iX_1Z_1)(iX_2Z_2) = -X_1X_2 Z_1Z_2\). Since \(X_1X_2\) and \(Z_1Z_2\) are stabilizers, \(Y_1Y_2|\psi_2\rangle = -|\psi_2\rangle\). So \(\langle\psi_2|Y_1Y_2|\psi_2\rangle = -1\).

The sum of squared expectation values is:

\[ \sum_{P \in \mathcal{P}_{21}\setminus\{II\}} |\langle\psi_2| P |\psi_2\rangle|^2 = |1|^2 + |1|^2 + |-1|^2 = 3 \]

Substituting this into the expression for \(F_1\):

\[ F_1 = (1-p) + \frac{p}{15}(3) = 1 - p + \frac{p}{5} = 1 - \frac{4p}{5} \]

4. Fidelity After the Second Noisy Gate

The final state is \(\rho_{final} = \mathcal{E}_2(\rho')\), where \(\mathcal{E}_2\) is the error channel on qubits (0,3). The final fidelity is:

\[ F = \langle \Psi_{ideal} | \mathcal{E}_2(\rho') | \Psi_{ideal} \rangle = (1-p)\langle \Psi_{ideal} | \rho' | \Psi_{ideal} \rangle + \frac{p}{15}\sum_{Q \in \mathcal{P}_{03}\setminus\{II\}} \langle \Psi_{ideal} | Q \rho' Q | \Psi_{ideal} \rangle \]

The first term is \((1-p)F_1\). For the second term, we substitute the expression for \(\rho'\).

\[ \rho' = (1-p)|\Psi_{ideal}\rangle\langle\Psi_{ideal}| + \frac{p}{15}\sum_{P \in \mathcal{P}_{21}\setminus\{II\}} P' |\Psi_{ideal}\rangle\langle\Psi_{ideal}| (P')^\dagger \]

where \(P' = C_2 H_0 P H_0^\dagger C_2^\dagger\). Since \(P\) acts on qubits (1,2) and \(C_2 H_0\) acts on (0,3), they commute, so \(P'=P\).

\[ \rho' = (1-p)|\Psi_{ideal}\rangle\langle\Psi_{ideal}| + \frac{p}{15}\sum_{P \in \mathcal{P}_{21}\setminus\{II\}} P |\Psi_{ideal}\rangle\langle\Psi_{ideal}| P^\dagger \]

Now we evaluate the term \(\langle \Psi_{ideal} | Q \rho' Q | \Psi_{ideal} \rangle\):

\[ \langle \Psi_{ideal} | Q \rho' Q | \Psi_{ideal} \rangle = (1-p)|\langle \Psi_{ideal} | Q | \Psi_{ideal} \rangle|^2 + \frac{p}{15}\sum_{P \neq II} |\langle \Psi_{ideal} | Q P | \Psi_{ideal} \rangle|^2 \]

The expectation values are non-zero only if the operators commute with the stabilizers of \(|\Psi_{ideal}\rangle\). The stabilizers of \(|\Psi_{ideal}\rangle\) are \(\mathcal{S} = \langle X_0X_3, Z_0Z_3, X_1X_2, Z_1Z_2 \rangle\).

  • For \(\langle \Psi_{ideal} | Q | \Psi_{ideal} \rangle\) with \(Q \in \mathcal{P}_{03}\setminus\{II\}\): \(Q\) must commute with \(X_0X_3\) and \(Z_0Z_3\). The operators are \(\{X_0X_3, Y_0Y_3, Z_0Z_3\}\). The sum of squares of their expectation values is \(|\langle X_0X_3\rangle|^2 + |\langle Y_0Y_3\rangle|^2 + |\langle Z_0Z_3\rangle|^2 = 1^2+(-1)^2+1^2 = 3\).

  • For \(\langle \Psi_{ideal} | Q P | \Psi_{ideal} \rangle\): The operator \(QP\) must commute with \(\mathcal{S}\). Since \(Q\) acts on (0,3) and \(P\) acts on (1,2), they commute. For \(QP\) to commute with all stabilizers in \(\mathcal{S}\), \(Q\) must commute with the (0,3) stabilizers (\(X_0X_3, Z_0Z_3\)) and \(P\) must commute with the (1,2) stabilizers (\(X_1X_2, Z_1Z_2\)).

    • This gives 3 choices for \(Q \in \mathcal{P}_{03}\setminus\{II\}\).
    • This gives 3 choices for \(P \in \mathcal{P}_{21}\setminus\{II\}\).
    • For each of the \(3 \times 3 = 9\) pairs, \(|\langle \Psi_{ideal} | Q P | \Psi_{ideal} \rangle|^2 = |\langle Q \rangle \langle P \rangle|^2 = (\pm 1)^2(\pm 1)^2 = 1\).
    • So, \(\sum_{Q\neq II}\sum_{P\neq II} |\langle \Psi_{ideal} | Q P | \Psi_{ideal} \rangle|^2 = 9\).

Now, let’s assemble the full expression for the fidelity \(F\):

\[ F = (1-p)F_1 + \frac{p}{15}\sum_{Q \neq II} \left[ (1-p)|\langle Q \rangle|^2 + \frac{p}{15}\sum_{P\neq II} |\langle QP \rangle|^2 \right] \]
\[ F = (1-p)F_1 + \frac{p}{15} \left[ (1-p)\sum_{Q \neq II}|\langle Q \rangle|^2 + \frac{p}{15}\sum_{Q \neq II, P\neq II} |\langle QP \rangle|^2 \right] \]
\[ F = (1-p)F_1 + \frac{p}{15} \left[ (1-p)(3) + \frac{p}{15}(9) \right] \]

Substituting \(F_1 = 1 - 4p/5\):

\[ F = (1-p)\left(1 - \frac{4p}{5}\right) + \frac{3p(1-p)}{15} + \frac{9p^2}{225} \]
\[ F = 1 - p - \frac{4p}{5} + \frac{4p^2}{5} + \frac{p(1-p)}{5} + \frac{p^2}{25} \]
\[ F = 1 - \frac{9p}{5} + \frac{4p^2}{5} + \frac{p}{5} - \frac{p^2}{5} + \frac{p^2}{25} \]
\[ F = 1 - \frac{8p}{5} + \frac{3p^2}{5} + \frac{p^2}{25} \]
\[ F = 1 - \frac{8p}{5} + \frac{15p^2+p^2}{25} = 1 - \frac{8p}{5} + \frac{16p^2}{25} \]

This can be factored as a perfect square:

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

The physical state fidelity is the product of the fidelities from each noisy gate operation. The infidelity introduced by each CNOT gate is \(1 - (1-4p/5) = 4p/5\).

Final Answer: The physical state fidelity \(F\) of the final 4-qubit state is given by the function:

\[ F(p) = \left(1 - \frac{4p}{5}\right)^2 = 1 - \frac{8p}{5} + \frac{16p^2}{25} \]
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)

Analyzing Logical State Fidelity After Post-Selection

Okay, so the user wants me to dive into Subproblem 2, specifically figuring out the logical state fidelity of the final 2-qubit state after we’ve post-selected on detectable errors. The initial state is a 4-qubit all-zeros state, and the code we’re using is the [[4,2,2]] code, which is a key ingredient. The crucial new element is that we’re post-selecting on detectable errors. This means we only keep states where we measured +1 for both stabilizer operators. Let’s see if there is any easy way to understand the evolution.

First, I need to remind myself of the [[4,2,2]] code and what makes an error detectable. An error is detectable if it anticommutes with at least one stabilizer. If we measure both stabilizers and find the result is +1, the system is projected back to the code space. I recall that the ideal final state, \(|\Psi_{ideal}\rangle\), comes from applying the circuit to the all-zeros state. I should check how the gate order works again, and the specific circuit implementation is key. We have two CNOTs and two Hadamards. This circuit is equivalent to two CNOT gates.

I think I need to calculate the fidelity of an ideal state after the noisy gates. The noisy evolution of the system is given by applying the error channels to the gates. So the noisy evolution is \(\rho_{final} = \mathcal{E}_2(U_2 \mathcal{E}_1(U_1 \rho_0 U_1^\dagger) U_2^\dagger)\) where \(U_1, U_2\) are the gate applications and \(\mathcal{E}_1, \mathcal{E}_2\) are the error channels.

This means I need to break down the problem step by step to find the ideal state and the post-selection success probability. It’s tricky because the noise is applied during the circuit, and post-selection happens at the very end. I am going to consider the first gate \(U_1\) application and then post-selection.

I think to proceed I must identify the non-detectable operators. The non-detectable ones commute with both stabilizers, and the set of these operators define the logical operators. These are errors that essentially “hide” from the error detection procedure. In that case, I will have a non-detectable errors on the noisy states. These could be logical operators or stabilizers. I then have to re-evaluate the expectation values for my calculation of the fidelity.

Now, calculating the logical fidelity given the physical error model. To get logical fidelity, I need to consider all the physical errors at the gate, and how they would propagate. I found it useful to calculate \(F_L = F_{physical} / P_{success}\).

The key insight is recognizing how to apply the definition of “logical fidelity.” I’m calculating the fidelity with respect to a logical state.

So, I will break down the steps in more detail:

  1. Define what is post-selection.
  2. The final state after the noisy gates.
  3. Logical fidelity formula.
  4. Expand the final noisy state into different error processes.
  5. Identify the non-detectable operators.
  6. Evaluate the expectation values for the final fidelity calculation.

After going over some examples, I will write the final formula with all the relevant parameters. I am going to double-check my work.

Step-by-Step Derivation

1. Definition of Logical Fidelity

The logical state fidelity, after post-selection, is the fidelity of the final state with the ideal logical state, conditioned on the measurement of all stabilizers yielding the +1 outcome. Let \(|\Psi_{ideal}\rangle\) be the ideal physical state in the code space corresponding to the target logical state \(|\Psi_L\rangle = (|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\). The final density matrix of the physical system after the noisy circuit is \(\rho_{final}\).

Post-selection corresponds to projecting the final state onto the code space, which is the +1 eigenspace of the stabilizer group \(S = \langle S_1, S_2 \rangle = \langle XXXX, ZZZZ \rangle\). The projection operator onto the code space is \(\Pi_C = \frac{1}{4}(I+S_1)(I+S_2)\).

The post-selected state is:

\[ \rho_{ps} = \frac{\Pi_C \rho_{final} \Pi_C}{P_{succ}} \]

where \(P_{succ} = \text{Tr}(\Pi_C \rho_{final} \Pi_C) = \text{Tr}(\Pi_C \rho_{final})\) is the probability of successful post-selection.

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

\[ F_L = \langle\Psi_{ideal}| \rho_{ps} |\Psi_{ideal}\rangle \]

Since \(|\Psi_{ideal}\rangle\) is in the code space, \(\Pi_C |\Psi_{ideal}\rangle = |\Psi_{ideal}\rangle\). Therefore,

\[ F_L = \frac{\langle\Psi_{ideal}| \Pi_C \rho_{final} \Pi_C |\Psi_{ideal}\rangle}{P_{succ}} = \frac{\langle\Psi_{ideal}| \rho_{final} |\Psi_{ideal}\rangle}{P_{succ}} \]

The numerator is precisely the physical state fidelity \(F_{physical}\) calculated in Subproblem 1.

\[ F_L = \frac{F_{physical}}{P_{succ}} \]

From Subproblem 1, we have \(F_{physical} = \left(1 - \frac{4p}{5}\right)^2 = \left(1 - \frac{12p}{15}\right)^2\). Now we must calculate the success probability \(P_{succ}\).

2. Calculation of the Success Probability \(P_{succ}\)

The final state \(\rho_{final}\) results from a sequence of ideal gates and two noisy CNOT gates. Let \(U_1=C_{21}H_2\) and \(U_2=C_{03}H_0\), so the total ideal evolution is \(U=U_2U_1\). Let \(\mathcal{E}_1\) be the error channel on qubits (1,2) and \(\mathcal{E}_2\) be the error channel on qubits (0,3). The final state is \(\rho_{final} = \mathcal{E}_2(U_2 \mathcal{E}_1(U_1 |0\rangle\langle0| U_1^\dagger) U_2^\dagger)\). Since \(U_2\) acts on qubits (0,3) and \(\mathcal{E}_1\) acts on (1,2), they commute.

\[ \rho_{final} = \mathcal{E}_2(\mathcal{E}_1(U |0\rangle\langle0| U^\dagger)) = \mathcal{E}_2(\mathcal{E}_1(|\Psi_{ideal}\rangle\langle\Psi_{ideal}|)) \]

Let’s expand this state. Let \(P\) denote a non-identity Pauli error on (1,2) and \(Q\) a non-identity Pauli error on (0,3).

\[ \rho_{ideal} = |\Psi_{ideal}\rangle\langle\Psi_{ideal}| \]
\[ \rho_1 = \mathcal{E}_1(\rho_{ideal}) = (1-p)\rho_{ideal} + \frac{p}{15}\sum_{P} P \rho_{ideal} P \]
\[ \rho_{final} = \mathcal{E}_2(\rho_1) = (1-p)\rho_1 + \frac{p}{15}\sum_{Q} Q \rho_1 Q \]
\[ \rho_{final} = (1-p)^2 \rho_{ideal} + (1-p)\frac{p}{15}\sum_{P} P\rho_{ideal}P + (1-p)\frac{p}{15}\sum_{Q} Q\rho_{ideal}Q + \left(\frac{p}{15}\right)^2 \sum_{P,Q} QP\rho_{ideal}PQ \]

The success probability is \(P_{succ} = \text{Tr}(\Pi_C \rho_{final})\). For any Pauli operator \(E\), \(\text{Tr}(\Pi_C E \rho_{ideal} E) = \langle\Psi_{ideal}| E \Pi_C E |\Psi_{ideal}\rangle\). This term is 1 if \(E\) is a non-detectable error (commutes with all stabilizers) and 0 if \(E\) is a detectable error (anticommutes with at least one stabilizer).

We need to count the number of non-detectable errors. An error \(E\) is non-detectable if \([E, XXXX]=0\) and \([E, ZZZZ]=0\). A Pauli operator \(P = \otimes P_i\) commutes with \(XXXX\) if it has an even number of \(Y\) and \(Z\) factors. It commutes with \(ZZZZ\) if it has an even number of \(X\) and \(Y\) factors.

  • Errors \(P\) on qubits (1,2): Let \(P=P_1P_2\). Parity of (Y/Z factors, X/Y factors) must be (even,even).
    • (e,e): \(\{XX, YY, ZZ\}\) - 3 operators. These are non-detectable.
    • (e,o): \(\{IX, XI, YZ, ZY\}\) - 4 operators.
    • (o,e): \(\{IZ, ZI, XY, YX\}\) - 4 operators.
    • (o,o): \(\{IY, YI, XZ, ZX\}\) - 4 operators. The number of non-detectable errors \(P \neq II\) is \(N_P^{nd}=3\).
  • Errors \(Q\) on qubits (0,3): By the same logic, the number of non-detectable errors \(Q \neq II\) is \(N_Q^{nd}=3\).
  • Errors \(QP\): The operator \(QP\) is non-detectable if it has an even number of Y/Z factors and an even number of X/Y factors. Since \(Q\) and \(P\) act on disjoint qubits, these parities add. \(QP\) is non-detectable if \(P\) and \(Q\) have the same parity type. The number of non-detectable pairs \((P,Q)\) with \(P,Q\neq II\) is:
\[ N_{QP}^{nd} = N_{(e,e)}^2 + N_{(e,o)}^2 + N_{(o,e)}^2 + N_{(o,o)}^2 = 3^2 + 4^2 + 4^2 + 4^2 = 9 + 16 + 16 + 16 = 57 \]

Now, we can calculate \(P_{succ}\):

\[ P_{succ} = (1-p)^2 \cdot 1 + (1-p)\frac{p}{15}N_P^{nd} + (1-p)\frac{p}{15}N_Q^{nd} + \left(\frac{p}{15}\right)^2 N_{QP}^{nd} \]
\[ P_{succ} = (1-p)^2 + (1-p)\frac{3p}{15} + (1-p)\frac{3p}{15} + \frac{57p^2}{225} \]
\[ P_{succ} = (1-p)^2 + \frac{6p(1-p)}{15} + \frac{57p^2}{225} = 1 - 2p + p^2 + \frac{2p}{5} - \frac{2p^2}{5} + \frac{19p^2}{75} \]
\[ P_{succ} = 1 - \frac{8p}{5} + p^2\left(1 - \frac{2}{5} + \frac{19}{75}\right) = 1 - \frac{8p}{5} + p^2\left(\frac{45-30+19}{75}\right) \]
\[ P_{succ} = 1 - \frac{8p}{5} + \frac{64p^2}{75} \]

3. Assembling the Logical Fidelity

Now we can compute the logical fidelity using the results for \(F_{physical}\) and \(P_{succ}\).

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

To simplify the expression, let’s multiply the numerator and denominator by 75:

\[ F_L = \frac{75 - 120p + 48p^2}{75 - 120p + 64p^2} \]

Final Answer: The logical state fidelity of the final 2-qubit logical state is:

\[ F_L(p) = \frac{1 - \frac{8p}{5} + \frac{48p^2}{75}}{1 - \frac{8p}{5} + \frac{64p^2}{75}} = \frac{75 - 120p + 48p^2}{75 - 120p + 64p^2} \]
User #5

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 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$ in Sympy format.

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

    Outputs
    ----------
    F_logical: sympy.Expr, the logical state fidelity as a function of $p$
    """

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

    return F_logical
Assistant #6
import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of 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$ in Sympy format.

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

    Outputs
    ----------
    F_logical: sympy.Expr, the logical state fidelity as a function of $p$
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_physical = (1 - 8*p/5 + 16*p**2/25)
    P_success = (1 - 8*p/5 + 64*p**2/75)
    F_logical = F_physical / P_success
    # ---------------------------------------------------------------

    return F_logical