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

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)

Solution Summary for Quantum Error Correction

My goal is to figure out the fidelity of a quantum state preparation circuit, considering the effects of two-qubit depolarizing noise that occurs during each CNOT gate. The circuit aims to create a logical GHZ state using a [[4,2,2]] code, which has four physical qubits, encodes two logical qubits, and can detect a single-qubit error. I’ll summarize my thought process for determining the final fidelity.

First, I need to understand the ideal state. Starting with the initial state |0000>, I apply a sequence of gates: H2, CNOT(2,1), H0, and CNOT(0,3). Although the problem states that this prepares a logical GHZ state, I want to verify it directly by applying these gates and confirming the result aligns with my understanding of logical states. Through direct calculation, I’ve confirmed that the circuit does, in fact, produce the target logical GHZ state. The ideal state turns out to be a product of two Bell states.

Next, I need to account for noise. The circuit has two CNOT gates, and each one is followed by a two-qubit depolarizing error channel, introducing both Pauli errors to the state. I carefully analyze the effect of each error channel on a general state, including the ideal state. By working backwards and applying the error channels, and taking advantage of the properties of the depolarizing channel, I break the problem down into manageable chunks. Crucially, I notice that the circuit structure causes the noisy state to factorize in a particular way. This means that I can calculate the fidelity using the product of fidelities of two qubits.

Based on this, I realize the fidelity is a product of fidelities from 0-3 and 1-2 qubits. For each pair of qubits the fidelity is \(1 - 4p/5\). This results in a final physical fidelity of \((1 - 4p/5)^2 = 1 - 8p/5 + 16p^2/25\).

My calculation approach leverages the structure of the circuits, the factorization of the state, and the properties of the error channels to arrive at a much cleaner solution. The solution expresses the fidelity as a function of the two-qubit depolarization probability. This shows the error rate increases quadratically.

Step-by-Step Derivation

1. Determine the ideal final state

The quantum circuit acts on the initial state \(|\psi_0\rangle = |0000\rangle\). The circuit is given by the unitary operator \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\). We apply the gates sequentially to the initial state.

  1. Apply \(H_2\): The Hadamard gate on qubit 2 transforms \(|0\rangle_2\) to \(\frac{1}{\sqrt{2}}(|0\rangle_2+|1\rangle_2)\).
\[ |\psi_1\rangle = H_2 |\psi_0\rangle = |00\rangle \otimes \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle) \otimes |0\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0010\rangle) \]
  1. Apply \(CNOT_{21}\): This gate has control qubit 2 and target qubit 1. It 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) \]
Since the control qubit 2 is $|0\rangle$ in the first term and $|1\rangle$ in the second term:
\[ |\psi_2\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0110\rangle) \]
  1. Apply \(H_0\): The Hadamard gate on qubit 0 acts on the state \(|\psi_2\rangle\).
\[ |\psi_3\rangle = H_0 |\psi_2\rangle = \frac{1}{\sqrt{2}}(H_0|0000\rangle + H_0|0110\rangle) \]
\[ |\psi_3\rangle = \frac{1}{\sqrt{2}}\left(\frac{1}{\sqrt{2}}(|0000\rangle+|1000\rangle) + \frac{1}{\sqrt{2}}(|0110\rangle+|1110\rangle)\right) = \frac{1}{2}(|0000\rangle+|1000\rangle+|0110\rangle+|1110\rangle) \]
  1. Apply \(CNOT_{03}\): This gate has control qubit 0 and target qubit 3.
\[ |\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 physical state. We can recognize this state as a product of two Bell states by grouping qubits (0,3) and (1,2):

\[ |\psi_{ideal}\rangle = \frac{1}{2}(|00\rangle_{03}|00\rangle_{12} + |11\rangle_{03}|00\rangle_{12} + |00\rangle_{03}|11\rangle_{12} + |11\rangle_{03}|11\rangle_{12}) \]
\[ |\psi_{ideal}\rangle = \frac{1}{2}(|00\rangle_{03}+|11\rangle_{03}) \otimes (|00\rangle_{12}+|11\rangle_{12}) \]

Let \(|\Phi^+\rangle_{ij} = \frac{1}{\sqrt{2}}(|00\rangle_{ij} + |11\rangle_{ij})\) be the Bell state on qubits \(i\) and \(j\). Then:

\[ |\psi_{ideal}\rangle = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12} \]

