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)

Decomposing and Solving the 4-Qubit Fidelity Problem

Alright, let’s break down this problem. My goal is to figure out how well a specific quantum state, prepared by a particular circuit, holds up under the influence of noise. This circuit prepares a 4-qubit state, and the “noise” comes in the form of a depolarizing channel, acting on pairs of qubits after each CNOT gate. The end goal is to express the fidelity, how similar the actual noisy state is to the perfect one, as a function of the error rate p.

The key to unlocking this problem is understanding the circuit’s building blocks and the error model. The circuit, in reverse order, goes: \(H_2\), \(CNOT_{21}\), \(H_0\), \(CNOT_{03}\). The errors pop up after those CNOT gates. I can treat the initial state as all \(|0\rangle\)s, or \(|0000\rangle\). After the noisy CNOT gates, the two-qubit depolarizing channel has a chance of leaving the quantum state alone or, otherwise, applying a random Pauli operator to it, as I know. It’s essentially a mixed bag of potential Pauli operators.

First, I need to figure out what the “ideal” state should look like without any errors. Tracing through the circuit, the first two gates, \(H_2\) and \(CNOT_{21}\), create a Bell pair on qubits 1 and 2. Then, the second set of gates, \(H_0\) and \(CNOT_{03}\), makes a Bell pair on qubits 0 and 3. Since these two sets of operations act on separate sets of qubits, the final “ideal” state turns out to be a tensor product: a Bell pair on qubits 0,3 tensor a Bell pair on qubits 1,2. I can write this as \(|\psi_{ideal}\rangle = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12}\) where \(|\Phi^+\rangle\) means a standard Bell state.

With the ideal state in hand, I can focus on modelling how the circuit gets ruined by errors. The state starts as all \(|0\rangle\), so \(\rho_0 = |0000\rangle\langle0000|\). Then I can step by step apply the circuit and error channels. The steps are, first a block of operations and an error on qubits 1, 2, and then a second block of operations and an error on qubits 0, 3. The noise is like a filter that distorts the quantum state at each CNOT operation. The channel, written in my code, is \(\mathcal{E}(\rho) = (1-p) \rho + p \sum_{P \in \{I,X,Y,Z\}^{\otimes 2} \setminus \{II\}} \frac{P \rho P^\dagger}{15}\). The important part is that with probability \(p\), one of the 15 Pauli operators (besides the identity) will randomly flip or rotate the states.

Fidelity, \(F\), is the inner product of the ideal state with the noisy density matrix \(\rho_{final}\): \(F = \langle\psi_{ideal}|\rho_{final}|\psi_{ideal}\rangle\). The key insight is that since the operations and the errors act on different qubit pairs independently (0,3 and 1,2), the whole process factorizes. That means I can calculate the fidelity for one pair, and then square the answer. This huge simplification comes from the fact that the two error channels act on different qubit spaces: it’s a product of fidelities, and I just have to do it once!

To do this, I break the final state up into smaller steps and solve for the total fidelity. First, I compute what happens if I apply a single noisy CNOT to an initial state \(\rho_0 = |0000\rangle\langle0000|\), which can be written in a density matrix. After doing so, I then calculate the average over all 2-qubit Paulis (apart from the identity). Then, I compute the fidelity. From this, I compute that the fidelity on the bell state after the error is \(F_{gate} = 1 - \frac{4p}{5}\). Finally, since the errors are independent, the total fidelity of the 4-qubit state will be the square of that number! Therefore, the final answer is \(F = (1 - \frac{4p}{5})^2\).

Step-by-Step Derivation

The goal is to compute the physical state fidelity \(F = \langle\psi_{ideal}|\rho_{final}|\psi_{ideal}\rangle\), where \(|\psi_{ideal}\rangle\) is the state prepared by the noiseless circuit and \(\rho_{final}\) is the state prepared by the noisy circuit.

1. Determine the ideal final state \(|\psi_{ideal}\rangle\)

