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)

Summary of Fidelity Calculation for a 4-Qubit State Preparation Circuit

Okay, here’s my thinking on this problem. I need to figure out the fidelity of a specific 4-qubit state after it’s been prepared by a quantum circuit, taking into account some two-qubit depolarizing errors.

First, I need to really understand the [[4,2,2]] code. It encodes 2 logical qubits into 4 physical qubits using stabilizers. The goal is to prepare a logical GHZ state, which means a specific combination of logical qubits.

Then, I have to break down the state preparation circuit: it’s a series of CNOTs and Hadamard gates applied in reverse. The tricky part is that each CNOT gate is followed by a depolarizing error. Hadamard gates are treated as ideal in this model, so no errors.

The main objective is to calculate the fidelity between the ideal, error-free state and the actual state with errors. Since I know the ideal state will be pure (error-free) and the noisy state will be mixed, I can use a standard fidelity formula that involves just taking an inner product.

Now, let’s start with finding the ideal state. I’m starting from the ground state |0000> and applying the circuit, step by step. I quickly derive the ideal final physical state: It turns out that by applying the circuit, the ideal, error-free final state is \(\frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle)\). I then make sure that this state is indeed an encoded GHZ state. It satisfies the required stabilizer properties to belong to the codespace, namely \(S_1\) and \(S_2\), where \(S_1 = X_0 X_1 X_2 X_3\) and \(S_2 = Z_0 Z_1 Z_2 Z_3\). Next, I consider the logical operators \(X_A, X_B, Z_A, Z_B\). My initial idea was wrong, the state is NOT a simple eigenstate of the single-qubit Z and X logical operators as I defined. I am very curious about how to define the two logical qubits within the 4-qubit space. This makes me think. Based on the problem statement, I think the circuit DOES prepare the correct logical state, but I just have to reconcile it by using the right definitions of these logical qubits and their basis states within the 4-qubit physical space.

To calculate the fidelity, I start from the state \(|\psi_C\rangle\) that occurs after the hadamard gate \(H_0\). The fidelity is basically a sum of terms involving the error probability (\(p\)) and the overlap of Pauli operators with this state. The crucial insight is that due to the structure of the circuit and the code, some of the Pauli error operators will average to zero when taking their overlap. The calculations boil down to computing the overlaps with different Pauli operators and I can use the fact that the state can be factored to simplify the overlaps. After all the hard work I arrive to the final equation for the fidelity, which is of the form \(1 - A p + B p^2\). I compute the coefficients.

Finally, I got the equation for fidelity: \(1 - 1.6p + 0.64p^2\).

The problem asks for the physical state fidelity of the final 4-qubit state, given a state preparation circuit and an error model. The initial state is implicitly assumed to be \(|0000\rangle\).

1. Determine the ideal target physical state:

The circuit is \(U = (CNOT_{03}) (H_0) (CNOT_{21}) (H_2)\). The operations are applied right-to-left. Let the initial state be \(|\psi_0\rangle = |0000\rangle\).

  • Apply \(H_2\) to qubit 2:
\[ |\psi_1\rangle = (I_0 I_1 H_2 I_3) |0000\rangle = |00\rangle \left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}\right) |0\rangle = \frac{1}{\sqrt{2}}(|0000\rangle + |0010\rangle) \]
  • Apply \(CNOT_{21}\) (control 2, target 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) \]
  • Apply \(H_0\) to qubit 0:
\[ |\psi_3\rangle = (H_0 I_1 I_2 I_3) |\psi_2\rangle = \frac{1}{\sqrt{2}}(H_0|0000\rangle + H_0|0110\rangle) = \frac{1}{\sqrt{2}}\left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}|000\rangle + \frac{|0\rangle+|1\rangle}{\sqrt{2}}|110\rangle\right) \]
\[ |\psi_3\rangle = \frac{1}{2}(|0000\rangle + |1000\rangle + |0110\rangle + |1110\rangle) \]
  • Apply \(CNOT_{03}\) (control 0, target 3):
