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

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)

Physical State Fidelity of a 4-Qubit GHZ State

Okay, so the task is to calculate the fidelity of a prepared 4-qubit state, given a specific circuit and a depolarizing error model. Here’s my thought process:

First, I need to understand the circuit. It’s a sequence of CNOT and Hadamard gates: \(H_2\), \(CNOT_{21}\), \(H_0\), \(CNOT_{03}\). The initial state is \(|0000\rangle\). My goal is to prepare a logical GHZ state, represented as \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\). The circuit’s ideal output should approximate the target logical state within the code space.

I have to account for noise. The error model is a depolarizing channel applied after each CNOT gate, meaning after both \(CNOT_{21}\) and \(CNOT_{03}\). The depolarizing channel description is standard, applying Pauli operators on two qubits. I’m using the [[4,2,2]] code, which represents two logical qubits using four physical qubits. I know the stabilizers are \(X_0 X_1 X_2 X_3\) and \(Z_0 Z_1 Z_2 Z_3\) and I also have to use the stabilizers to describe the logical state of my qubits.

The crucial metric is the physical state fidelity. This is the overlap between the ideal target state and the actual noisy state after the circuit is applied. This involves calculating \(\langle \psi_{ideal} | \rho_{final} | \psi_{ideal} \rangle\), which is quite standard.

My strategy involves several steps.

  1. Determining the Ideal Target State: First I needed to find out the physical representation of the logical target state which the circuit should produce. I reviewed the stabilizers, logical operators, and state structure of the [[4,2,2]] code. I want to build the logical state from the initial all zero state, but I will simulate the circuit in order to create the correct physical state.

  2. Ideal Simulation: The next step is a noiseless simulation to find the ideal final 4-qubit state. I’ll trace the circuit step-by-step, starting from \(|0000\rangle\), applying the gates in sequence: \(H_2\), \(CNOT_{21}\), \(H_0\), and \(CNOT_{03}\). This will give me a 4-qubit state \(|\psi_{ideal}\rangle\). I verified that the final ideal state has the stabilizer properties and that the physical state corresponds to the target logical state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\).

  3. Noisy Simulation: Now it is time to simulate the circuit with errors. This means I’ll re-run the calculation again, but now I will need to apply the depolarizing channels after each CNOT gate. So I will have to simulate the following: apply \(H_2\), then \(CNOT_{21}\), then the depolarizing channel. Then apply \(H_0\), then \(CNOT_{03}\), then the depolarizing channel. This requires working with density matrices. Each time I apply a CNOT and then apply the channel, I have to account for a two-qubit depolarizing channel. So this is going to be messy!

  4. Fidelity Calculation: Finally, I have to compute the physical fidelity. The fidelity calculation relies on calculating the fidelity given the ideal and noisy output.

I got stuck a little bit in how the initial logical target state would map with the code space, but I was able to get it to work by focusing on the physical state fidelity. It is crucial to determine the effect of the depolarizing channel and how it acts on the density matrix. The key to the calculation is determining the values of the coefficients \(A, B\), and \(C\), by summing the matrix elements. Then, I can explicitly state the fidelity!

The problem asks for the physical state fidelity of the final 4-qubit state, starting from \(|0000\rangle\), after applying a given circuit with depolarizing errors.

The circuit is \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\). The operations are applied in reverse order (right-to-left). Initial state: \(\rho_0 = |0000\rangle\langle0000|\).

1. Determine the ideal final state. The sequence of ideal operations is: a. Apply \(H_2\) to qubit 2: \(|\psi_1\rangle = (I \otimes I \otimes H \otimes I) |0000\rangle = |00+\rangle|0\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0010\rangle)\). b. Apply \(CNOT_{21}\) (control 2, target 1): \(|\psi_2\rangle = CNOT_{21} |\psi_1\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0110\rangle)\). c. Apply \(H_0\) to qubit 0: \(|\psi_3\rangle = (H \otimes I \otimes I \otimes I) |\psi_2\rangle = \frac{1}{2}(|0000\rangle + |1000\rangle + |0110\rangle + |1110\rangle)\). d. Apply \(CNOT_{03}\) (control 0, target 3): \(|\psi_{ideal}\rangle = CNOT_{03} |\psi_3\rangle = \frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\). This is the ideal target state. Let \(\rho_{ideal} = |\psi_{ideal}\rangle\langle\psi_{ideal}|\).

2. Model the noisy evolution. Each \(CNOT_{ij}\) gate is followed by a two-qubit depolarizing error channel \(\mathcal{E}_{ij}\) on qubits \(i\) and \(j\). The channel is defined as \(\mathcal{E}(\rho) = (1-p)\rho + \frac{p}{15} \sum_{P \in \mathcal{P}_2 \setminus \{I_2\}} P \rho P^\dagger\), where \(\mathcal{P}_2\) contains the 16 two-qubit Pauli operators.

Let \(U_{H2} = I \otimes I \otimes H \otimes I\). Let \(U_{C21} = CNOT_{21}\). Let \(U_{H0} = H \otimes I \otimes I \otimes I\). Let \(U_{C03} = CNOT_{03}\).

The state evolution is: \(\rho_0 = |0000\rangle\langle0000|\). \(\rho_1 = U_{H2} \rho_0 U_{H2}^\dagger\). (No error on single-quubit gate) \(\rho_2^{noisy} = \mathcal{E}_{21}(U_{C21} \rho_1 U_{C21}^\dagger)\). \(\rho_3 = U_{H0} \rho_2^{noisy} U_{H0}^\dagger\). (No error on single-quubit gate) \(\rho_{final} = \mathcal{E}_{03}(U_{C03} \rho_3 U_{C03}^\dagger)\).

