Checkpoint-1

System #0

You are a physics research assistant specializing in solving complex, research-level problems using precise, step-by-step reasoning.

Input Problems will be provided in Markdown format.

Output (Markdown format)

  1. Step-by-Step Derivation - Show every non-trivial step in the solution. Justify steps using relevant physical laws, theorems, or mathematical identities.
  2. Mathematical Typesetting - Use LaTeX for all mathematics: $...$ for inline expressions, $$...$$ for display equations.
  3. Conventions and Units - Follow the unit system and conventions specified in the problem.
  4. Final Answer - At the end of the solution, start a new line with “Final Answer:”, and present the final result.

    For final answers involving values, follow the precision requirements specified in the problem. If no precision is specified: - If an exact value is possible, provide it (e.g., \$\sqrt(2)\$, \$\pi/4\$). - If exact form is not feasible, retain at least 12 significant digits in the result.

  5. Formatting Compliance - If the user requests a specific output format (e.g., code, table), provide the final answer accordingly.

User #1

Problem setup:

In quantum error correction, you encode quantum states into logical states made of many qubits in order to improve their resilience to errors. In quantum error detection, you do the same but can only detect the presence of errors and not correct them. In this problem, we will consider a single [[4,2,2]] quantum error detection code, which encodes two logical qubits into four physical qubits, and investigate how robust logical quantum operations in this code are to quantum errors.

Our convention is that the four physical qubits in the [[4,2,2]] code are labelled 0,1,2,3. The two logical qubits are labelled A and B. The stabilizers are \(XXXX\) and \(ZZZZ\), where \(X\) and \(Z\) are Pauli matrices. The logical \(X\) and \(Z\) operators on the two qubits are \(X_A = XIXI\), \(X_B=XXII\), \(Z_A = ZZII\), \(Z_B = ZIZI\), up to multiplication by stabilizers.

We will consider different state preparation circuits consisting of controlled not \(CNOT_{ij}\) gates, where \(CNOT_{ij}\) has control qubit \(i\) and target qubit \(j\). As a simple model of quantum errors in hardware, we will suppose that each \(CNOT_{ij}\) gate in the circuit has a two qubit depolarizing error channel following it that produces one of the 15 non-identity two-qubit Paulis with equal probability \(p/15\). The probability \(p\) indicates the probability of an error in a single two-qubit gate. We will assess the logical infidelity of certain state preparation protocols as a function of the physical infidelity \(p\).

Checkpoints

Checkpoint 1

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

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

Note that this equation is written in matrix multiplication order, while the quantum operations in the circuit occur in the reverse order (from right-to-left in the above equation). \(H\) is a single-qubit Hadamard gate.

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

Assistant #2
Reasoning (model)

Quantum Error Correction Problem Summary

Okay, here’s what I’ve got: the user wants me to tackle a quantum error correction problem involving a [[4,2,2]] code. My understanding is that the code encodes two logical qubits into four physical qubits and can detect but not correct single-qubit errors due to its distance-2 property.

Decoding the Code:

I’ve carefully defined the physical qubits (0, 1, 2, 3), the logical qubits (A, B), the stabilizers (\(S_1 = X_0 X_1 X_2 X_3\), \(S_2 = Z_0 Z_1 Z_2 Z_3\)), and the logical operators: \(X_A\), \(X_B\), \(Z_A\), and \(Z_B\). I verified these operators, meticulously checking their commutation and anticommutation relations. I confirmed that all logical operators commute with the stabilizers, which is a requirement for a valid code.

GHZ Target State Preparation:

The goal is to create a logical GHZ state \(|\Psi_{GHZ}\rangle_{AB} = \frac{1}{\sqrt{2}}(|00\rangle_{AB} + |11\rangle_{AB})\). To do this, I needed to figure out the corresponding physical state. I figured out that \(|00\rangle_{AB}\) is a simultaneous +1 eigenstate of \(S_1, S_2, Z_A\), and \(Z_B\). The structure of the physical state corresponds to the logical operator definitions. The logical \(|00\rangle_{AB}\) state needs to have even parity for qubit pairs (0,1), (0,2), and all qubits the same value for the given logical operator definitions, so I have identified a valid state.

Circuit Analysis:

The circuit \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\) was applied to an initial state \(|0000\rangle\). I traced the state evolution step by step, applying the gates sequentially, calculating what the state transforms to at each step.

