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)

Fidelity Calculation for a Quantum Error Correction Circuit

Okay, so I’m tasked with figuring out the fidelity of the final state after a quantum circuit that’s designed to create a logical two-qubit GHZ state, but with some noise thrown in. It’s a [[4,2,2]] code, which is nice and familiar.

First, I need to know what the “perfect” final state should look like (the ideal state). I traced the ideal circuit with \(p = 0\). The ideal final state, \(|\psi_{ideal}\rangle\), turns out to be \(\frac{1}{2}(|0000\rangle + |0110\rangle + |1001\rangle + |1111\rangle)\). This state is indeed the logical GHZ state in the code space, which is great.

Next, I need to figure out what happens when there’s noise. The error model is two-qubit depolarizing noise after certain gates (CNOT). I set up the equations of motion for the density matrix through the circuit, keeping track of where the errors happen. After careful calculations and error analysis, the final density matrix can be expanded into terms that have the ideal final state and Pauli operators.

Since my goal is to figure out the fidelity, I’ll need to calculate \(\langle\psi_{ideal} | \rho_{final} | \psi_{ideal}\rangle\), meaning the fidelity between my ideal state and the actual mixed state. This means taking the inner product of the ideal state with my final density matrix.

To calculate the fidelity, I need to evaluate the inner product between \(|\psi_{ideal}\rangle\) and the final density matrix. After applying the noise, I calculate the expectation value of all the Paulis. After many steps, I can express my expectation values as being equal to 0, +1 or -1. Given the type of state I have, most Paulis have an expectation of 0 or 1.

The crucial insight here is that \(|\psi_{ideal}\rangle\) is a stabilizer state. This allows a significant simplification. Since the state is in the code space, most Pauli operators acting on it will return zero expectation values. I can thus evaluate all the required expectation values efficiently.

Finally, substituting these values back into the fidelity formula yields a neat closed-form expression: \(F(p) = (1 - \frac{14}{15}p)^2\). This tells me how the fidelity decreases as the error probability, p, increases. This result is robust and has been checked via sanity checks.

Step-by-Step Derivation

1. Determine the Ideal Final State

First, we determine the 4-qubit state \(|\psi_{ideal}\rangle\) produced by the error-free circuit acting on the initial state \(|0000\rangle\). The circuit unitary is \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\). The operations are applied from right to left.

  1. Initial state: \(|\psi_0\rangle = |0000\rangle\).

  2. Apply \(H_2\): The Hadamard gate on qubit 2 creates a superposition.

\[ |\psi_1\rangle = H_2 |\psi_0\rangle = |00\rangle \otimes H|0\rangle \otimes |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}\): The controlled-NOT gate with control qubit 2 and target qubit 1 flips qubit 1 if qubit 2 is in the state \(|1\rangle\).
\[ |\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) \]
  1. Apply \(H_0\): The Hadamard gate on qubit 0 acts on the first qubit.
\[ |\psi_3\rangle = H_0 |\psi_2\rangle = \frac{1}{\sqrt{2}}(H_0|0000\rangle + H_0|0110\rangle) = \frac{1}{\sqrt{2}}\left(\frac{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}(|0000\rangle + |1000\rangle + |0110\rangle + |1110\rangle) \]
  1. Apply \(CNOT_{03}\): The controlled-NOT gate with control qubit 0 and target qubit 3 flips qubit 3 if qubit 0 is in the state \(|1\rangle\).
\[ |\psi_{ideal}\rangle = CNOT_{03} |\psi_3\rangle = \frac{1}{2}(CNOT_{03}|0000\rangle + CNOT_{03}|1000\rangle + CNOT_{03}|0110\rangle + CNOT_{03}|1110\rangle) \]
\[ |\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle) \]
This is the ideal final state. As confirmed in the thought process, this state is the logical GHZ state $(|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}$ in the specified [[4,2,2]] code.

2. Model the Noisy Circuit Evolution