Let’s expand \(\rho_{final}\) in terms of the ideal state \(\rho_{ideal}\): \(\rho_{final} = \mathcal{E}_{03}(U_{C03} U_{H0} \mathcal{E}_{21}(U_{C21} U_{H2} \rho_0 U_{H2}^\dagger U_{C21}^\dagger) U_{H0}^\dagger U_{C03}^\dagger)\). Let \(\rho_{ideal}^{(21)} = U_{C21} U_{H2} \rho_0 U_{H2}^\dagger U_{C21}^\dagger\). Let \(\rho_{ideal}^{(0)} = U_{H0} \rho_{ideal}^{(21)} U_{H0}^\dagger\). Note that \(\rho_{ideal} = U_{C03} \rho_{ideal}^{(0)} U_{C03}^\dagger\).

The state after the first noisy gate: \(\rho_2^{noisy} = (1-p)\rho_{ideal}^{(21)} + \frac{p}{15} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I \otimes I\}} P_k \rho_{ideal}^{(21)} P_k^\dagger\). Applying \(U_{H0}\): \(\rho_3 = U_{H0} \rho_2^{noisy} U_{H0}^\dagger = (1-p)U_{H0}\rho_{ideal}^{(21)}U_{H0}^\dagger + \frac{p}{15} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I \otimes I\}} U_{H0}P_k \rho_{ideal}^{(21)}P_k^\dagger U_{H0}^\dagger\). Since \(P_k\) acts on qubits 1 and 2, and \(U_{H0}\) acts on qubit 0, they commute: \(U_{H0}P_k = P_k U_{H0}\). So, \(\rho_3 = (1-p)\rho_{ideal}^{(0)} + \frac{p}{15} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I \otimes I\}} P_k \rho_{ideal}^{(0)} P_k^\dagger\). Finally, apply \(U_{C03}\) and its error channel: \(\rho_{final} = \mathcal{E}_{03}(U_{C03} \rho_3 U_{C03}^\dagger) = (1-p)U_{C03} \rho_3 U_{C03}^\dagger + \frac{p}{15} \sum_{P_j \in \mathcal{P}_{03} \setminus \{I \otimes I\}} P_j U_{C03} \rho_3 U_{C03}^\dagger P_j^\dagger\). Substitute \(\rho_3\): \(\rho_{final} = (1-p) U_{C03} \left( (1-p)\rho_{ideal}^{(0)} + \frac{p}{15} \sum_{P_k} P_k \rho_{ideal}^{(0)} P_k^\dagger \right) U_{C03}^\dagger + \frac{p}{15} \sum_{P_j} P_j U_{C03} \left( (1-p)\rho_{ideal}^{(0)} + \frac{p}{15} \sum_{P_k} P_k \rho_{ideal}^{(0)} P_k^\dagger \right) U_{C03}^\dagger P_j^\dagger\). Again, \(P_k\) (on qubits 1,2) commutes with \(U_{C03}\) (on qubits 0,3). So, \(U_{C03} P_k \rho_{ideal}^{(0)} P_k^\dagger U_{C03}^\dagger = P_k U_{C03} \rho_{ideal}^{(0)} U_{C03}^\dagger P_k^\dagger = P_k \rho_{ideal} P_k^\dagger\). This gives: \(\rho_{final} = (1-p)^2 \rho_{ideal} + (1-p)\frac{p}{15} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} P_k \rho_{ideal} P_k^\dagger + (1-p)\frac{p}{15} \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} P_j \rho_{ideal} P_j^\dagger + \left(\frac{p}{15}\right)^2 \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} P_j P_k \rho_{ideal} P_k^\dagger P_j^\dagger\). Since \(P_j\) and \(P_k\) act on disjoint sets of qubits, they commute: \(P_j P_k = P_k P_j\). Also, \(P_j P_k \rho_{ideal} P_k^\dagger P_j^\dagger = P_j P_k \rho_{ideal} (P_j P_k)^\dagger\).

3. Calculate the fidelity. The physical state fidelity is \(F = \langle \psi_{ideal} | \rho_{final} | \psi_{ideal} \rangle\). \(F = (1-p)^2 \langle \psi_{ideal} | \rho_{ideal} | \psi_{ideal} \rangle + (1-p)\frac{p}{15} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} |\langle \psi_{ideal} | P_k | \psi_{ideal} \rangle|^2 + (1-p)\frac{p}{15} \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} |\langle \psi_{ideal} | P_j | \psi_{ideal} \rangle|^2 + \left(\frac{p}{15}\right)^2 \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} |\langle \psi_{ideal} | P_j P_k | \psi_{ideal} \rangle|^2\).

Let \(|\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\). The fidelity \(F\) depends on the expectation values of various Pauli operators. For a pure state \(|\psi\rangle\), \(\langle \psi | P | \psi \rangle = \pm 1\) if \(P\) maps \(|\psi\rangle\) to itself (up to phase), and \(0\) otherwise. For \(|\psi_{ideal}\rangle\), a non-zero expectation value implies \(P|\psi_{ideal}\rangle = \pm |\psi_{ideal}\rangle\).

Let’s list the Pauli operators \(P\) for which \(|\langle \psi_{ideal} | P | \psi_{ideal} \rangle|^2 \ne 0\): - \(I\): \(\langle \psi_{ideal} | I | \psi_{ideal} \rangle = 1\). - \(X_0X_3\): \(X_0X_3|\psi_{ideal}\rangle = \frac{1}{2}(|1001\rangle+|0000\rangle+|1111\rangle+|0110\rangle) = |\psi_{ideal}\rangle\). So \(|\langle \psi_{ideal} | X_0X_3 | \psi_{ideal} \rangle|^2 = 1\). - \(Y_0Y_3\): \(Y_0Y_3|\psi_{ideal}\rangle = \frac{1}{2}(-|1001\rangle+|0000\rangle-|1111\rangle+|0110\rangle) = -|\psi_{ideal}\rangle\). So \(|\langle \psi_{ideal} | Y_0Y_3 | \psi_{ideal} \rangle|^2 = 1\). - \(Z_0Z_3\): \(Z_0Z_3|\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle+|1001\rangle+|0110\rangle+|1111\rangle) = |\psi_{ideal}\rangle\). So \(|\langle \psi_{ideal} | Z_0Z_3 | \psi_{ideal} \rangle|^2 = 1\). - \(X_1X_2\): \(X_1X_2|\psi_{ideal}\rangle = \frac{1}{2}(|0110\rangle+|1101\rangle+|0000\rangle+|1001\rangle) = |\psi_{ideal}\rangle\). So \(|\langle \psi_{ideal} | X_1X_2 | \psi_{ideal} \rangle|^2 = 1\). - \(Y_1Y_2\): \(Y_1Y_2|\psi_{ideal}\rangle = \frac{1}{2}(-|0110\rangle-|1101\rangle-|0000\rangle-|1001\rangle) = -|\psi_{ideal}\rangle\). So \(|\langle \psi_{ideal} | Y_1Y_2 | \psi_{ideal} \rangle|^2 = 1\). - \(Z_1Z_2\): \(Z_1Z_2|\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle+|1001\rangle+|0110\rangle+|1111\rangle) = |\psi_{ideal}\rangle\). So \(|\langle \psi_{ideal} | Z_1Z_2 | \psi_{ideal} \rangle|^2 = 1\).