Confirming the Target State:

The circuit’s output was \(\frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\). I then worked to find the correct expression for \(|00\rangle_{AB}\) and found its components. I concluded that the generated state does correspond to the desired GHZ state.

Fidelity Calculation:

Now, for the fun part: I needed to calculate the fidelity of the final state, including errors. The error model uses a two-qubit depolarizing channel after each CNOT gate, described by a probability p. I recognized that I would need to find the expectation values of different Pauli operators for the ideal final state. I have the expression for the fidelity of the state, and I need to account for errors after each CNOT. This involves accounting for Paulis and how they affect the final state. I needed to determine which operators are the stabilizers. I found the group by tracing the evolution of each stabilizer generator.

I found the stabilizers and found the terms that give a non-zero fidelity. Then I applied them to simplify the expression and got a state with 3 non identity operators which gave a contribution.

After a thorough calculation, I derived the final fidelity expression: \(F(p) = (1 - \frac{4}{5}p)^2\). This is after taking into account the impact of two CNOTs and the error model. I reviewed it for correctness.

In summary, the final fidelity result makes sense. It’s a nice neat result! This seems to be the solution to the problem.

Step-by-Step Derivation

1. Determine the ideal final state

The initial state is \(|\psi_{in}\rangle = |0000\rangle\). The circuit consists of a sequence of gates applied from right to left: \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\). We will trace the state vector through the circuit.

  1. Initial state:
\[ |\psi_0\rangle = |0000\rangle \]
  1. Apply \(H_2\) (Hadamard on qubit 2):
\[ |\psi_1\rangle = H_2 |\psi_0\rangle = |00\rangle \otimes \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle) \otimes |0\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0010\rangle) \]
  1. Apply \(CNOT_{21}\) (Control on qubit 2, Target on qubit 1):
\[ |\psi_2\rangle = CNOT_{21} |\psi_1\rangle = \frac{1}{\sqrt{2}} \left( CNOT_{21}|0000\rangle + CNOT_{21}|0010\rangle \right) \]
The control qubit (2) is $|0\rangle$ for the first term and $|1\rangle$ for the second.
\[ |\psi_2\rangle = \frac{1}{\sqrt{2}} \left( |0000\rangle + |0110\rangle \right) \]
  1. Apply \(H_0\) (Hadamard on qubit 0):
\[ |\psi_3\rangle = H_0 |\psi_2\rangle = \frac{1}{\sqrt{2}} \left( H_0|0000\rangle + H_0|0110\rangle \right) \]
\[ |\psi_3\rangle = \frac{1}{\sqrt{2}} \left( \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)|000\rangle + \frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)|110\rangle \right) \]
\[ |\psi_3\rangle = \frac{1}{2} \left( |0000\rangle + |1000\rangle + |0110\rangle + |1110\rangle \right) \]
  1. Apply \(CNOT_{03}\) (Control on qubit 0, Target on qubit 3):
\[ |\psi_f\rangle = CNOT_{03} |\psi_3\rangle = \frac{1}{2} \left( CNOT_{03}|0000\rangle + CNOT_{03}|1000\rangle + CNOT_{03}|0110\rangle + CNOT_{03}|1110\rangle \right) \]
The control qubit (0) is $|0\rangle$ for the first and third terms, and $|1\rangle$ for the second and fourth terms.
\[ |\psi_f\rangle = \frac{1}{2} \left( |0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle \right) \]
This is the ideal final state of the physical qubits. The ideal final density matrix is $\rho_f = |\psi_f\rangle\langle\psi_f|$.

2. Model the effect of errors

The circuit contains two CNOT gates, \(U_1 = CNOT_{21}\) and \(U_2 = CNOT_{03}\). After each, a two-qubit depolarizing channel acts. The channel for a gate on qubits \(i,j\) is:

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

where \(\mathcal{P}_{ij}\) is the set of 16 two-qubit Pauli operators on qubits \(i,j\).