2. Analyze the evolution of the density matrix with errors

We trace the evolution of the system’s density matrix \(\rho\), starting from \(\rho_0 = |\psi_0\rangle\langle\psi_0|\).

  1. The initial state can be written as a product state over the (0,3) and (1,2) bipartition:
\[ \rho_0 = |0000\rangle\langle 0000| = (|00\rangle_{03}\langle 00|_{03}) \otimes (|00\rangle_{12}\langle 00|_{12}) \]
  1. The first two gates, \(U_{BA} = CNOT_{21} H_2\), act only on qubits 1 and 2.
\[ \rho_2 = U_{BA} \rho_0 U_{BA}^\dagger = (|00\rangle_{03}\langle 00|_{03}) \otimes (U_{BA}' |00\rangle_{12}\langle 00|_{12} U_{BA}'^\dagger) \]
where $U_{BA}'$ is the action of $CNOT_{21} H_2$ on the 2-qubit space (1,2). From step 1, we know $U_{BA}'|00\rangle_{12} = |\Phi^+\rangle_{12}$.
\[ \rho_2 = (|00\rangle_{03}\langle 00|_{03}) \otimes (|\Phi^+\rangle_{12}\langle\Phi^+|_{12}) \]
  1. The first error channel, \(\mathcal{E}_{21}\), is a two-qubit depolarizing channel on qubits 1 and 2. It acts on \(\rho_2\).
\[ \rho_3 = \mathcal{E}_{21}(\rho_2) = (|00\rangle_{03}\langle 00|_{03}) \otimes \mathcal{E}_{21}(|\Phi^+\rangle_{12}\langle\Phi^+|_{12}) \]
  1. The next two gates, \(U_{DC} = CNOT_{03} H_0\), act only on qubits 0 and 3.
\[ \rho_5 = U_{DC} \rho_3 U_{DC}^\dagger = (U_{DC}'|00\rangle_{03}\langle 00|_{03}U_{DC}'^\dagger) \otimes \mathcal{E}_{21}(|\Phi^+\rangle_{12}\langle\Phi^+|_{12}) \]
where $U_{DC}'$ is the action of $CNOT_{03}H_0$ on the 2-qubit space (0,3). We can see from the calculation of the ideal state that $U_{DC}'|00\rangle_{03}=|\Phi^+\rangle_{03}$.
\[ \rho_5 = (|\Phi^+\rangle_{03}\langle\Phi^+|_{03}) \otimes \mathcal{E}_{21}(|\Phi^+\rangle_{12}\langle\Phi^+|_{12}) \]
  1. The final error channel, \(\mathcal{E}_{03}\), acts on qubits 0 and 3.
\[ \rho_{final} = \mathcal{E}_{03}(\rho_5) = \mathcal{E}_{03}(|\Phi^+\rangle_{03}\langle\Phi^+|_{03}) \otimes \mathcal{E}_{21}(|\Phi^+\rangle_{12}\langle\Phi^+|_{12}) \]

3. Calculate the final state fidelity

The physical fidelity is given by \(F_{phys} = \langle\psi_{ideal}|\rho_{final}|\psi_{ideal}\rangle\). Since both the ideal state \(|\psi_{ideal}\rangle\) and the final state \(\rho_{final}\) factorize over the (0,3) and (1,2) bipartition, the fidelity also factorizes:

\[ F_{phys} = \left( \langle\Phi^+_{03}| \mathcal{E}_{03}(|\Phi^+\rangle_{03}\langle\Phi^+|_{03}) |\Phi^+_{03}\rangle \right) \times \left( \langle\Phi^+_{12}| \mathcal{E}_{21}(|\Phi^+\rangle_{12}\langle\Phi^+|_{12}) |\Phi^+_{12}\rangle \right) \]
\[ F_{phys} = F_{03} \times F_{12} \]