All other 1-qubit or 2-qubit Pauli operators (on a subset of qubits) result in \(\langle \psi_{ideal} | P | \psi_{ideal} \rangle = 0\).

Let’s define the sums: - \(A = \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} |\langle \psi_{ideal} | P_k | \psi_{ideal} \rangle|^2\): These are Pauli operators acting on qubits 1 and 2. The only terms contributing are \(X_1X_2\), \(Y_1Y_2\), \(Z_1Z_2\). Thus \(A = 1+1+1=3\). - \(B = \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} |\langle \psi_{ideal} | P_j | \psi_{ideal} \rangle|^2\): These are Pauli operators acting on qubits 0 and 3. The only terms contributing are \(X_0X_3\), \(Y_0Y_3\), \(Z_0Z_3\). Thus \(B = 1+1+1=3\).

  • \(C = \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} |\langle \psi_{ideal} | P_j P_k | \psi_{ideal} \rangle|^2\): The product \(P_j P_k\) is a 4-qubit Pauli operator. For \(|\langle \psi_{ideal} | P_j P_k | \psi_{ideal} \rangle|^2\) to be non-zero, \(P_j P_k\) must map \(|\psi_{ideal}\rangle\) to \(\pm |\psi_{ideal}\rangle\). The operators that do this are \(I\), \(S_1=X_0X_1X_2X_3\), \(S_2=Z_0Z_1Z_2Z_3\), and \(S_1S_2=Y_0Y_1Y_2Y_3\). We need to find combinations of non-identity \(P_j \in \mathcal{P}_{03}\) and \(P_k \in \mathcal{P}_{21}\) that form these operators:
    • For \(S_1=X_0X_1X_2X_3\): this requires \(P_j=X_0X_3\) (non-identity) and \(P_k=X_1X_2\) (non-identity). This term contributes 1.
    • For \(S_2=Z_0Z_1Z_2Z_3\): this requires \(P_j=Z_0Z_3\) (non-identity) and \(P_k=Z_1Z_2\) (non-identity). This term contributes 1.
    • For \(S_1S_2=Y_0Y_1Y_2Y_3\): this requires \(P_j=Y_0Y_3\) (non-identity) and \(P_k=Y_1Y_2\) (non-identity). This term contributes 1.
    • For \(I\): this requires \(P_j=I_0I_3\) or \(P_k=I_1I_2\). However, \(P_j\) and \(P_k\) are explicitly chosen from the set of non-identity 2-qubit Paulis for their respective pairs of qubits. So the combination \(P_j P_k = I\) is not possible. Thus \(C = 1+1+1=3\).

Substitute \(A, B, C\) into the fidelity formula:

\[ F = (1-p)^2 + (1-p)\frac{p}{15} (A+B) + \left(\frac{p}{15}\right)^2 C \]
\[ F = (1-p)^2 + (1-p)\frac{p}{15} (3+3) + \left(\frac{p}{15}\right)^2 (3) \]
\[ F = (1-2p+p^2) + (1-p)\frac{6p}{15} + \frac{3p^2}{225} \]
\[ F = (1-2p+p^2) + \left(\frac{2p}{5} - \frac{2p^2}{5}\right) + \frac{p^2}{75} \]

Combine terms by powers of \(p\):

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

The final expression for the physical state fidelity is:

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

The final answer is \(\boxed{1 - \frac{8p}{5} + \frac{46p^2}{75}}\)

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)

Summary of My Thinking Process

Okay, here’s what I’m thinking about this problem: The user wants the logical state fidelity after we’ve filtered out (post-selected) any errors that we can detect. Essentially, I need to take the noisy state and project it back into the “good” code space, and then figure out how “good” that resulting state is compared to the perfect ideal state.

First, I need to look back at Subproblem 1 to remember what the ideal and noisy states were. The ideal state is given, and the noisy final state is a sum of the ideal state and various error terms, accounting for the probability of those errors happening.

Now I need to define the code space, which is basically the set of states that our code can represent. I know it’s a [[4,2,2]] code, which means it encodes 2 logical qubits into 4 physical qubits, and it has distance 2. That lets me define the code space using stabilizers (the operators that don’t change the state within the code space). The projectors, made from these stabilizers, are how I’m going to actually project the noisy state. I can simplify the projector form using the fact that stabilizers are related to each other.

Next, I’m projecting the noisy state onto the code space. This gives me a new (unnormalized) state. The logical fidelity is the fidelity with this projected state, defined as a ratio involving the perfect state, the projected state, and the trace of the projected state (for normalization).

Now, the math kicks in. I notice that the inner product with the ideal state in the numerator simplifies because the ideal state already lives in the code space. This means I’m just left with the original physical fidelity I calculated earlier (from Subproblem 1). The important part is the trace. To find the logical fidelity, I need to know the trace of my projected density matrix. This means I need to compute the expectation value of all the stabilizers in the noisy density matrix.