Let’s trace the density matrix. - Initial state: \(\rho_{in} = |0000\rangle\langle 0000|\). - After \(H_2\): \(\rho_1 = H_2 \rho_{in} H_2^\dagger\). - After \(CNOT_{21}\): \(\rho_2^{id} = CNOT_{21} \rho_1 CNOT_{21}^\dagger\). - After first error channel \(\mathcal{E}_{21}\): \(\rho_2 = \mathcal{E}_{21}(\rho_2^{id})\). - After \(H_0\): \(\rho_3 = H_0 \rho_2 H_0^\dagger\). - After \(CNOT_{03}\): \(\rho_4^{before} = CNOT_{03} \rho_3 CNOT_{03}^\dagger\). - After second error channel \(\mathcal{E}_{03}\): \(\rho_{final} = \mathcal{E}_{03}(\rho_4^{before})\).

Let’s expand \(\rho_{final}\):

\[ \rho_{final} = \mathcal{E}_{03} \circ (U_2 H_0) \circ \mathcal{E}_{21} \circ (U_1 H_2) (\rho_{in}) \]

Let \(U_{>1} = U_2 H_0 = CNOT_{03} H_0\). The overall evolution results in a mixed state. We can express the final density matrix as a sum over error events: - No errors: Probability \((1-p)^2\). State is \(|\psi_f\rangle\). - Error at \(CNOT_{21}\) only: Probability \(p(1-p)\). An error \(P_{21} \in \mathcal{P}_{21}\setminus\{II\}\) occurs with probability \(p/15\). The resulting state is \(U_{>1} P_{21} |\psi_2\rangle = (U_{>1} P_{21} U_{>1}^\dagger) |\psi_f\rangle\). Since \(U_{>1}\) acts on qubits \(\{0,3\}\) and \(P_{21}\) acts on \(\{2,1\}\), they commute. So the state is \(P_{21}|\psi_f\rangle\). - Error at \(CNOT_{03}\) only: Probability \((1-p)p\). An error \(P_{03} \in \mathcal{P}_{03}\setminus\{II\}\) occurs with probability \(p/15\). The resulting state is \(P_{03}|\psi_f\rangle\). - Errors at both gates: Probability \(p^2\). Errors \(P_{21}\) and \(P_{03}\) occur. The final state is \(P_{03} P_{21} |\psi_f\rangle\).

The final density matrix is:

\[ \rho_{final} = (1-p)^2 \rho_f + p(1-p)\sum_{P_{21}\neq II}\frac{1}{15} P_{21}\rho_f P_{21} + (1-p)p\sum_{P_{03}\neq II}\frac{1}{15} P_{03}\rho_f P_{03} + p^2\sum_{P_{21}\neq II}\sum_{P_{03}\neq II}\frac{1}{225} P_{03}P_{21}\rho_f P_{21}P_{03} \]

where \(\rho_f = |\psi_f\rangle\langle\psi_f|\).

3. Calculate the physical state fidelity

The fidelity is \(F = \langle\psi_f|\rho_{final}|\psi_f\rangle\).

\[ F = (1-p)^2 \langle\psi_f|\rho_f|\psi_f\rangle + \frac{p(1-p)}{15}\sum_{P_{21}\neq II} \langle\psi_f|P_{21}\rho_f P_{21}|\psi_f\rangle + \dots \]

Using \(\langle\psi_f|A \rho_f B|\psi_f\rangle = \langle\psi_f|A|\psi_f\rangle\langle\psi_f|B|\psi_f\rangle\), we get:

\[ F = (1-p)^2 + \frac{p(1-p)}{15}\sum_{P_{21}\neq II} |\langle\psi_f|P_{21}|\psi_f\rangle|^2 + \frac{p(1-p)}{15}\sum_{P_{03}\neq II} |\langle\psi_f|P_{03}|\psi_f\rangle|^2 + \frac{p^2}{225}\sum_{P_{21}\neq II, P_{03}\neq II} |\langle\psi_f|P_{03}P_{21}|\psi_f\rangle|^2 \]

4. Determine the stabilizer group of the final state

To evaluate the sums, we need the expectation values \(\langle\psi_f|P|\psi_f\rangle\). The state \(|\psi_f\rangle\) is a stabilizer state. For any Pauli operator \(P\), the expectation value is non-zero only if \(P\) is in the stabilizer group of \(|\psi_f\rangle\) (up to a phase). Let the stabilizer group be \(G\).