The circuit consists of two CNOT gates, each followed by a two-qubit depolarizing channel. Let the state after the first CNOT (ideal) be \(\rho_2' = |\psi_2\rangle\langle\psi_2|\). The error channel \(\mathcal{E}_{21}\) on qubits 2 and 1 acts as:

\[ \mathcal{E}_{21}(\rho) = (1-p)\rho + \frac{p}{15} \sum_{P_{12} \in \mathcal{P}_{12}\setminus\{II\}} P_{12} \rho P_{12} \]

where \(\mathcal{P}_{12}\) is the set of 2-qubit Pauli operators on qubits 1 and 2.

The state after the first noisy CNOT gate is \(\rho_2 = \mathcal{E}_{21}(\rho_2')\). The subsequent gates \(H_0\) and \(CNOT_{03}\) are ideal. The evolution continues as:

\[ \rho_3 = H_0 \rho_2 H_0^\dagger \]
\[ \rho_4' = CNOT_{03} \rho_3 CNOT_{03}^\dagger \]

Finally, the second error channel \(\mathcal{E}_{03}\) acts on qubits 0 and 3:

\[ \rho_{final} = \mathcal{E}_{03}(\rho_4') = (1-p)\rho_4' + \frac{p}{15} \sum_{Q_{03} \in \mathcal{P}_{03}\setminus\{II\}} Q_{03} \rho_4' Q_{03} \]

Let’s combine these steps. Let \(U_{ideal} = CNOT_{03}H_0CNOT_{21}H_2\). So \(|\psi_{ideal}\rangle = U_{ideal}|0000\rangle\). Let \(U_{mid} = CNOT_{03}H_0\). The gates \(H_0\) and \(CNOT_{03}\) act on qubits disjoint from the first error channel \(\mathcal{E}_{21}\). Therefore, \(U_{mid}\) commutes with any operator \(P_{12}\). The evolution can be written as:

\[ \rho_{final} = \mathcal{E}_{03} \circ (U_{mid} \cdot U_{mid}^\dagger) \circ \mathcal{E}_{21} ( (CNOT_{21}H_2) |0000\rangle\langle 0000| (CNOT_{21}H_2)^\dagger ) \]

Let \(|\psi_{ideal}\rangle\langle\psi_{ideal}| = \rho_{ideal}\). \(\rho_{final} = (1-p) \left( U_{mid} \mathcal{E}_{21}(\rho_2') U_{mid}^\dagger \right) + \frac{p}{15}\sum_{Q_{03}\neq II} Q_{03} \left( U_{mid} \mathcal{E}_{21}(\rho_2') U_{mid}^\dagger \right) Q_{03}\) \(U_{mid} \mathcal{E}_{21}(\rho_2') U_{mid}^\dagger = (1-p)U_{mid}\rho_2'U_{mid}^\dagger + \frac{p}{15}\sum_{P_{12}\neq II} U_{mid}P_{12}\rho_2'P_{12}U_{mid}^\dagger\) Since \(U_{mid}\) and \(P_{12}\) commute: \(U_{mid} \mathcal{E}_{21}(\rho_2') U_{mid}^\dagger = (1-p)\rho_{ideal} + \frac{p}{15}\sum_{P_{12}\neq II} P_{12}\rho_{ideal}P_{12} = \rho_4'\).

Substituting this into the expression for \(\rho_{final}\):

\[ \rho_{final} = (1-p)\left[ (1-p)\rho_{ideal} + \frac{p}{15}\sum_{P_{12}\neq II} P_{12}\rho_{ideal}P_{12} \right] + \frac{p}{15}\sum_{Q_{03}\neq II} Q_{03} \left[ (1-p)\rho_{ideal} + \frac{p}{15}\sum_{P_{12}\neq II} P_{12}\rho_{ideal}P_{12} \right] Q_{03} \]

Expanding this expression:

\[ \rho_{final} = (1-p)^2 \rho_{ideal} + \frac{p(1-p)}{15} \sum_{P_{12}\neq II} P_{12}\rho_{ideal}P_{12} + \frac{p(1-p)}{15} \sum_{Q_{03}\neq II} Q_{03}\rho_{ideal}Q_{03} + \frac{p^2}{15^2} \sum_{P_{12}\neq II, Q_{03}\neq II} Q_{03}P_{12}\rho_{ideal}P_{12}Q_{03} \]

3. Calculate the Physical Fidelity

The physical state fidelity is \(F = \langle\psi_{ideal}|\rho_{final}|\psi_{ideal}\rangle\). Using the expression for \(\rho_{final}\) and that \(\rho_{ideal}=|\psi_{ideal}\rangle\langle\psi_{ideal}|\):

\[ F = (1-p)^2 \langle\psi_{ideal}|\rho_{ideal}|\psi_{ideal}\rangle + \frac{p(1-p)}{15} \sum_{P_{12}\neq II} \langle\psi_{ideal}|P_{12}\rho_{ideal}P_{12}|\psi_{ideal}\rangle + \dots \]

Since \(\langle\psi_{ideal}|P\rho_{ideal}P|\psi_{ideal}\rangle = \langle\psi_{ideal}|P|\psi_{ideal}\rangle\langle\psi_{ideal}|P|\psi_{ideal}\rangle = |\langle\psi_{ideal}|P|\psi_{ideal}\rangle|^2\):

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

4. Evaluate Expectation Values

We need to compute the expectation values of Pauli operators for the state \(|\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle + |0110\rangle + |1001\rangle + |1111\rangle)\). An expectation value \(\langle\psi_{ideal}|P|\psi_{ideal}\rangle\) is non-zero only if \(P\) is a tensor product of \(I\) and \(Z\) operators. For any Pauli operator containing an \(X\) or \(Y\) matrix, the expectation value is zero. Let \(P = Z_0^{a_0}Z_1^{a_1}Z_2^{a_2}Z_3^{a_3}\). The expectation value is:

\[ \langle P \rangle = \frac{1}{4} \left( \langle 0000|P|0000\rangle + \langle 0110|P|0110\rangle + \langle 1001|P|1001\rangle + \langle 1111|P|1111\rangle \right) \]
\[ \langle P \rangle = \frac{1}{4} \left( 1 + (-1)^{a_1+a_2} + (-1)^{a_0+a_3} + (-1)^{a_0+a_1+a_2+a_3} \right) \]

Let \(x = (a_1+a_2) \pmod 2\) and \(y = (a_0+a_3) \pmod 2\).

\[ \langle P \rangle = \frac{1}{4} (1 + (-1)^x + (-1)^y + (-1)^{x+y}) \]

This expression is \(1\) if \(x=0\) and \(y=0\), and \(0\) otherwise. So, \(\langle P \rangle = 1\) if and only if \(a_1+a_2\) is even and \(a_0+a_3\) is even. For all other Pauli operators, the expectation value is 0.

Now we evaluate the sums: * Sum 1: \(\sum_{P_{12}\neq II} |\langle\psi_{ideal}|P_{12}|\psi_{ideal}\rangle|^2\) The operators \(P_{12}\) act on qubits 1 and 2, so \(a_0=a_3=0\). This means \(y=0\). We need to find non-identity \(P_{12}\) of Z-type for which \(x=(a_1+a_2) \pmod 2 = 0\). The Z-type operators on qubits 1,2 are \(Z_1\), \(Z_2\), \(Z_1Z_2\). - For \(Z_1\): \(a_1=1, a_2=0 \implies x=1\). \(\langle Z_1 \rangle = 0\). - For \(Z_2\): \(a_1=0, a_2=1 \implies x=1\). \(\langle Z_2 \rangle = 0\). - For \(Z_1Z_2\): \(a_1=1, a_2=1 \implies x=0\). \(\langle Z_1Z_2 \rangle = 1\). The sum is \(1^2 = 1\).

  • Sum 2: \(\sum_{Q_{03}\neq II} |\langle\psi_{ideal}|Q_{03}|\psi_{ideal}\rangle|^2\) The operators \(Q_{03}\) act on qubits 0 and 3, so \(a_1=a_2=0\). This means \(x=0\). We need to find non-identity \(Q_{03}\) of Z-type for which \(y=(a_0+a_3) \pmod 2 = 0\). The Z-type operators on qubits 0,3 are \(Z_0\), \(Z_3\), \(Z_0Z_3\).

    • For \(Z_0\): \(a_0=1, a_3=0 \implies y=1\). \(\langle Z_0 \rangle = 0\).
    • For \(Z_3\): \(a_0=0, a_3=1 \implies y=1\). \(\langle Z_3 \rangle = 0\).
    • For \(Z_0Z_3\): \(a_0=1, a_3=1 \implies y=0\). \(\langle Z_0Z_3 \rangle = 1\). The sum is \(1^2 = 1\).
  • Sum 3: \(\sum_{P_{12}\neq II, Q_{03}\neq II} |\langle\psi_{ideal}|Q_{03}P_{12}|\psi_{ideal}\rangle|^2\) The operator is \(P=Q_{03}P_{12}\). We only need to consider Z-type operators. For \(\langle P \rangle\) to be non-zero, we need \(x=(a_1+a_2) \pmod 2 = 0\) and \(y=(a_0+a_3) \pmod 2 = 0\). For \(P_{12}\), \(x=0\) implies \(P_{12} = Z_1Z_2\). For \(Q_{03}\), \(y=0\) implies \(Q_{03} = Z_0Z_3\). Both \(P_{12}=Z_1Z_2\) and \(Q_{03}=Z_0Z_3\) are non-identity. The combined operator is \(P = (Z_0Z_3)(Z_1Z_2) = Z_0Z_1Z_2Z_3\). For this operator, \(x=0, y=0\), so \(\langle P \rangle = 1\). This is the only term in the double summation that is non-zero. The sum is \(1^2 = 1\).

5. Final Fidelity Calculation

Substitute the values of the sums back into the expression for fidelity \(F\):

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

Combine terms with the same power of \(p\):

\[ F(p) = 1 + p\left(-2 + \frac{2}{15}\right) + p^2\left(1 - \frac{2}{15} + \frac{1}{225}\right) \]
\[ F(p) = 1 + p\left(\frac{-30+2}{15}\right) + p^2\left(\frac{225 - 30 + 1}{225}\right) \]
\[ F(p) = 1 - \frac{28}{15}p + \frac{196}{225}p^2 \]

This is a perfect square:

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

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

\[ F(p) = \left(1 - \frac{14}{15}p\right)^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 - 14*p/15)**2
    # ---------------------------------------------------------------

    return F_physical