I go term-by-term through the noisy density matrix, applying the stabilizers to the ideal state and doing a little careful accounting. Things involving the Pauli matrices, and their commutation/anti-commutation properties are important for figuring out these traces. I’ve got this because I’m an expert in this field. It’s tricky with all the sums, but I know how to handle it. In some cases, the stabilizers just commute, so it is just one, in other cases they anti-commute or don’t preserve the ideal state. That means the trace of a noisy operator plus stabilizer is just the stabilizer term in that matrix.

I repeat this procedure for each stabilizer. It becomes evident the contributions come in pairs. The crucial sums involve the Pauli errors and the stabilizers. I then combine these traces, along with a constant factor to get the total trace, which turns out to be a function of the error probability, p. Once I’ve got this trace, I divide to get the logical fidelity.

I check that the formula makes sense. When there’s no noise (p=0), I should get a logical fidelity of 1, which it does. I’m looking for an exact expression, so I need to present the formula as a ratio of the polynomials in p. I can expand this expression in a power series in p, as well, and there is a lot of arithmetic which should be double checked, but this is the right expression.

To find the logical state fidelity with post-selection, we need to calculate the ratio of the physical fidelity to the probability of successfully projecting the noisy state onto the code space.

The logical state fidelity \(F_L\) is defined as:

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

where \(P_{\mathcal{C}}\) is the projector onto the code space. Since the ideal state \(|\psi_{ideal}\rangle\) is by definition in the code space, \(P_{\mathcal{C}} |\psi_{ideal}\rangle = |\psi_{ideal}\rangle\). Also, \(P_{\mathcal{C}}\) is a projector, so \(P_{\mathcal{C}}^\dagger = P_{\mathcal{C}}\) and \(P_{\mathcal{C}}^2 = P_{\mathcal{C}}\). Thus, the numerator simplifies to \(\langle \psi_{ideal} | \rho_{final} | \psi_{ideal} \rangle\), which is exactly the physical state fidelity \(F\) calculated in Subproblem 1. The denominator is \(\text{Tr}(P_{\mathcal{C}} \rho_{final} P_{\mathcal{C}}) = \text{Tr}(P_{\mathcal{C}}^2 \rho_{final}) = \text{Tr}(P_{\mathcal{C}} \rho_{final})\). So, \(F_L = \frac{F}{\text{Tr}(P_{\mathcal{C}} \rho_{final})}\).

1. Recall the physical state fidelity (\(F\)) from Subproblem 1: The ideal target state is \(|\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\). The noisy final state is \(\rho_{final} = (1-p)^2 \rho_{ideal} + (1-p)\frac{p}{15} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} P_k \rho_{ideal} P_k^\dagger + (1-p)\frac{p}{15} \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} P_j \rho_{ideal} P_j^\dagger + \left(\frac{p}{15}\right)^2 \sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} P_j P_k \rho_{ideal} P_k^\dagger P_j^\dagger\). The physical fidelity \(F = \langle \psi_{ideal} | \rho_{final} | \psi_{ideal} \rangle\) was found to be:

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

2. Determine the projector onto the code space (\(P_{\mathcal{C}}\)): The stabilizers are \(S_1 = X_0X_1X_2X_3\) and \(S_2 = Z_0Z_1Z_2Z_3\). The projector onto the code space (the \(+1\) eigenspace of all stabilizers) is:

\[ P_{\mathcal{C}} = \frac{1}{4}(I+S_1+S_2+S_1S_2) \]

where \(S_1S_2 = X_0X_1X_2X_3 Z_0Z_1Z_2Z_3 = Y_0Y_1Y_2Y_3\).

3. Calculate the trace of the projected noisy state, \(\text{Tr}(P_{\mathcal{C}} \rho_{final})\):

\[ \text{Tr}(P_{\mathcal{C}} \rho_{final}) = \frac{1}{4} \left( \text{Tr}(\rho_{final}) + \text{Tr}(S_1 \rho_{final}) + \text{Tr}(S_2 \rho_{final}) + \text{Tr}(S_1S_2 \rho_{final}) \right) \]

First, \(\text{Tr}(\rho_{final}) = 1\) since \(\rho_{final}\) is a normalized density matrix.

Next, consider \(\text{Tr}(S \rho_{final})\) for \(S \in \{S_1, S_2, S_1S_2\}\). Each of these terms will be of the form:

\[ \text{Tr}(S \rho_{final}) = (1-p)^2 \langle \psi_{ideal} | S | \psi_{ideal} \rangle + (1-p)\frac{p}{15} \sum_{P_k} \langle \psi_{ideal} | P_k^\dagger S P_k | \psi_{ideal} \rangle + (1-p)\frac{p}{15} \sum_{P_j} \langle \psi_{ideal} | P_j^\dagger S P_j | \psi_{ideal} \rangle + \left(\frac{p}{15}\right)^2 \sum_{P_j,P_k} \langle \psi_{ideal} | (P_j P_k)^\dagger S (P_j P_k) | \psi_{ideal} \rangle \]

where \(P_k\) are non-identity 2-qubit Paulis on qubits (1,2) and \(P_j\) are non-identity 2-qubit Paulis on qubits (0,3).

