Challenge

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

Challenge

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 #2
  1. Step-by-Step Derivation
  • Setup and notation
  • Data qubits: 0,1,2,3; ancilla: 4.
  • Stabilizers: S = {XXXX, ZZZZ}.
  • Logical Z’s: Z_A = ZZII (on qubits 0,1), Z_B = ZIZI (on qubits 0,2). Logical X’s: X_A = XIXI (on qubits 0,2), X_B = XXII (on qubits 0,1).
  • Circuit (right-to-left): H1, CNOT12, CNOT10, CNOT23, CNOT34, CNOT04, then measure Z on qubit 4.
  • Error model: After each CNOT gate, a 2-qubit depolarizing channel applies one of the 15 non-identity two-qubit Paulis uniformly with probability p/15 (identity with probability 1 βˆ’ p). Only these 5 two-qubit gates carry errors.

  • What is being post-selected

  • We accept only if: 1) The final data operator commutes with stabilizers XXXX and ZZZZ (i.e., the net error on data lies in the normalizer of S). Equivalently, the parity of X/Y occurrences on data qubits is even (commutes with ZZZZ), and the parity of Z/Y occurrences on data qubits is even (commutes with XXXX). 2) The ancilla measurement is 0 in Z basis, i.e., no net X or Y on qubit 4 at the end.
  • Let the β€œsyndrome triple” of a Pauli at the end be T ≑ (x4, sX, sZ) ∈ {0,1}^3, where x4 = 1 if ancilla has X/Y, sX = parity of Z/Y on data, sZ = parity of X/Y on data. Acceptance requires T = (0,0,0).

  • Logical state error criterion for |00>_AB

  • The target state |00>_AB is stabilized by Z_A and Z_B. Any final logical operator that anticommutes with Z_A and/or Z_B has an X component on logical qubit A and/or B and maps |00> to an orthogonal computational basis state, reducing the fidelity to 0 for that branch.
  • Define two β€œbit-flip” parities on the data operator P_d: c_A = parity of X/Y on qubits {0,1} (commutation with Z_A), c_B = parity of X/Y on qubits {0,2} (commutation with Z_B). If c_A = c_B = 0, the logical action is purely Z-type (possibly multiplied by stabilizers), which acts trivially on |00>. If either c_A = 1 or c_B = 1, the output is orthogonal to |00>_AB.

  • Propagation of single-qubit Paulis across later CNOTs

  • Conjugation rules for CNOT_{cβ†’t}:
    • X_c β†’ X_c X_t, Z_c β†’ Z_c,
    • X_t β†’ X_t, Z_t β†’ Z_c Z_t.
  • Using these, for each CNOT location l ∈ {2,3,4,5,6} corresponding to gates {12,10,23,34,04}, and for each of its two qubits, we compute the end-of-circuit image of X, Y, Z placed just after that gate. From those images we extract the bits (x4, sX, sZ) and (c_A, c_B). Because a two-qubit error is a product on the two participating qubits, the final invariants for a given 2-qubit Pauli are the XOR-sums of the contributions from each single-qubit factor.

  • Single-gate classification into syndrome triples

  • For each gate l, the 15 non-identity Paulis map into the eight possible triples T ∈ {0,1}^3 with the following universal combinatorial property:

    • For l ∈ {3,4,5,6} (all but CNOT12): among the 15 Paulis, each triple T appears exactly 2 times except T = (0,0,0), which appears once. Thus N_l(000) = 1 and N_l(T) = 2 for T β‰  000.
    • For l = 2 (CNOT12): the possible triples are restricted to T ∈ {000, 100, 110, 010} (i.e., sZ = 0 always), with counts N_2(000) = 3 and N_2(100) = N_2(110) = N_2(010) = 4.
  • c_A, c_B values within each triple

  • Key simplification: For each gate l and each triple T, all 2-qubit Paulis mapping to T have the same (c_A, c_B). Thus, within a fixed l and T there is no mixture of (c_A, c_B) values.
  • The (c_A, c_B) assignments (derived by explicit propagation) are:

    • l = 5 (CNOT34): c_A = c_B = 0 for all T.
    • l = 6 (CNOT04): c_A = c_B = 1 if sZ = 1 (i.e., T ∈ {001,011,101,111}); otherwise (for T ∈ {000,100,110,010}) c_A = c_B = 0.
    • l = 4 (CNOT23): c_A = 0 always; c_B = 1 for T ∈ {100,110,001,011}; c_B = 0 for T ∈ {000,010,101,111}.
    • l = 3 (CNOT10):
    • T ∈ {000,010}: (c_A, c_B) = (0,0).
    • T ∈ {100,110}: (c_A, c_B) = (0,1).
    • T ∈ {001,011}: (c_A, c_B) = (1,0).
    • T ∈ {101,111}: (c_A, c_B) = (1,1).
    • l = 2 (CNOT12): only T ∈ {000,100,110,010} occur, with (c_A, c_B) = (0,0) for T ∈ {000,010} and (0,1) for T ∈ {100,110}.
  • Why there is no O(p) logical error after post-selection

  • A single fault is accepted only if its T = (0,0,0). By the tables above, those accepted single-fault cases are purely Z-type on the data/logicals (c_A = c_B = 0), hence act trivially on |00>_AB. Therefore the conditional logical fidelity has no O(p) term.

  • Two-fault accepted events and malignancy criterion

  • With two faults at different gates l and m, let their triples be T_l and T_m and their bit-flip parities be (c_A^l, c_B^l) and (c_A^m, c_B^m). The combined error is accepted iff T_l βŠ• T_m = (0,0,0), i.e., T_l = T_m.
  • Conditional on acceptance (T_l = T_m ≑ T), the final bit-flip parities are (c_A^l βŠ• c_A^m, c_B^l βŠ• c_B^m). Because each gate l has a unique (c_A, c_B) for a given T, all accepted pairs for a fixed triple T are:
    • Benign (no logical flip) if (c_A^l, c_B^l) = (c_A^m, c_B^m).
    • Malignant (logical flip) if (c_A^l, c_B^l) β‰  (c_A^m, c_B^m).
  • Therefore, for each unordered gate pair {l,m}, the number of malignant accepted pairs is