The circuit operations are applied from right to left to the initial state \(|\psi_{in}\rangle = |0000\rangle\). The unitary for the circuit is \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\).

  1. Initial state:
\[ |\psi_0\rangle = |0000\rangle = |0\rangle_0 |0\rangle_1 |0\rangle_2 |0\rangle_3 \]
  1. Apply the Hadamard gate \(H_2\) to qubit 2:
\[ |\psi_1\rangle = H_2 |\psi_0\rangle = |0\rangle_0 |0\rangle_1 \frac{1}{\sqrt{2}}(|0\rangle_2+|1\rangle_2) |0\rangle_3 = \frac{1}{\sqrt{2}}(|0000\rangle + |0010\rangle) \]
  1. Apply the \(CNOT_{21}\) gate (control on qubit 2, target on qubit 1):
\[ |\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) \]
This state can be factored as a tensor product:
\[ |\psi_2\rangle = |0\rangle_0 |0\rangle_3 \otimes \frac{1}{\sqrt{2}}(|00\rangle_{12} + |11\rangle_{12}) = |00\rangle_{03} \otimes |\Phi^+\rangle_{12} \]
where $|\Phi^+\rangle_{12} = \frac{1}{\sqrt{2}}(|00\rangle_{12} + |11\rangle_{12})$ is a Bell state on qubits 1 and 2.
  1. Apply the Hadamard gate \(H_0\) to qubit 0:
\[ |\psi_3\rangle = H_0 |\psi_2\rangle = \left(H_0|00\rangle_{03}\right) \otimes |\Phi^+\rangle_{12} = \frac{1}{\sqrt{2}}(|00\rangle_{03} + |10\rangle_{03}) \otimes |\Phi^+\rangle_{12} \]
  1. Apply the \(CNOT_{03}\) gate (control on qubit 0, target on qubit 3):
\[ |\psi_{ideal}\rangle = CNOT_{03} |\psi_3\rangle = \left(CNOT_{03} \frac{1}{\sqrt{2}}(|00\rangle_{03} + |10\rangle_{03})\right) \otimes |\Phi^+\rangle_{12} \]
\[ |\psi_{ideal}\rangle = \frac{1}{\sqrt{2}}(|00\rangle_{03} + |11\rangle_{03}) \otimes |\Phi^+\rangle_{12} = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12} \]
The ideal final state is a tensor product of two Bell states, one on qubits (0,3) and one on qubits (1,2).

2. Model the evolution of the density matrix with errors

The circuit consists of two blocks of operations separated by an error channel. * Block 1: \(U_{12} = CNOT_{21} H_2\) acts on qubits 1 and 2. * Error 1: A two-qubit depolarizing channel \(\mathcal{E}_1\) on qubits 1 and 2 follows \(CNOT_{21}\). * Block 2: \(U_{03} = CNOT_{03} H_0\) acts on qubits 0 and 3. * Error 2: A two-qubit depolarizing channel \(\mathcal{E}_2\) on qubits 0 and 3 follows \(CNOT_{03}\).

The error channel for a two-qubit gate is given by:

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

where \(\mathcal{P}_2 = \{I,X,Y,Z\}^{\otimes 2}\) is the set of 16 two-qubit Pauli operators.

Let’s trace the state \(\rho(t)\) through the circuit:

  1. Initial state: \(\rho_{in} = |0000\rangle\langle0000| = |00\rangle\langle00|_{03} \otimes |00\rangle\langle00|_{12}\).

  2. After \(U_{12}\): The state becomes \(\rho_1^{ideal} = U_{12}\rho_{in}U_{12}^\dagger\). Since \(U_{12}\) only acts on qubits 1,2, this is:

\[ \rho_1^{ideal} = |00\rangle\langle00|_{03} \otimes \left(U_{12}|00\rangle\langle00|_{12}U_{12}^\dagger\right) = |00\rangle\langle00|_{03} \otimes |\Phi^+\rangle\langle\Phi^+|_{12} \]
  1. After the first error channel \(\mathcal{E}_1\) on qubits 1,2:
\[ \rho_1 = \mathcal{E}_1(\rho_1^{ideal}) = |00\rangle\langle00|_{03} \otimes \mathcal{E}_1(|\Phi^+\rangle\langle\Phi^+|_{12}) \]
  1. After \(U_{03}\): The unitary \(U_{03}\) acts only on qubits 0,3.
\[ \rho_2^{pre-error} = U_{03} \rho_1 U_{03}^\dagger = \left(U_{03}|00\rangle\langle00|_{03}U_{03}^\dagger\right) \otimes \mathcal{E}_1(|\Phi^+\rangle\langle\Phi^+|_{12}) \]
\[ \rho_2^{pre-error} = |\Phi^+\rangle\langle\Phi^+|_{03} \otimes \mathcal{E}_1(|\Phi^+\rangle\langle\Phi^+|_{12}) \]
  1. After the second error channel \(\mathcal{E}_2\) on qubits 0,3:
\[ \rho_{final} = \mathcal{E}_2(\rho_2^{pre-error}) = \mathcal{E}_2(|\Phi^+\rangle\langle\Phi^+|_{03}) \otimes \mathcal{E}_1(|\Phi^+\rangle\langle\Phi^+|_{12}) \]

3. Calculate the final fidelity

The fidelity is \(F = \langle\psi_{ideal}|\rho_{final}|\psi_{ideal}\rangle\). Substituting the expressions for \(|\psi_{ideal}\rangle\) and \(\rho_{final}\):

\[ F = \left( \langle\Phi^+|_{03} \otimes \langle\Phi^+|_{12} \right) \left( \mathcal{E}_2(|\Phi^+\rangle\langle\Phi^+|_{03}) \otimes \mathcal{E}_1(|\Phi^+\rangle\langle\Phi^+|_{12}) \right) \left( |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12} \right) \]

Due to the tensor product structure, the fidelity factors into two identical terms:

\[ F = \left( \langle\Phi^+|_{03}| \mathcal{E}_2(|\Phi^+\rangle\langle\Phi^+|_{03}) |\Phi^+\rangle_{03} \right) \times \left( \langle\Phi^+|_{12}| \mathcal{E}_1(|\Phi^+\rangle\langle\Phi^+|_{12}) |\Phi^+\rangle_{12} \right) \]

Let’s compute one of these factors, which represents the fidelity of a Bell state after passing through the error channel. Let \(F_{gate} = \langle\Phi^+| \mathcal{E}(|\Phi^+\rangle\langle\Phi^+|) |\Phi^+\rangle\).

\[ F_{gate} = \langle\Phi^+| \left( (1-p) |\Phi^+\rangle\langle\Phi^+| + \frac{p}{15} \sum_{P \neq I} P |\Phi^+\rangle\langle\Phi^+| P^\dagger \right) |\Phi^+\rangle \]
\[ F_{gate} = (1-p) \langle\Phi^+|\Phi^+\rangle\langle\Phi^+|\Phi^+\rangle + \frac{p}{15} \sum_{P \neq I} \langle\Phi^+|P|\Phi^+\rangle\langle\Phi^+|P^\dagger|\Phi^+\rangle \]

Since \(\langle\Phi^+|\Phi^+\rangle = 1\) and \(\langle\Phi^+|P^\dagger|\Phi^+\rangle = (\langle\Phi^+|P|\Phi^+\rangle)^*\):

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

We need to calculate the expectation value of the 15 non-identity two-qubit Pauli operators for the Bell state \(|\Phi^+\rangle\). The state \(|\Phi^+\rangle\) is a \(+1\) eigenstate of the Pauli operators \(X \otimes X\) and \(Z \otimes Z\). * \(\langle\Phi^+|X \otimes X|\Phi^+\rangle = 1\) * \(\langle\Phi^+|Z \otimes Z|\Phi^+\rangle = 1\) * Also, \(Y \otimes Y = (iZX)(iZX) = - (Z \otimes Z)(X \otimes X)\). Thus, \(\langle\Phi^+|Y \otimes Y|\Phi^+\rangle = -1\).