Let’s evaluate each sum: - Term 1: \(\langle \psi_{ideal} | S | \psi_{ideal} \rangle = 1\) for \(S \in \{S_1, S_2, S_1S_2\}\), as they are stabilizers of \(|\psi_{ideal}\rangle\).

  • Term 2: \(\sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} \langle \psi_{ideal} | P_k^\dagger S P_k | \psi_{ideal} \rangle\).

    • For \(S=S_1=X_0X_1X_2X_3\): \(P_k^\dagger S_1 P_k = X_0X_3 (P_k^\dagger X_1X_2 P_k)\). This term is non-zero (equal to 1) only if \(P_k^\dagger X_1X_2 P_k = X_1X_2\), which happens for \(P_k=X_1X_2\). All other \(P_k\) on qubits (1,2) result in \(\langle \psi_{ideal} | X_0X_3 (P_k^\dagger X_1X_2 P_k) | \psi_{ideal} \rangle = 0\). So this sum is \(1\).
    • For \(S=S_2=Z_0Z_1Z_2Z_3\): \(P_k^\dagger S_2 P_k = Z_0Z_3 (P_k^\dagger Z_1Z_2 P_k)\). This term is non-zero (equal to 1) only if \(P_k^\dagger Z_1Z_2 P_k = Z_1Z_2\), which happens for \(P_k=Z_1Z_2\). So this sum is \(1\).
    • For \(S=S_1S_2=Y_0Y_1Y_2Y_3\): \(P_k^\dagger S_1S_2 P_k = Y_0Y_3 (P_k^\dagger Y_1Y_2 P_k)\). This term is non-zero (equal to 1) only if \(P_k^\dagger Y_1Y_2 P_k = Y_1Y_2\), which happens for \(P_k=Y_1Y_2\). So this sum is \(1\).
  • Term 3: \(\sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} \langle \psi_{ideal} | P_j^\dagger S P_j | \psi_{ideal} \rangle\). By symmetry with Term 2, this sum is also \(1\) for each \(S \in \{S_1, S_2, S_1S_2\}\).

  • Term 4: \(\sum_{P_j \in \mathcal{P}_{03} \setminus \{I_0I_3\}} \sum_{P_k \in \mathcal{P}_{21} \setminus \{I_2I_1\}} \langle \psi_{ideal} | (P_j P_k)^\dagger S (P_j P_k) | \psi_{ideal} \rangle\). Since \(P_j\) and \(P_k\) act on disjoint qubits, they commute. \(P_j P_k\) is a 4-qubit Pauli. The only 4-qubit Paulis that map \(|\psi_{ideal}\rangle\) to itself (up to phase) are \(I, S_1, S_2, S_1S_2\). The sums for \(P_j, P_k\) exclude \(I_2I_1\) and \(I_0I_3\), so \(P_j P_k\) cannot be \(I\). Thus, non-zero terms arise only when \(P_j P_k \in \{S_1, S_2, S_1S_2\}\).

    • For \(S=S_1\): \(\langle \psi_{ideal} | (P_jP_k)^\dagger S_1 (P_jP_k) | \psi_{ideal} \rangle\). Since \(S_1, S_2, S_1S_2\) commute with \(S_1\), for each of the three cases (\(P_j P_k = S_1, S_2, S_1S_2\)), this value is \(\langle \psi_{ideal} | S_1 | \psi_{ideal} \rangle = 1\). So this sum is \(3\).
    • For \(S=S_2\): \(\langle \psi_{ideal} | (P_jP_k)^\dagger S_2 (P_jP_k) | \psi_{ideal} \rangle\). Since \(S_1, S_2, S_1S_2\) commute with \(S_2\), for each of the three cases, this value is \(\langle \psi_{ideal} | S_2 | \psi_{ideal} \rangle = 1\). So this sum is \(3\).
    • For \(S=S_1S_2\): \(\langle \psi_{ideal} | (P_jP_k)^\dagger S_1S_2 (P_jP_k) | \psi_{ideal} \rangle\). Since \(S_1, S_2, S_1S_2\) commute with \(S_1S_2\), for each of the three cases, this value is \(\langle \psi_{ideal} | S_1S_2 | \psi_{ideal} \rangle = 1\). So this sum is \(3\).

Now, substitute these sums back into the expression for \(\text{Tr}(S \rho_{final})\) for \(S \in \{S_1, S_2, S_1S_2\}\):

\[ \text{Tr}(S \rho_{final}) = (1-p)^2(1) + (1-p)\frac{p}{15}(1) + (1-p)\frac{p}{15}(1) + \left(\frac{p}{15}\right)^2(3) \]
\[ \text{Tr}(S \rho_{final}) = (1-2p+p^2) + \frac{2p(1-p)}{15} + \frac{3p^2}{225} \]
\[ \text{Tr}(S \rho_{final}) = 1 - 2p + p^2 + \frac{2p}{15} - \frac{2p^2}{15} + \frac{p^2}{75} \]
\[ \text{Tr}(S \rho_{final}) = 1 + p\left(-2 + \frac{2}{15}\right) + p^2\left(1 - \frac{2}{15} + \frac{1}{75}\right) \]
\[ \text{Tr}(S \rho_{final}) = 1 - \frac{28p}{15} + p^2\left(\frac{75 - 30 + 1}{75}\right) = 1 - \frac{28p}{15} + \frac{46p^2}{75} \]

This expression is the same for \(S_1\), \(S_2\), and \(S_1S_2\).

Now, substitute back into the overall trace:

\[ \text{Tr}(P_{\mathcal{C}} \rho_{final}) = \frac{1}{4} \left( 1 + 3 \left( 1 - \frac{28p}{15} + \frac{46p^2}{75} \right) \right) \]
\[ \text{Tr}(P_{\mathcal{C}} \rho_{final}) = \frac{1}{4} \left( 1 + 3 - \frac{84p}{15} + \frac{138p^2}{75} \right) \]
\[ \text{Tr}(P_{\mathcal{C}} \rho_{final}) = \frac{1}{4} \left( 4 - \frac{28p}{5} + \frac{46p^2}{25} \right) \]
\[ \text{Tr}(P_{\mathcal{C}} \rho_{final}) = 1 - \frac{7p}{5} + \frac{23p^2}{25} \]

4. Calculate the logical fidelity \(F_L\):

\[ F_L = \frac{F}{\text{Tr}(P_{\mathcal{C}} \rho_{final})} = \frac{1 - \frac{8p}{5} + \frac{46p^2}{75}}{1 - \frac{7p}{5} + \frac{23p^2}{25}} \]

To present this as a single fraction: Numerator: \(\frac{75 - 120p + 46p^2}{75}\) Denominator: \(\frac{25 - 35p + 23p^2}{25}\)