The two factors \(F_{03}\) and \(F_{12}\) are identical in form. Let’s calculate one of them, for a generic pair of qubits \((i,j)\):

\[ F_{ij} = \langle\Phi^+_{ij}| \mathcal{E}_{ij}(|\Phi^+\rangle_{ij}\langle\Phi^+|_{ij}) |\Phi^+_{ij}\rangle \]

The error channel is \(\mathcal{E}_{ij}(\rho) = (1-p)\rho + \frac{p}{15}\sum_{P \in \{I,X,Y,Z\}^{\otimes 2} \setminus \{II\}} P\rho P\).

\[ F_{ij} = (1-p)\langle\Phi^+_{ij}|(|\Phi^+\rangle_{ij}\langle\Phi^+|_{ij})|\Phi^+_{ij}\rangle + \frac{p}{15}\sum_{P \neq II} \langle\Phi^+_{ij}| P (|\Phi^+\rangle_{ij}\langle\Phi^+|_{ij}) P |\Phi^+_{ij}\rangle \]
\[ F_{ij} = (1-p) + \frac{p}{15}\sum_{P \neq II} |\langle\Phi^+_{ij}| P |\Phi^+_{ij}\rangle|^2 \]

We need to compute the expectation values of the 15 non-identity two-qubit Pauli operators for the Bell state \(|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)\). The only Pauli operators with non-zero expectation values for \(|\Phi^+\rangle\) are those that stabilize it (up to a phase). The stabilizers of \(|\Phi^+\rangle\) are \(X\otimes X\) and \(Z\otimes Z\). * \(\langle\Phi^+| X\otimes X |\Phi^+\rangle = \frac{1}{2}(\langle 00|+\langle 11|)(|11\rangle+|00\rangle) = 1\) * \(\langle\Phi^+| Z\otimes Z |\Phi^+\rangle = \frac{1}{2}(\langle 00|+\langle 11|)(|00\rangle+|11\rangle) = 1\) * The operator \(Y\otimes Y = (iXZ)(iXZ) = - (XX)(ZZ)\). So, \(\langle\Phi^+| Y\otimes Y |\Phi^+\rangle = \langle\Phi^+|-(XX)(ZZ)|\Phi^+\rangle = -1 \cdot \langle\Phi^+|XX|\Phi^+\rangle \cdot \langle\Phi^+|ZZ|\Phi^+\rangle = -1\). All other 12 non-identity Pauli operators have zero expectation value. For example, \(\langle\Phi^+| X\otimes I |\Phi^+\rangle = \frac{1}{2}(\langle 00|+\langle 11|)(|10\rangle+|01\rangle)=0\). The sum of the squared expectation values is:

\[ \sum_{P \neq II} |\langle\Phi^+_{ij}| P |\Phi^+_{ij}\rangle|^2 = (1)^2 + (1)^2 + (-1)^2 = 3 \]

Substituting this back into the expression for \(F_{ij}\):

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

Since \(F_{03} = F_{12} = 1 - \frac{4}{5}p\), the total physical fidelity is:

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

Expanding this expression gives the final result:

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

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

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

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)

A Deep Dive into Logical Fidelity in a [[4,2,2]] Code

Okay, here’s the plan for Subproblem 2. My goal is to figure out the logical fidelity, not just the physical one, after running the circuit and dealing with some noise. The circuit’s the same, starting with |0000> and hitting a couple of noisy CNOT gates, with some depolarizing noise after each. The kicker? We’re post-selecting on detectable errors in the code. That’s the key.

First things first: I’m dealing with a [[4,2,2]] code, which is all about error correction. I know its stabilizers are \(XXXX\) and \(ZZZZ\). The encoded “good” space is where the state keeps these stabilizers the same. Essentially, the post-selection here means we only consider final states which “survive” the stabilizer measurements - states where measuring \(XXXX\) and \(ZZZZ\) both give a “no error” outcome. This will be critical for how the “logical” fidelity works.