\[ |\psi_{ideal}\rangle = CNOT_{03} |\psi_3\rangle = \frac{1}{2}(CNOT_{03}|0000\rangle + CNOT_{03}|1000\rangle + CNOT_{03}|0110\rangle + CNOT_{03}|1110\rangle) \]
\[ |\psi_{ideal}\rangle = \frac{1}{2}(|0000\rangle + |1001\rangle + |0110\rangle + |1111\rangle) \]
This is the target ideal physical state. We verify it's a valid codeword (stabilized by $S_1=XXXX$ and $S_2=ZZZZ$) and has the properties of a logical GHZ state (e.g. $X_A X_B |\psi_{ideal}\rangle = |\psi_{ideal}\rangle$).

2. Analyze the error model and fidelity calculation:

Each \(CNOT_{ij}\) gate is followed by a two-qubit depolarizing error channel \(\mathcal{E}_{ij}(\rho) = (1-p)\rho + \frac{p}{15} \sum_{P_{ij} \neq I_i I_j} P_{ij} \rho P_{ij}\). Hadamard gates are assumed perfect. The circuit sequence of operations is: \(H_2 \to CNOT_{21} \to \mathcal{E}_{21} \to H_0 \to CNOT_{03} \to \mathcal{E}_{03}\). Let \(\rho_0 = |0000\rangle\langle0000|\). The state evolution is: \(\rho_1 = H_2 \rho_0 H_2^\dagger\) \(\rho_2^{pre-error} = CNOT_{21} \rho_1 CNOT_{21}^\dagger\) \(\rho_2 = \mathcal{E}_{21}(\rho_2^{pre-error}) = (1-p)\rho_2^{pre-error} + \frac{p}{15} \sum_{P_{21}} P_{21} \rho_2^{pre-error} P_{21}\) \(\rho_3 = H_0 \rho_2 H_0^\dagger\) \(\rho_4^{pre-error} = CNOT_{03} \rho_3 CNOT_{03}^\dagger\) \(\rho_f = \mathcal{E}_{03}(\rho_4^{pre-error}) = (1-p)\rho_4^{pre-error} + \frac{p}{15} \sum_{P_{03}} P_{03} \rho_4^{pre-error} P_{03}\)

The physical state fidelity is \(F = \langle\psi_{ideal}|\rho_f|\psi_{ideal}\rangle\). Substituting the expression for \(\rho_f\):

\[ F = (1-p)\langle\psi_{ideal}|\rho_4^{pre-error}|\psi_{ideal}\rangle + \frac{p}{15} \sum_{P_{03}} \langle\psi_{ideal}|P_{03} \rho_4^{pre-error} P_{03}|\psi_{ideal}\rangle \]