\[ F_L = \frac{75 - 120p + 46p^2}{75} \times \frac{25}{25 - 35p + 23p^2} \]
\[ F_L = \frac{75 - 120p + 46p^2}{3(25 - 35p + 23p^2)} \]
\[ F_L = \frac{75 - 120p + 46p^2}{75 - 105p + 69p^2} \]

The final answer is \(\boxed{\frac{75 - 120p + 46p^2}{75 - 105p + 69p^2}}\)

User #5

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

To calculate the logical state fidelity, we need to consider the probability of successfully preparing the state given the measurement outcome and code space projection, and the overlap of this post-selected state with the ideal logical state.

The logical state fidelity \(F_L\) with post-selection is given by:

\[ F_L = \frac{\langle \psi_{ideal}^{(5q)} | \rho_{final,5q} | \psi_{ideal}^{(5q)} \rangle}{\text{Tr}((P_{\mathcal{C}}^{(4q)} \otimes P_0^{(4)}) \rho_{final,5q})} \]

where: - \(|\psi_{ideal}^{(5q)}\rangle\) is the 5-qubit ideal state just before measurement, which has the ancilla (qubit 4) in \(|0\rangle\) and the other 4 qubits in the target logical state within the code space. - \(\rho_{final,5q}\) is the noisy 5-qubit state just before measurement. - \(P_{\mathcal{C}}^{(4q)}\) is the projector onto the 4-qubit code space. - \(P_0^{(4)} = I_4 \otimes |0\rangle\langle0|_4\) is the projector for the ancilla qubit 4 to be in \(|0\rangle\).

1. Determine the ideal 5-qubit state \(|\psi_{ideal}^{(5q)}\rangle\) The circuit operations (right-to-left) on the initial state \(|00000\rangle\) are: a. \(H_1\): \(|0+000\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |01000\rangle)\). b. \(CNOT_{12}\): \(\frac{1}{\sqrt{2}}(|00000\rangle + |01100\rangle)\). c. \(CNOT_{10}\): \(\frac{1}{\sqrt{2}}(|00000\rangle + |11100\rangle)\). d. \(CNOT_{23}\): \(\frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\). e. \(CNOT_{34}\): \(\frac{1}{\sqrt{2}}(|00000\rangle + |11111\rangle)\). f. \(CNOT_{04}\): \(\frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\). So, the ideal 5-qubit state just before measurement is \(|\psi_{ideal}^{(5q)}\rangle = \frac{1}{\sqrt{2}}(|00000\rangle + |11110\rangle)\). This state has qubit 4 in \(|0\rangle\) and the first four qubits form the logical \(|00\rangle_{AB}\) state: \(|\psi_{ideal}^{(4q)}\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |1111\rangle)\).

The operators \(Q\) that map \(|\psi_{ideal}^{(5q)}\rangle\) to \(\pm |\psi_{ideal}^{(5q)}\rangle\) (i.e., whose expectation value is \(\pm 1\)) are: \(\mathcal{P}_{nz} = \{I, X_0X_1X_2X_3I_4, Z_0Z_1Z_2Z_3I_4, Y_0Y_1Y_2Y_3I_4, I_0I_1I_2I_3Z_4, X_0X_1X_2X_3Z_4, Z_0Z_1Z_2Z_3Z_4, Y_0Y_1Y_2Y_3Z_4\}\). There are 8 such operators. For any \(Q \in \mathcal{P}_{nz}\), \(|\langle \psi_{ideal}^{(5q)} | Q | \psi_{ideal}^{(5q)} \rangle|^2 = 1\). For \(Q \notin \mathcal{P}_{nz}\), \(|\langle \psi_{ideal}^{(5q)} | Q | \psi_{ideal}^{(5q)} \rangle|^2 = 0\).