Now, let’s connect the logical picture to the physical one. The circuit is aiming to make the logical GHZ state (a superposition of \(|00\rangle_{AB}\) and \(|11\rangle_{AB}\)). I’ve got that ideal physical state \(|\psi_{phys, ideal}\rangle\) from the previous problem. It’s the entangled state generated by the circuit. I need to make sure this physical state actually represents the desired logical state. I’ve got the logical operators, \(Z_A\) and \(Z_B\), defined in the problem. I have to check that my ideal physical state is in the right space by comparing the physical and logical operators. This is where I almost got tripped up. The important note is that these logical operators are only defined up to stabilizers. I need to construct the logical basis, and show this ideal physical state really is what it says it is.

The real challenge is figuring out what these noise errors do to the situation after that post-selection. From subproblem 1, I have a physical density matrix \(\rho_{final}\) to work with. So, post-selecting means taking only the part of \(\rho_{final}\) that’s in that codespace (states that give \(XXXX = +1\) and \(ZZZZ = +1\)) and normalizing it. The idea is that I am projecting the noisey state into the stabilizer’s +1 space. The logical fidelity is the overlap of the post-selected state with that perfect GHZ physical state \(|\psi_{phys,ideal}\rangle\). Mathematically it’s: \(F_{log} = \langle\psi_{phys, ideal}| P_{code} \rho_{final} P_{code} |\psi_{phys, ideal}\rangle / \text{Tr}(P_{code} \rho_{final})\), where \(P_{code}\) is the code projector.

This breaks down really nicely: \(F_{log} = \frac{\langle\psi_{phys, ideal}| \rho_{final} |\psi_{phys, ideal}\rangle}{\text{Tr}(P_{code} \rho_{final})}\) because \(|\psi_{phys,ideal}\rangle\) is already in the codespace. So, it simplifies to \(F_{log} = F_{phys} / P_{success}\), where \(F_{phys}\) is the physical fidelity I got from part 1, and \(P_{success}\) is the probability of actually having no detectable errors that would kick us out of that subspace during post-selection.

To find \(P_{success}\), I need to understand what happens to \(\rho_{final}\) through the noise, before the post-selection. This is about working out what errors are undetectable (meaning they commute with both stabilizers) and what errors are detectable. If an error’s detectable, it gets projected out by post-selection. If not, it can stay around.

My plan here is to exactly write \(\rho_{final}\), and break it down into all possible Pauli errors. The noise affects the state after each of the CNOT gates (0,3) and (2,1). I can see the final state being built by the effect of the noisy CNOT gates on (0,3) and then on (1,2). The probability of an error on one CNOT is \(p\), meaning that probability of error free is \((1-p)\).

The key here is that, for the state I am trying to prepare, the undetectable errors actually correspond to logical operators that act trivially! Let me break this down for the post-selection.

I broke down that final \(\rho_{final}\) state into terms, with contributions from each possible Pauli error. And by looking at what physical errors

Step-by-Step Derivation

1. Define Logical Fidelity with Post-selection

The final physical state of the system is described by the density matrix \(\rho_{final}\), which we analyzed in Subproblem 1. Post-selection on detectable errors means we project the final state into the codespace and renormalize. The projector onto the codespace \(\mathcal{C}\) is given by \(P_{\mathcal{C}} = \frac{1}{4}(I+S_1)(I+S_2)\), where \(S_1=XXXX\) and \(S_2=ZZZZ\) are the stabilizers.

The post-selected state is:

\[ \rho_{ps} = \frac{P_{\mathcal{C}} \rho_{final} P_{\mathcal{C}}}{\text{Tr}(P_{\mathcal{C}} \rho_{final})} \]

The logical fidelity is the fidelity of this post-selected state with respect to the ideal logical state. Since the ideal physical state \(|\psi_{ideal}\rangle\) is already in the codespace, \(P_{\mathcal{C}}|\psi_{ideal}\rangle = |\psi_{ideal}\rangle\). The logical fidelity is thus:

\[ F_{log} = \langle\psi_{ideal}| \rho_{ps} |\psi_{ideal}\rangle = \frac{\langle\psi_{ideal}| P_{\mathcal{C}} \rho_{final} P_{\mathcal{C}} |\psi_{ideal}\rangle}{\text{Tr}(P_{\mathcal{C}} \rho_{final})} = \frac{\langle\psi_{ideal}| \rho_{final} |\psi_{ideal}\rangle}{\text{Tr}(P_{\mathcal{C}} \rho_{final})} \]