Let \(U_{circuit} = CNOT_{03} H_0 CNOT_{21} H_2\). Then \(|\psi_{ideal}\rangle = U_{circuit}|0000\rangle\). Let \(|\psi_C\rangle = H_0 CNOT_{21} H_2 |0000\rangle = |\psi_3\rangle\) from above. Then \(\rho_4^{pre-error} = CNOT_{03} \rho_3 CNOT_{03}^\dagger\). And \(|\psi_{ideal}\rangle = CNOT_{03} |\psi_C\rangle\). So \(\langle\psi_{ideal}|\rho_4^{pre-error}|\psi_{ideal}\rangle = \langle CNOT_{03}\psi_C| CNOT_{03} \rho_3 CNOT_{03}^\dagger |CNOT_{03}\psi_C\rangle = \langle\psi_C|\rho_3|\psi_C\rangle\). Also, \(\langle\psi_{ideal}|P_{03} \rho_4^{pre-error} P_{03}|\psi_{ideal}\rangle = \langle\psi_C| (CNOT_{03}^\dagger P_{03} CNOT_{03}) \rho_3 (CNOT_{03}^\dagger P_{03} CNOT_{03}) |\psi_C\rangle\). Let \(P'_{03} = CNOT_{03}^\dagger P_{03} CNOT_{03}\). This is just a different Pauli on qubits (0,3).

Now substitute \(\rho_3\): \(\rho_3 = H_0 \rho_2 H_0^\dagger = H_0 \left( (1-p)\rho_2^{pre-error} + \frac{p}{15} \sum_{P_{21}} P_{21} \rho_2^{pre-error} P_{21} \right) H_0^\dagger\). Since \(H_0\) acts on qubit 0 and \(P_{21}\) acts on qubits 1 and 2, they commute: \(H_0 P_{21} H_0^\dagger = P_{21}\). So \(\rho_3 = (1-p)H_0 \rho_2^{pre-error} H_0^\dagger + \frac{p}{15} \sum_{P_{21}} P_{21} H_0 \rho_2^{pre-error} H_0^\dagger P_{21}\). Let \(|\psi_C\rangle = H_0 \rho_2^{pre-error} H_0^\dagger = |\psi_3\rangle\langle\psi_3|\). \(\rho_3 = (1-p)|\psi_C\rangle\langle\psi_C| + \frac{p}{15} \sum_{P_{21}} P_{21} |\psi_C\rangle\langle\psi_C| P_{21}\).

Plugging this into the fidelity expression:

\[ F = (1-p) \left[ (1-p)\langle\psi_C|\psi_C\rangle\langle\psi_C|\psi_C\rangle + \frac{p}{15} \sum_{P_{21}} \langle\psi_C|P_{21}|\psi_C\rangle\langle\psi_C|P_{21}|\psi_C\rangle \right] \]
\[ + \frac{p}{15} \sum_{P'_{03}} \left[ (1-p)\langle\psi_C|P'_{03}|\psi_C\rangle\langle\psi_C|P'_{03}|\psi_C\rangle + \frac{p}{15} \sum_{P_{21}} \langle\psi_C|P'_{03}P_{21}|\psi_C\rangle\langle\psi_C|P'_{03}P_{21}|\psi_C\rangle \right] \]

This simplifies to:

\[ F = (1-p)^2 + (1-p)\frac{p}{15} \sum_{P_{21}} |\langle\psi_C|P_{21}|\psi_C\rangle|^2 + \frac{p}{15}(1-p) \sum_{P'_{03}} |\langle\psi_C|P'_{03}|\psi_C\rangle|^2 + \frac{p^2}{15^2} \sum_{P'_{03}, P_{21}} |\langle\psi_C|P'_{03}P_{21}|\psi_C\rangle|^2 \]

Let’s call the sums \(A_1, A_2, A_3\):

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

3. Calculate the expectation values for \(|\psi_C\rangle\):

The state is \(|\psi_C\rangle = \frac{1}{2}(|0000\rangle + |1000\rangle + |0110\rangle + |1110\rangle)\). This state can be factorized:

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

Let \(|\phi_{03}\rangle = \frac{1}{\sqrt{2}}(|00\rangle_{03} + |10\rangle_{03})\) (on qubits 0 and 3) and \(|\phi_{12}\rangle = \frac{1}{\sqrt{2}}(|00\rangle_{12} + |11\rangle_{12})\) (on qubits 1 and 2). So \(|\psi_C\rangle = |\phi_{03}\rangle \otimes |\phi_{12}\rangle\).

  • Calculate \(A_1 = \sum_{P_{21}} |\langle\psi_C|P_{21}|\psi_C\rangle|^2\): \(P_{21}\) acts on qubits (1,2). So \(\langle\psi_C|P_{21}|\psi_C\rangle = \langle\phi_{03}|I|\phi_{03}\rangle \langle\phi_{12}|P_{21}|\phi_{12}\rangle = 1 \cdot \langle\phi_{12}|P_{21}|\phi_{12}\rangle\). We need to calculate \(\langle\phi_{12}|P_{21}|\phi_{12}\rangle\) for all 15 non-identity Paulis \(P_{21}\). For \(|\phi_{12}\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)\):

    • \(P_{21} = X_1 X_2\): \(\langle\phi_{12}|X_1 X_2|\phi_{12}\rangle = 1\).
    • \(P_{21} = Y_1 Y_2\): \(\langle\phi_{12}|Y_1 Y_2|\phi_{12}\rangle = -1\).
    • \(P_{21} = Z_1 Z_2\): \(\langle\phi_{12}|Z_1 Z_2|\phi_{12}\rangle = 1\). For all other 12 two-qubit Paulis (\(I_1 X_2, I_1 Y_2, I_1 Z_2, X_1 I_2, X_1 Y_2, X_1 Z_2, Y_1 I_2, Y_1 X_2, Y_1 Z_2, Z_1 I_2, Z_1 X_2, Z_1 Y_2\)), the expectation value \(\langle\phi_{12}|P_{21}|\phi_{12}\rangle = 0\). Thus, \(A_1 = 1^2 + (-1)^2 + 1^2 + 12 \cdot 0^2 = 3\).
  • Calculate \(A_2 = \sum_{P'_{03}} |\langle\psi_C|P'_{03}|\psi_C\rangle|^2\): \(P'_{03} = CNOT_{03}^\dagger P_{03} CNOT_{03}\) acts on qubits (0,3). \(P'_{03}\) is one of the 15 non-identity Pauli operators on qubits 0 and 3. So \(\langle\psi_C|P'_{03}|\psi_C\rangle = \langle\phi_{03}|P'_{03}|\phi_{03}\rangle \langle\phi_{12}|I|\phi_{12}\rangle = \langle\phi_{03}|P'_{03}|\phi_{03}\rangle\). We need to calculate \(\langle\phi_{03}|P'_{03}|\phi_{03}\rangle\) for all 15 non-identity Paulis \(P'_{03}\). For \(|\phi_{03}\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)\):

    • \(P'_{03} = I_0 Z_3\): \(\langle\phi_{03}|I_0 Z_3|\phi_{03}\rangle = 1\). (Since \(q_3\) is always 0)
    • \(P'_{03} = X_0 I_3\): \(\langle\phi_{03}|X_0 I_3|\phi_{03}\rangle = 1\).
    • \(P'_{03} = X_0 Z_3\): \(\langle\phi_{03}|X_0 Z_3|\phi_{03}\rangle = 1\). (Since \(q_3\) is always 0) For all other 12 two-qubit Paulis, the expectation value \(\langle\phi_{03}|P'_{03}|\phi_{03}\rangle = 0\). Thus, \(A_2 = 1^2 + 1^2 + 1^2 + 12 \cdot 0^2 = 3\).
  • Calculate \(A_3 = \sum_{P'_{03}, P_{21}} |\langle\psi_C|P'_{03}P_{21}|\psi_C\rangle|^2\): Since \(P'_{03}\) acts on (0,3) and \(P_{21}\) acts on (1,2), they commute. \(\langle\psi_C|P'_{03}P_{21}|\psi_C\rangle = \langle\phi_{03}|P'_{03}|\phi_{03}\rangle \langle\phi_{12}|P_{21}|\phi_{12}\rangle\).

\[ A_3 = \sum_{P'_{03}} \sum_{P_{21}} |\langle\phi_{03}|P'_{03}|\phi_{03}\rangle|^2 |\langle\phi_{12}|P_{21}|\phi_{12}\rangle|^2 \]
This sum is non-zero only when both factors are non-zero.
The first factor is non-zero for 3 Paulis (value 1).
The second factor is non-zero for 3 Paulis (value 1).
So $A_3 = (3 \cdot 1^2) \cdot (3 \cdot 1^2) = 9$.

4. Combine results for the final fidelity:

Substitute \(A_1=3, A_2=3, A_3=9\) into the fidelity formula:

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

Expand the terms:

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

Collect terms by powers of \(p\):

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

As a decimal:

\[ F = 1 - 1.6p + 0.64p^2 \]

The final answer is \(\boxed{1 - 1.6p + 0.64p^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 - (8/5)*p + (16/25)*p**2
    # ---------------------------------------------------------------

    return F_physical