The stabilizers of the initial state \(|0000\rangle\) are \(Z_0, Z_1, Z_2, Z_3\). The stabilizers of \(|\psi_f\rangle = U|0000\rangle\) are given by \(S'_k = U S_k U^\dagger\), where \(S_k\) are the initial stabilizers. - \(U Z_0 U^\dagger = CNOT_{03}H_0 CNOT_{21}H_2 Z_0 H_2^\dagger CNOT_{21}^\dagger H_0^\dagger CNOT_{03}^\dagger = CNOT_{03} H_0 Z_0 H_0 CNOT_{03} = CNOT_{03} X_0 CNOT_{03} = X_0X_3\). - \(U Z_1 U^\dagger = CNOT_{03}H_0 CNOT_{21}H_2 Z_1 H_2^\dagger CNOT_{21}^\dagger H_0^\dagger CNOT_{03}^\dagger = CNOT_{21} Z_1 CNOT_{21} = Z_1Z_2\). - \(U Z_2 U^\dagger = CNOT_{03}H_0 CNOT_{21}H_2 Z_2 H_2^\dagger CNOT_{21}^\dagger H_0^\dagger CNOT_{03}^\dagger = CNOT_{21} H_2 Z_2 H_2 CNOT_{21} = CNOT_{21} X_2 CNOT_{21} = X_1X_2\). - \(U Z_3 U^\dagger = CNOT_{03}H_0 CNOT_{21}H_2 Z_3 H_2^\dagger CNOT_{21}^\dagger H_0^\dagger CNOT_{03}^\dagger = CNOT_{03} Z_3 CNOT_{03} = Z_0Z_3\).

The stabilizer group of \(|\psi_f\rangle\) is \(G = \langle X_0X_3, Z_1Z_2, X_1X_2, Z_0Z_3 \rangle\). For a Pauli operator \(P\), \(|\langle\psi_f|P|\psi_f\rangle|^2=1\) if \(P \in G\) (up to a phase) and 0 otherwise.

5. Evaluate the sums in the fidelity expression

We need to count how many Pauli operators of the specified form are in \(G\).

  • Sum over \(P_{21}\): We need to find operators in \(G\) with support only on qubits 1 and 2. The generators acting on these qubits are \(Z_1Z_2\) and \(X_1X_2\). These generate a subgroup \(G_{12} = \langle Z_1Z_2, X_1X_2 \rangle\). The Pauli operators in this group are \(\{I_1I_2, X_1X_2, Z_1Z_2, Y_1Y_2\}\). There are 3 non-identity operators.
\[ \sum_{P_{21}\neq II} |\langle\psi_f|P_{21}|\psi_f\rangle|^2 = 3 \]
  • Sum over \(P_{03}\): We need operators in \(G\) with support only on qubits 0 and 3. The relevant generators are \(X_0X_3\) and \(Z_0Z_3\). These generate \(G_{03} = \langle X_0X_3, Z_0Z_3 \rangle\). The Pauli operators are \(\{I_0I_3, X_0X_3, Z_0Z_3, Y_0Y_3\}\). There are 3 non-identity operators.
\[ \sum_{P_{03}\neq II} |\langle\psi_f|P_{03}|\psi_f\rangle|^2 = 3 \]
  • Sum over \(P_{21}P_{03}\): The operator \(P_{21}P_{03}\) is in \(G\) if and only if \(P_{21} \in G_{12}\) and \(P_{03} \in G_{03}\). We are summing over non-identity \(P_{21}\) and \(P_{03}\). The number of choices for \(P_{21} \in G_{12} \setminus \{II\}\) is 3. The number of choices for \(P_{03} \in G_{03} \setminus \{II\}\) is 3. The total number of pairs is \(3 \times 3 = 9\).
\[ \sum_{P_{21}\neq II, P_{03}\neq II} |\langle\psi_f|P_{03}P_{21}|\psi_f\rangle|^2 = 9 \]

6. Assemble the final fidelity expression

Substitute these counts back into the formula for \(F\):

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

Expand and simplify the terms:

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

This expression can be factored into a perfect square:

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

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

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

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 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$.

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

    Outputs
    ----------
    F_physical: sympy.Expr, the physical state fidelity of the final physical 4-qubit state
    """

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

    return F_physical
Assistant #4
import sympy as sp

p = sp.symbols('p')

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

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

    Outputs
    ----------
    F_physical: sympy.Expr, the physical state fidelity of the final physical 4-qubit state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_physical = (1 - sp.Rational(4, 5) * p)**2
    # ---------------------------------------------------------------

    return F_physical