The numerator is the physical fidelity \(F_{phys}\) calculated in Subproblem 1. The denominator is the probability of the post-selection succeeding (i.e., not detecting an error), which we denote \(P_{success}\).

\[ F_{log} = \frac{F_{phys}}{P_{success}} \]

2. Analyze Undetectable Errors

An error is undetectable if it commutes with all stabilizers of the code. The errors in our model occur on qubits (2,1) and (0,3).

  • Errors on qubits (1,2): An error operator \(E_{12}\) is undetectable if it commutes with \(S_1 = X_0X_1X_2X_3\) and \(S_2 = Z_0Z_1Z_2Z_3\). Since \(E_{12}\) acts as identity on qubits 0 and 3, this condition simplifies to \(E_{12}\) commuting with \(X_1X_2\) and \(Z_1Z_2\). The two-qubit Pauli operators that commute with both \(X_1X_2\) and \(Z_1Z_2\) are, up to phase, \(\{I_1I_2, X_1X_2, Y_1Y_2, Z_1Z_2\}\). These are the 3 non-trivial undetectable errors on this pair.

  • Errors on qubits (0,3): Similarly, an error \(E_{03}\) is undetectable if it commutes with \(X_0X_3\) and \(Z_0Z_3\). The non-trivial undetectable errors are \(\{X_0X_3, Y_0Y_3, Z_0Z_3\}\).

Any error that is not in these sets is detectable. For each CNOT gate, there are 15 possible non-identity Pauli errors, each with probability \(p/15\). Thus, the probability of an undetectable error occurring is \(3 \times (p/15) = p/5\). The probability of a detectable error is \(12 \times (p/15) = 4p/5\).

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

The post-selection succeeds if no detectable errors occur during the circuit. For the first CNOT gate (\(CNOT_{21}\)), the probability of either no error or an undetectable error is \((1-p) + \frac{3p}{15} = 1 - p + \frac{p}{5} = 1 - \frac{4}{5}p\). For the second CNOT gate (\(CNOT_{03}\)), the probability of either no error or an undetectable error is also \(1 - \frac{4}{5}p\). Since the error channels are independent, the total probability of success is the product:

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

4. Analyze the Effect of Undetectable Errors on the Ideal State

The ideal physical state is \(|\psi_{ideal}\rangle = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12}\), where \(|\Phi^+\rangle_{ij} = \frac{1}{\sqrt{2}}(|00\rangle_{ij} + |11\rangle_{ij})\). This state encodes the logical GHZ state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\).

Let’s examine the effect of the undetectable errors on the components of the ideal state. The state \(|\Phi^+\rangle_{ij}\) is a Bell state. Its stabilizers are \(X_iX_j\) and \(Z_iZ_j\). * \(X_iX_j |\Phi^+\rangle_{ij} = |\Phi^+\rangle_{ij}\) * \(Z_iZ_j |\Phi^+\rangle_{ij} = |\Phi^+\rangle_{ij}\) * \(Y_iY_j |\Phi^+\rangle_{ij} = (iX_iZ_i)(iX_jZ_j) |\Phi^+\rangle_{ij} = -(X_iX_j)(Z_iZ_j) |\Phi^+\rangle_{ij} = -|\Phi^+\rangle_{ij}\)

Crucially, the set of undetectable physical errors for each noisy gate location is precisely the set of stabilizers for the corresponding part of the ideal physical state. When an undetectable error \(E_{12} \in \{X_1X_2, Y_1Y_2, Z_1Z_2\}\) occurs on qubits (1,2), the state \(|\Phi^+\rangle_{12}\) is mapped to \(\pm |\Phi^+\rangle_{12}\). The corresponding density matrix \(|\Phi^+\rangle_{12}\langle\Phi^+|_{12}\) is left invariant. The same holds for undetectable errors on qubits (0,3) acting on \(|\Phi^+\rangle_{03}\).

This means that any undetectable error leaves the ideal density matrix \(|\psi_{ideal}\rangle\langle\psi_{ideal}|\) unchanged.