For any other two-qubit Pauli operator \(P\) (not in the set \(\{I\otimes I, X\otimes X, Y\otimes Y, Z\otimes Z\}\)), it can be shown that \(\langle\Phi^+|P|\Phi^+\rangle = 0\). This is because any such \(P\) will anti-commute with at least one of the stabilizers (\(X \otimes X\) or \(Z \otimes Z\)) of \(|\Phi^+\rangle\). If \(\{P, S\}=0\) and \(S|\Phi^+\rangle = |\Phi^+\rangle\), then \(\langle\Phi^+|P|\Phi^+\rangle = \langle\Phi^+|PS|\Phi^+\rangle = -\langle\Phi^+|SP|\Phi^+\rangle = -\langle\Phi^+|P|\Phi^+\rangle\), which implies \(\langle\Phi^+|P|\Phi^+\rangle = 0\).

The sum is over the 15 non-identity Paulis. The only non-zero contributions come from \(P \in \{X \otimes X, Y \otimes Y, Z \otimes Z\}\).

\[ \sum_{P \neq I} |\langle\Phi^+|P|\Phi^+\rangle|^2 = |\langle\Phi^+|X \otimes X|\Phi^+\rangle|^2 + |\langle\Phi^+|Y \otimes Y|\Phi^+\rangle|^2 + |\langle\Phi^+|Z \otimes Z|\Phi^+\rangle|^2 \]
\[ \sum_{P \neq I} |\langle\Phi^+|P|\Phi^+\rangle|^2 = |1|^2 + |-1|^2 + |1|^2 = 1+1+1=3 \]

Now, substitute this back into the expression for \(F_{gate}\):

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

The total fidelity is the product of the fidelities from the two independent error channels:

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

Expanding this expression gives:

\[ F = 1 - \frac{8p}{5} + \frac{16p^2}{25} \]

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

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

Detailed Calculation of Logical State Fidelity

Okay, here’s my breakdown of how to tackle this logical fidelity problem, focusing on post-selection. I’m aiming to find the fidelity of an encoded logical GHZ state after a noisy circuit, assuming we’ve post-selected on error-free stabilizer measurements.

  1. Understand the Goal and the Noise: We’re after logical fidelity, which is how well the encoded state matches the ideal logical state. The circuit is the same as before, a CNOT-Hadamard-CNOT-Hadamard sequence, but this time, the key difference is the noise model (two-qubit depolarizing channel after each CNOT) and the crucial post-selection on no-error outcomes.

  2. Strategic Overview: Post-Selection and the Codespace. The post-selection, where we measure stabilizers at the end, is the trick. It’s like projecting onto the subspace where the stabilizers give a plus-one result (no detected errors). So, I need to figure out this “codespace projector,” normalize the final noisy state, and then calculate fidelity within that codespace. I’ll need to figure out what logical state corresponds to the target GHZ state to complete the calculation.

  3. Getting the Ideal State and the Circuit’s Output. First I’ll need to identify the ideal four-qubit state corresponding to the logical GHZ state. The code has stabilizers XXXX and ZZZZ. From the circuit, it’s clear the ideal state prepared is the entangled state produced by controlled-NOT gates, specifically \(|\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12}\). Now, it seems reasonable to assume this is the encoding of the target logical GHZ state, which simplifies things. I need to check that this state is indeed stabilized by the code.

  4. Recalling Information from Subproblem 1. I remember from the earlier calculations that the physical fidelity (fidelity before post-selection) of this state is \((1 - 4p/5)^2\). I’ll need this later. Also, let’s take note that \(p\) is the error probability of a single gate.

  5. Calculating the Success Probability. The post-selection means we only keep states that pass the stabilizer tests. So, I must compute the probability of successfully measuring the +1 outcome for both stabilizers, which will then give me the state after post-selection. This success probability, \(P_{success}\), is basically the trace of the noisy final state against the codespace projector. This probability is also used to normalize the state after post-selection.

  6. Deconstructing Stabilizer Expectation Values I know I’ll need to calculate the expectation values of the stabilizer operators. I expanded \(\rho_{final}\) into a Pauli basis, allowing me to isolate the stabilizer expectation values, which simplifies this stage. The Pauli expansion and the fact that the two noisy Bell states produced by the gates are independent are key. The noisy Bell state expands in a Pauli basis. Because of the channel model, it’s just a depolarized state. This helps greatly. Then I can compute the expectation values of XXXX, ZZZZ, and YYYY. Since the stabilizers are products of the same Pauli operators, the calculations are simplified. After calculation, I realize that \(\langle S_1 \rangle = \langle S_2 \rangle = \langle S_1S_2 \rangle\).

  7. Putting it All Together. Now it’s a matter of combining everything. The success probability, \(P_{success}\), will be equal to \(\frac{1}{4}(1 + 3(1-16p/15)^2)\). The logical fidelity will be the physical fidelity (from subproblem 1) divided by this success probability. This gives the final answer. Sanity checks confirm this is correct for zero error.