\[ N_{\text{mal}}(l,m) = \sum_{T \in \{0,1\}^3} \mathbf{1}\{v_l(T) \neq v_m(T)\}\, N_l(T)\,N_m(T), \]
where v_l(T) = (c_A, c_B) for gate l at triple T, and N_l(T) is the count of Paulis at gate l with triple T.
  • Counting malignant accepted pairs for each gate pair
  • Using the N_l(T) and v_l(T) listed above, one finds:
    • (2,3): 0
    • (2,4): 0
    • (2,5): 16
    • (2,6): 16
    • (3,4): 16
    • (3,5): 24
    • (3,6): 16
    • (4,5): 16
    • (4,6): 24
    • (5,6): 16
  • Summing over all 10 unordered pairs gives
\[ \sum_{l<m} N_{\text{mal}}(l,m) \;=\; 144. \]
  • Leading-order logical infidelity conditioned on acceptance
  • The probability of picking a specific pair of non-identity two-qubit Paulis (one on gate l and one on gate m) is (p/15)^2.
  • To O(p^2), the acceptance probability in the denominator is 1 + O(p), so it does not alter the O(p^2) coefficient of the conditional logical error rate.
  • Therefore, the leading-order logical error probability (infidelity) after post-selection is
\[ P_{\text{fail}|\text{acc}} \;=\; \frac{144}{15^2} \, p^2 \;+\; O(p^3) \;=\; \frac{16}{25}\, p^2 \;+\; O(p^3). \]
  1. Mathematical Typesetting
  • As above; all quantities defined with LaTeX inline and display equations.
  1. Conventions and Units
  • As specified: circuit in right-to-left order, Pauli depolarizing errors after each CNOT, qubits labeled 0–3 (data) and 4 (ancilla).
  1. Final Answer: The logical state fidelity of the post-selected prepared |00>_AB state is
\[ F_{\text{logical}}(p) \;=\; 1 \;-\; \frac{16}{25}\,p^2 \;+\; O(p^3). \]
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 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 #4
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 - sp.Rational(16, 25) * p**2 + sp.O(p**3)
    # ---------------------------------------------------------------

    return F_logical