2. Calculate the numerator: \(N = \langle \psi_{ideal}^{(5q)} | \rho_{final,5q} | \psi_{ideal}^{(5q)} \rangle\) There are 5 CNOT gates, each followed by a depolarizing channel. Let \(N_C=5\). \(\rho_{final,5q} = (1-p)^{N_C} \rho_{ideal}^{(5q)} + (1-p)^{N_C-1} \frac{p}{15} \sum_{k=1}^{N_C} \sum_{P \in \mathcal{P}_{k, \text{qubits}} \setminus \{I_2\}} P_k' \rho_{ideal}^{(5q)} P_k'^\dagger + O(p^2)\). Here, \(P_k'\) is the effective Pauli error \(U^{(k)}_{post} P (U^{(k)}_{post})^\dagger\), where \(U^{(k)}_{post}\) is the sequence of ideal gates following the \(k\)-th CNOT gate’s error. \(N = (1-p)^{N_C} + (1-p)^{N_C-1} \frac{p}{15} \sum_{k=1}^{N_C} \sum_{P \in \mathcal{P}_{k, \text{qubits}} \setminus \{I_2\}} |\langle \psi_{ideal}^{(5q)} | P_k' | \psi_{ideal}^{(5q)} \rangle|^2 + O(p^2)\). The inner sum (let’s call it \(A_k\)) only counts errors \(P_k'\) that are in \(\mathcal{P}_{nz} \setminus \{I_5\}\).

Let’s find \(A_k\) for each CNOT error: - Error after \(CNOT_{04}\) (qubits 0,4): \(U^{(5)}_{post}=I\). \(P_5' = P_{04}\). Only \(I_0Z_4\) (i.e. \(Z_4\)) is in \(\mathcal{P}_{nz} \setminus \{I_5\}\). So \(A_5=1\). - Error after \(CNOT_{34}\) (qubits 3,4): \(U^{(4)}_{post}=CNOT_{04}\). \(P_4' = C_{04}P_{34}C_{04}^\dagger\). Only \(I_3Z_4\) (which transforms to \(I_3Z_4\)) is in \(\mathcal{P}_{nz} \setminus \{I_5\}\). So \(A_4=1\). - Error after \(CNOT_{23}\) (qubits 2,3): \(U^{(3)}_{post}=CNOT_{04}CNOT_{34}\). \(P_3' = C_{04}C_{34}P_{23}C_{34}^\dagger C_{04}^\dagger\). No \(P_{23}\) error transforms into an element of \(\mathcal{P}_{nz} \setminus \{I_5\}\). So \(A_3=0\). - Error after \(CNOT_{10}\) (qubits 1,0): \(U^{(2)}_{post}=CNOT_{04}CNOT_{34}CNOT_{23}\). \(P_2' = C_{04}C_{34}C_{23}P_{10}C_{23}^\dagger C_{34}^\dagger C_{04}^\dagger = C_{04}P_{10}C_{04}^\dagger\) (as \(P_{10}\) commutes with \(C_{23}, C_{34}\)). No \(P_{10}\) error transforms into an element of \(\mathcal{P}_{nz} \setminus \{I_5\}\). So \(A_2=0\). - Error after \(CNOT_{12}\) (qubits 1,2): \(U^{(1)}_{post}=CNOT_{04}CNOT_{34}CNOT_{23}CNOT_{10}\). No \(P_{12}\) error transforms into an element of \(\mathcal{P}_{nz} \setminus \{I_5\}\). So \(A_1=0\).

So, \(\sum_{k=1}^5 A_k = 1+1+0+0+0 = 2\). \(N = (1-p)^5 + \frac{2p}{15}(1-p)^4 + O(p^2) = (1-p)^4 \left( (1-p) + \frac{2p}{15} \right) = (1-p)^4 \left( 1 - \frac{13p}{15} \right)\). Expanding to \(O(p^2)\): \(N = (1 - 4p + 6p^2) \left( 1 - \frac{13p}{15} \right) + O(p^3)\) \(N = 1 - \frac{13p}{15} - 4p + \frac{52p^2}{15} + 6p^2 + O(p^3)\) \(N = 1 + p\left(-\frac{13}{15} - \frac{60}{15}\right) + p^2\left(\frac{52}{15} + \frac{90}{15}\right) + O(p^3)\) \(N = 1 - \frac{73p}{15} + \frac{142p^2}{15} + O(p^3)\).

3. Calculate the denominator: \(D = \text{Tr}((P_{\mathcal{C}}^{(4q)} \otimes P_0^{(4)}) \rho_{final,5q})\) Let \(P_{proj} = P_{\mathcal{C}}^{(4q)} \otimes P_0^{(4)} = \frac{1}{4}(I+S_1+S_2+S_1S_2) \otimes |0\rangle\langle0|_4\). \(D = (1-p)^{N_C} \text{Tr}(P_{proj} \rho_{ideal}^{(5q)}) + (1-p)^{N_C-1} \frac{p}{15} \sum_{k=1}^{N_C} \sum_{P \in \mathcal{P}_{k, \text{qubits}} \setminus \{I_2\}} \text{Tr}(P_{proj} P_k' \rho_{ideal}^{(5q)}) + O(p^2)\). \(\text{Tr}(P_{proj} \rho_{ideal}^{(5q)}) = \langle \psi_{ideal}^{(5q)} | P_{proj} | \psi_{ideal}^{(5q)} \rangle = \frac{1}{4}(1+1+1+1) \cdot 1 = 1\). The sum terms are \(\text{Tr}(P_{proj} P_k' \rho_{ideal}^{(5q)}) = \langle \psi_{ideal}^{(5q)} | P_{proj} P_k' | \psi_{ideal}^{(5q)} \rangle\). This is \(\frac{1}{4} \left( \langle \psi_{ideal}^{(5q)} | P_k' | \psi_{ideal}^{(5q)} \rangle + \langle \psi_{ideal}^{(5q)} | S_1 P_k' | \psi_{ideal}^{(5q)} \rangle + \langle \psi_{ideal}^{(5q)} | S_2 P_k' | \psi_{ideal}^{(5q)} \rangle + \langle \psi_{ideal}^{(5q)} | S_1S_2 P_k' | \psi_{ideal}^{(5q)} \rangle \right)\). Crucially, if \(P_k'\) contains \(X_4\) or \(Y_4\) (i.e. \(P_4 \notin \{I_4, Z_4\}\)), then \(P_k'|\psi_{ideal}^{(5q)}\rangle\) will be orthogonal to \(|0\rangle_4\) (since \(X_4|0\rangle=|1\rangle\), \(Y_4|0\rangle=i|1\rangle\)). In this case, \(P_{proj}P_k'|\psi_{ideal}^{(5q)}\rangle=0\), so such errors contribute 0 to \(D\). We only need to consider \(P_k'\) where \(P_4 \in \{I_4, Z_4\}\).

Let’s find \(A_k'\) (the coefficient for \(D\)) for each CNOT error. - Error after \(CNOT_{04}\) (qubits 0,4): \(P_5' = P_{04}\). There are 7 such non-identity errors where \(P_4 \in \{I_4, Z_4\}\): \(\{I_0Z_4, X_0I_4, X_0Z_4, Y_0I_4, Y_0Z_4, Z_0I_4, Z_0Z_4\}\). 1. \(I_0Z_4(=Z_4)\): All 4 terms in the sum are non-zero. Contribution \(4/4=1\). 2. \(X_0I_4\): \(\langle \psi_{ideal}^{(5q)} | S_1 X_0I_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | I_0X_1X_2X_3I_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\). 3. \(X_0Z_4\): \(\langle \psi_{ideal}^{(5q)} | S_1 X_0Z_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | I_0X_1X_2X_3Z_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\). 4. \(Y_0I_4\): \(\langle \psi_{ideal}^{(5q)} | S_1S_2 Y_0I_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | Z_0Y_1Y_2Y_3I_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\). 5. \(Y_0Z_4\): \(\langle \psi_{ideal}^{(5q)} | S_1S_2 Y_0Z_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | Z_0Y_1Y_2Y_3Z_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\). 6. \(Z_0I_4\): All terms are 0. Contribution 0. 7. \(Z_0Z_4\): All terms are 0. Contribution 0. So \(A_5' = 1 + 4 \times (1/4) = 2\).

  • Error after \(CNOT_{34}\) (qubits 3,4): \(P_4' = C_{04}P_{34}C_{04}^\dagger\). This transforms \(P_3I_4\) to \(P_3I_4\) and \(P_3Z_4\) to \(P_3Z_4\). There are 7 such errors where \(P_4 \in \{I_4, Z_4\}\): \(\{I_3Z_4, X_3I_4, X_3Z_4, Y_3I_4, Y_3Z_4, Z_3I_4, Z_3Z_4\}\).

    1. \(I_3Z_4\): All 4 terms are non-zero. Contribution \(4/4=1\).
    2. \(X_3I_4\): \(\langle \psi_{ideal}^{(5q)} | S_1 X_3I_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | X_0X_1X_2I_3I_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\).
    3. \(X_3Z_4\): \(\langle \psi_{ideal}^{(5q)} | S_1 X_3Z_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | X_0X_1X_2I_3Z_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\).
    4. \(Y_3I_4\): \(\langle \psi_{ideal}^{(5q)} | S_1S_2 Y_3I_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | Y_0Y_1Y_2I_3I_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\).
    5. \(Y_3Z_4\): \(\langle \psi_{ideal}^{(5q)} | S_1S_2 Y_3Z_4 | \psi_{ideal}^{(5q)} \rangle = \langle \psi_{ideal}^{(5q)} | Y_0Y_1Y_2I_3Z_4 | \psi_{ideal}^{(5q)} \rangle = 1\). Other terms 0. Contribution \(1/4\).
    6. \(Z_3I_4\): All terms are 0. Contribution 0.
    7. \(Z_3Z_4\): All terms are 0. Contribution 0. So \(A_4' = 1 + 4 \times (1/4) = 2\).
  • Errors after \(CNOT_{23}\) (qubits 2,3): \(P_3' = C_{04}C_{34}P_{23}C_{34}^\dagger C_{04}^\dagger\). \(P_3'\) has \(I_4\). No errors contribute. So \(A_3'=0\).

  • Errors after \(CNOT_{10}\) (qubits 1,0): \(P_2' = C_{04}C_{34}C_{23}P_{10}C_{23}^\dagger C_{34}^\dagger C_{04}^\dagger\). \(P_2'\) has \(I_4\). No errors contribute. So \(A_2'=0\).
  • Errors after \(CNOT_{12}\) (qubits 1,2): \(P_1' = C_{04}C_{34}C_{23}C_{10}P_{12}C_{10}^\dagger C_{23}^\dagger C_{34}^\dagger C_{04}^\dagger\). \(P_1'\) has \(I_4\). No errors contribute. So \(A_1'=0\).

So, \(\sum_{k=1}^5 A_k' = 2+2+0+0+0 = 4\). \(D = (1-p)^5 + \frac{4p}{15}(1-p)^4 + O(p^2) = (1-p)^4 \left( (1-p) + \frac{4p}{15} \right) = (1-p)^4 \left( 1 - \frac{11p}{15} \right)\). Expanding to \(O(p^2)\): \(D = (1 - 4p + 6p^2) \left( 1 - \frac{11p}{15} \right) + O(p^3)\) \(D = 1 - \frac{11p}{15} - 4p + \frac{44p^2}{15} + 6p^2 + O(p^3)\) \(D = 1 + p\left(-\frac{11}{15} - \frac{60}{15}\right) + p^2\left(\frac{44}{15} + \frac{90}{15}\right) + O(p^3)\) \(D = 1 - \frac{71p}{15} + \frac{134p^2}{15} + O(p^3)\).

4. Calculate the logical fidelity \(F_L\):

\[ F_L = \frac{N}{D} = \frac{1 - \frac{73p}{15} + \frac{142p^2}{15} + O(p^3)}{1 - \frac{71p}{15} + \frac{134p^2}{15} + O(p^3)} \]

To expand this to \(O(p^2)\): \(F_L = \left( 1 - \frac{73p}{15} + \frac{142p^2}{15} \right) \left( 1 - \frac{71p}{15} + \frac{134p^2}{15} \right)^{-1} + O(p^3)\) Using \((1-x)^{-1} = 1+x+x^2+O(x^3)\): \(x = \frac{71p}{15} - \frac{134p^2}{15}\). \(F_L = \left( 1 - \frac{73p}{15} + \frac{142p^2}{15} \right) \left( 1 + \left( \frac{71p}{15} - \frac{134p^2}{15} \right) + \left( \frac{71p}{15} \right)^2 \right) + O(p^3)\) \(F_L = 1 + \frac{71p}{15} - \frac{134p^2}{15} + \frac{5041p^2}{225} - \frac{73p}{15} - \frac{73p}{15}\frac{71p}{15} + \frac{142p^2}{15} + O(p^3)\) \(F_L = 1 + p\left(\frac{71}{15} - \frac{73}{15}\right) + p^2\left(-\frac{134}{15} + \frac{5041}{225} - \frac{73 \times 71}{225} + \frac{142}{15}\right) + O(p^3)\) \(F_L = 1 - \frac{2p}{15} + p^2\left(-\frac{134 \times 15}{225} + \frac{5041}{225} - \frac{5183}{225} + \frac{142 \times 15}{225}\right) + O(p^3)\) \(F_L = 1 - \frac{2p}{15} + p^2\left(\frac{-2010 + 5041 - 5183 + 2130}{225}\right) + O(p^3)\) \(F_L = 1 - \frac{2p}{15} + p^2\left(\frac{-22}{225}\right) + O(p^3)\) \(F_L = 1 - \frac{2p}{15} - \frac{22p^2}{225} + O(p^3)\).

The logical state fidelity, as a function of \(p\), up to \(O(p^2)\), is \(1 - \frac{2p}{15} - \frac{22p^2}{225}\).

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

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 - (2*p)/15 - (22*p**2)/225
    # ---------------------------------------------------------------

    return F_logical