I’ve got the final formula:

\(F_L = \frac{(1 - 4p/5)^2}{\frac{1}{4} + \frac{3}{4}(1-16p/15)^2}\).

Step-by-Step Derivation

The goal is to compute the logical state fidelity \(F_L\) after post-selecting on the no-error outcome of stabilizer measurements.

1. Define Logical Fidelity and Post-selection

The logical fidelity is the fidelity of the final state, projected into the codespace, with the ideal logical state. The [[4,2,2]] code is defined by the stabilizer group \(\mathcal{S} = \langle S_1, S_2 \rangle = \langle XXXX, ZZZZ \rangle\). The codespace is the subspace where all stabilizer measurements yield a +1 outcome. The projector onto the codespace is:

\[ \Pi_C = \frac{1}{4}(I+S_1)(I+S_2) = \frac{1}{4}(I + XXXX + ZZZZ + YYYY) \]

where we used \(S_1S_2 = (XXXX)(ZZZZ) = (-iY)^{\otimes 4} = YYYY\).

Let \(\rho_{final}\) be the noisy 4-qubit state at the end of the circuit, as derived in Subproblem 1. Post-selection means we project the state into the codespace and re-normalize. The post-selected state is:

\[ \rho_{post} = \frac{\Pi_C \rho_{final} \Pi_C}{P_{success}} \]

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

The ideal state prepared by the circuit is \(|\psi_{ideal}\rangle = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12}\). As shown in Subproblem 1, this state is a tensor product of two Bell states. We must first verify that this state is in the codespace, i.e., it is a +1 eigenstate of the stabilizers. * \(S_1|\psi_{ideal}\rangle = (X_0X_1X_2X_3) (|\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12}) = (X_0X_3|\Phi^+\rangle_{03}) \otimes (X_1X_2|\Phi^+\rangle_{12}) = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{12} = |\psi_{ideal}\rangle\). * \(S_2|\psi_{ideal}\rangle = (Z_0Z_1Z_2Z_3) |\psi_{ideal}\rangle\). The number of qubits in the ‘1’ state is even for every basis state in the expansion of \(|\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle + |0110\rangle + |1001\rangle + |1111\rangle)\), so \(S_2|\psi_{ideal}\rangle = |\psi_{ideal}\rangle\).

Since \(|\psi_{ideal}\rangle\) is in the codespace, \(\Pi_C |\psi_{ideal}\rangle = |\psi_{ideal}\rangle\). The logical fidelity is the fidelity of the post-selected state with this ideal state:

\[ F_L = \langle\psi_{ideal}|\rho_{post}|\psi_{ideal}\rangle = \frac{\langle\psi_{ideal}|\Pi_C \rho_{final} \Pi_C|\psi_{ideal}\rangle}{P_{success}} = \frac{\langle\psi_{ideal}|\rho_{final}|\psi_{ideal}\rangle}{P_{success}} \]

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

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

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

We need to compute \(P_{success} = \text{Tr}(\Pi_C \rho_{final})\).

\[ P_{success} = \text{Tr}\left(\frac{1}{4}(I + S_1 + S_2 + S_1S_2) \rho_{final}\right) = \frac{1}{4}(1 + \langle S_1 \rangle + \langle S_2 \rangle + \langle S_1S_2 \rangle) \]

where \(\langle S \rangle = \text{Tr}(S \rho_{final})\). The final state from Subproblem 1 is \(\rho_{final} = \rho_{nb, 03} \otimes \rho_{nb, 12}\), where \(\rho_{nb}\) is the state of a Bell pair after a noisy CNOT gate.

The action of the two-qubit depolarizing channel on a state \(\rho\) can be written as:

\[ \mathcal{E}(\rho) = (1-p' )\rho + p' \frac{I_4}{4} \quad \text{where} \quad p' = \frac{16p}{15} \]

So, \(\rho_{nb} = \mathcal{E}(|\Phi^+\rangle\langle\Phi^+|) = (1-p')|\Phi^+\rangle\langle\Phi^+| + p' \frac{I_4}{4}\).

Let’s compute the expectation value of a two-qubit Pauli operator \(P\) for this state:

\[ \langle P \rangle_{\rho_{nb}} = \text{Tr}(P \rho_{nb}) = (1-p')\langle\Phi^+|P|\Phi^+\rangle + \frac{p'}{4}\text{Tr}(P) \]

For any non-identity Pauli \(P\), \(\text{Tr}(P)=0\). Thus, \(\langle P \rangle_{\rho_{nb}} = (1-p')\langle\Phi^+|P|\Phi^+\rangle\). For the Bell state \(|\Phi^+\rangle\), we have \(\langle XX \rangle = 1\), \(\langle ZZ \rangle = 1\), and \(\langle YY \rangle = -1\). So, for the noisy state \(\rho_{nb}\): * \(\langle XX \rangle_{\rho_{nb}} = (1-p')\) * \(\langle ZZ \rangle_{\rho_{nb}} = (1-p')\) * \(\langle YY \rangle_{\rho_{nb}} = -(1-p')\)

Now we can compute the expectation values for the four-qubit stabilizers: * \(\langle S_1 \rangle = \langle XXXX \rangle = \text{Tr}((X_0X_3 \otimes X_1X_2)(\rho_{nb,03} \otimes \rho_{nb,12}))\)

\[ \langle S_1 \rangle = \text{Tr}(X_0X_3 \rho_{nb,03}) \text{Tr}(X_1X_2 \rho_{nb,12}) = \langle XX \rangle_{\rho_{nb}} \langle XX \rangle_{\rho_{nb}} = (1-p')^2 \]
  • \(\langle S_2 \rangle = \langle ZZZZ \rangle = \text{Tr}((Z_0Z_2 \otimes Z_1Z_3)(\rho_{nb,03} \otimes \rho_{nb,12}))\). This operator does not factor over the (0,3) and (1,2) subsystems. Let’s use the Pauli decomposition of \(\rho_{nb}\):
\[ \rho_{nb} = \frac{1}{4}(I\otimes I + \langle XX \rangle (X\otimes X) + \langle YY \rangle (Y\otimes Y) + \langle ZZ \rangle (Z\otimes Z)) \]
\[ \rho_{nb} = \frac{1}{4}(I\otimes I + (1-p')X\otimes X - (1-p')Y\otimes Y + (1-p')Z\otimes Z) \]
The expectation value $\langle Z_0Z_1Z_2Z_3 \rangle$ is non-zero only if the term $Z_0Z_1Z_2Z_3$ appears in the Pauli decomposition of $\rho_{final} = \rho_{nb,03} \otimes \rho_{nb,12}$. This would require a term $(Z_0 \otimes Z_3)$ from $\rho_{nb,03}$ and $(Z_1 \otimes Z_2)$ from $\rho_{nb,12}$.
The term $(Z_0 \otimes Z_3)$ has coefficient $\frac{1}{4}(1-p')$ in $\rho_{nb,03}$.
The term $(Z_1 \otimes Z_2)$ has coefficient $\frac{1}{4}(1-p')$ in $\rho_{nb,12}$.
The product term is $\frac{(1-p')^2}{16}(Z_0Z_3 \otimes Z_1Z_2) = \frac{(1-p')^2}{16}Z_0Z_1Z_2Z_3$.
By orthogonality of Pauli matrices, $\text{Tr}(P_\alpha P_\beta) = d \delta_{\alpha\beta}$, for a d-dimensional system. Here $d=16$.
\[ \langle S_2 \rangle = \text{Tr}(S_2 \rho_{final}) = \text{Tr}\left(S_2 \left(\dots + \frac{(1-p')^2}{16}S_2 + \dots\right)\right) = \frac{(1-p')^2}{16} \text{Tr}(S_2^2) = \frac{(1-p')^2}{16} \text{Tr}(I_{16}) = (1-p')^2 \]
  • \(\langle S_1S_2 \rangle = \langle YYYY \rangle\). By a similar argument, this operator factors into \((Y_0Y_3 \otimes Y_1Y_2)\).
\[ \langle S_1S_2 \rangle = \langle YY \rangle_{\rho_{nb}} \langle YY \rangle_{\rho_{nb}} = (-(1-p'))^2 = (1-p')^2 \]

All three non-trivial stabilizer expectation values are equal.

\[ \langle S_1 \rangle = \langle S_2 \rangle = \langle S_1S_2 \rangle = (1-p')^2 = \left(1 - \frac{16p}{15}\right)^2 \]

Substituting these into the expression for \(P_{success}\):

\[ P_{success} = \frac{1}{4}\left[1 + 3\left(1 - \frac{16p}{15}\right)^2\right] \]

3. Compute the Final Logical Fidelity

We now have all the components for \(F_L\). From Subproblem 1, \(F_{phys} = \left(1 - \frac{4p}{5}\right)^2\).

\[ F_L = \frac{F_{phys}}{P_{success}} = \frac{\left(1 - \frac{4p}{5}\right)^2}{\frac{1}{4}\left[1 + 3\left(1 - \frac{16p}{15}\right)^2\right]} \]

This can be simplified to:

\[ F_L(p) = \frac{4\left(1 - \frac{4p}{5}\right)^2}{1 + 3\left(1 - \frac{16p}{15}\right)^2} \]

Expanding this expression, we see that the terms linear in \(p\) cancel out, which is a characteristic feature of error detection. The fidelity is robust to first order in \(p\). \(F_L(p) = 1 - \frac{16}{75}p^2 + O(p^3)\).

Final Answer: The logical state fidelity of the final 2-qubit logical state as a function of the two-qubit gate error rate \(p\) is:

\[ F_L(p) = \frac{\left(1 - \frac{4p}{5}\right)^2}{\frac{1}{4}\left[1 + 3\left(1 - \frac{16p}{15}\right)^2\right]} = \frac{4\left(1 - \frac{4p}{5}\right)^2}{1 + 3\left(1 - \frac{16p}{15}\right)^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 - 4*p/5)**2
    P_success = (1/4) * (1 + 3 * (1 - 16*p/15)**2)
    F_logical = F_physical / P_success
    # ---------------------------------------------------------------

    return F_logical