5. Calculate the Logical Fidelity

Let’s trace the state. The final state is \(\rho_{final} = \rho_{03} \otimes \rho_{12}\), where \(\rho_{ij} = \mathcal{E}_{ij}(|\Phi^+\rangle_{ij}\langle\Phi^+|_{ij})\). We can split the error channel’s action into three parts: no error, undetectable error, and detectable error.

\[ \mathcal{E}_{ij}(|\Phi^+\rangle\langle\Phi^+|) = (1-p)|\Phi^+\rangle\langle\Phi^+| + \frac{p}{15}\sum_{E \in \mathcal{U}_{ij}} E|\Phi^+\rangle\langle\Phi^+|E^\dagger + \frac{p}{15}\sum_{E \in \mathcal{D}_{ij}} E|\Phi^+\rangle\langle\Phi^+|E^\dagger \]

where \(\mathcal{U}_{ij}\) is the set of 3 non-identity undetectable errors and \(\mathcal{D}_{ij}\) is the set of 12 detectable errors. As shown above, for any \(E \in \mathcal{U}_{ij}\), \(E|\Phi^+\rangle\langle\Phi^+|E^\dagger = |\Phi^+\rangle\langle\Phi^+|\). So the part of the state corresponding to no error or an undetectable error is:

\[ (1-p)|\Phi^+\rangle\langle\Phi^+| + \frac{3p}{15}|\Phi^+\rangle\langle\Phi^+| = \left(1-\frac{4}{5}p\right)|\Phi^+\rangle\langle\Phi^+| \]

This component lies in the codespace. The remaining part, caused by detectable errors, lies in error subspaces orthogonal to the codespace.

The component of \(\rho_{final}\) that survives post-selection (i.e., lies in the codespace) is:

\[ P_{\mathcal{C}}\rho_{final}P_{\mathcal{C}} = \left( \left(1-\frac{4}{5}p\right)|\Phi^+_{03}\rangle\langle\Phi^+_{03}| \right) \otimes \left( \left(1-\frac{4}{5}p\right)|\Phi^+_{12}\rangle\langle\Phi^+_{12}| \right) \]
\[ P_{\mathcal{C}}\rho_{final}P_{\mathcal{C}} = \left(1-\frac{4}{5}p\right)^2 |\psi_{ideal}\rangle\langle\psi_{ideal}| \]

Now we can compute the numerator and denominator for the logical fidelity. * Numerator: \(F_{phys} = \langle\psi_{ideal}| \rho_{final} |\psi_{ideal}\rangle\). The ideal state projects out only the component of \(\rho_{final}\) proportional to itself.

\[ F_{phys} = \left(1-\frac{4}{5}p\right)^2 \langle\psi_{ideal}| \left( |\psi_{ideal}\rangle\langle\psi_{ideal}| \right) |\psi_{ideal}\rangle = \left(1-\frac{4}{5}p\right)^2 \]
This matches the result from Subproblem 1.
  • Denominator: \(P_{success} = \text{Tr}(P_{\mathcal{C}}\rho_{final})\). Using the property \(\text{Tr}(AB)=\text{Tr}(BA)\) and \(P_{\mathcal{C}}^2=P_{\mathcal{C}}\):
\[ P_{success} = \text{Tr}(P_{\mathcal{C}}\rho_{final}P_{\mathcal{C}}) = \text{Tr}\left(\left(1-\frac{4}{5}p\right)^2 |\psi_{ideal}\rangle\langle\psi_{ideal}|\right) = \left(1-\frac{4}{5}p\right)^2 \]

Finally, the logical fidelity is:

\[ F_{log} = \frac{F_{phys}}{P_{success}} = \frac{\left(1 - \frac{4}{5}p\right)^2}{\left(1 - \frac{4}{5}p\right)^2} = 1 \]

The logical fidelity is 1 because for this specific logical state, the only errors that can occur without being detected are those that act as stabilizers on the physical state, leaving the logical state invariant.

Final Answer: The logical state fidelity of the final 2-qubit logical state, after post-selection, is:

\[ F_{log}(p) = 1 \]
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_logical = sp.Integer(1)  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical