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
  • Code and target state
  • The [[4,2,2]] code has stabilizers S = {XXXX, ZZZZ}. The given circuit prepares the 4-qubit GHZ state (|0000⟩+|1111⟩)/√2 on data qubits 0–3, which is stabilized by S and corresponds to the logical state |00⟩AB with the given logical operators.
  • An ancilla (qubit 4) is coupled at the end by CNOT34 and CNOT04 and then measured in Z. Postselection accepts only runs with ancilla outcome 0 and with trivial code syndrome (i.e., commuting with both stabilizers).

  • Error model and objective

  • After each of the five CNOTs in the circuit, an independent two-qubit depolarizing error occurs: with probability p, a uniformly random non-identity two-qubit Pauli (15 choices) is applied on the two qubits of that CNOT; with probability 1−p the identity is applied.
  • Only two-qubit gates are faulty. H and measurement are perfect.
  • We seek the logical state fidelity (i.e., the probability that the accepted data state equals |00⟩AB) conditioned on postselection (ancilla = 0 and trivial stabilizer syndrome), as a function of p.

  • Fault-tolerance and order of the first non-zero term

  • Single faults are detected by either the ancilla measurement or a stabilizer, except for a Z4 fault occurring after the last CNOT (CNOT04). Z4 commutes with the ancilla Z measurement and with the code stabilizers (it acts only on ancilla), so such runs are accepted; however, this fault acts only on the ancilla and does not affect the data state. Therefore, to first order in p, accepted runs are logically correct.
  • Hence the logical infidelity is O(p^2).

  • CSS analysis and propagation rules

  • Because the circuit is Clifford and the code is CSS, we may track X and Z components independently through the remaining CNOTs using:
    • Xc → XcXt, Xt → Xt, Zc → Zc, Zt → ZcZt.
  • We record, for a single-qubit Pauli inserted immediately after a specific CNOT, its final X- and Z-supports on the data qubits (0–3) and whether an X on the ancilla (qubit 4) appears at the end (which would flip the ancilla measurement and be rejected).

  • Single-qubit error propagation (per CNOT location)

  • Label the five CNOTs (from right to left execution): 1: CNOT12, 2: CNOT10, 3: CNOT23, 4: CNOT34, 5: CNOT04.
  • The final supports for single-qubit X or Z occurring after each gate on the specified qubit are:

    Gate 1 (after CNOT12): remaining CNOTs 10, 23, 34, 04 - X1 → X{1,0,4}, Z1 → Z{1} - X2 → X{2,3,4}, Z2 → Z{2}

    Gate 2 (after CNOT10): remaining 23, 34, 04 - X1 → X{1}, Z1 → Z{1} - X0 → X{0,4}, Z0 → Z{0}

    Gate 3 (after CNOT23): remaining 34, 04 - X2 → X{2}, Z2 → Z{2} - X3 → X{3,4}, Z3 → Z{3}

    Gate 4 (after CNOT34): remaining 04 - X3 → X{3}, Z3 → Z{3} - X4 → X{4}, Z4 → Z{0,4}

    Gate 5 (after CNOT04): measurement - X0 → X{0}, Z0 → Z{0} - X4 → X{4}, Z4 → Z{4}

  • From these, any single fault on data yields an odd-weight X or Z on the data and is detected by a stabilizer; any single X/Y on the ancilla before measurement flips the ancilla outcome and is detected. The only undetected single fault is Z4 after the last CNOT, which affects only the ancilla and not the data.

  • Conditions for acceptance and malignancy for two faults

  • Consider two faults (at distinct gates i<j), each a non-identity two-qubit Pauli on the qubits of that gate.
  • Acceptance requires: 1) Even X-weight on data (commute with ZZZZ), 2) Even Z-weight on data (commute with XXXX), 3) No net X (or Y) on ancilla 4 at the end (to keep ancilla outcome 0).
  • For the target state |00⟩AB, any net logical Z (Z-type) on the data is harmless (|00⟩AB is a +1 eigenstate of both logical Z’s). The only harmful (malignant) accepted errors are those implementing a logical X on either logical qubit (i.e., the final X-support on data has weight 2, corresponding to one of X_A, X_B, X_AX_B up to stabilizers). Weight 0 or 4 X on data are identity or a stabilizer and are harmless.

  • Counting malignant pairs (to O(p^2))

  • For each gate, parametrize the X-output on data as the XOR of contributions from having an X component on each of the two qubits of the gate. Ancilla-X parity is the XOR of the per-qubit ancilla-X flags from the table above. Similarly, Z-parity on data from each gate is the XOR of Z contributions on that gate’s two qubits (including the propagation Z4→Z0 at Gate 4).
  • For each of the 10 ordered gate pairs (i<j), enumerate X-pattern pairs that: (i) produce final X-data of weight exactly 2, (ii) have zero ancilla-X parity. For each such X-pattern pair, count the number of Z-bit assignments across the two gates that: (iii) yield even Z-weight on data (one linear parity constraint), (iv) satisfy the “non-identity per gate” constraint (trivially satisfied whenever the gate’s X-pattern is nonzero; if a gate’s X-pattern were zero, at least one Z on that gate would be required—but all accepted X-patterns used here have nonzero X per gate).
  • Performing this counting yields the number of malignant pairs N_mal for each gate pair:

    • (1,2): 0
    • (1,3): 0
    • (1,4): 16
    • (1,5): 16
    • (2,3): 16
    • (2,4): 24
    • (2,5): 8
    • (3,4): 8
    • (3,5): 24
    • (4,5): 8 Summing, N_mal = 120.
  • Logical error probability and fidelity

  • Each malignant ordered pair contributes probability (p/15)^2 to second order. Therefore, the total logical error probability to O(p^2) is P_L = N_mal (p/15)^2 = 120 × p^2 / 225 = (8/15) p^2 + O(p^3).
  • The acceptance probability to first order is P_acc = 1 − [4·1 + (14/15)] p + O(p^2) = 1 − (74/15) p + O(p^2), because all single faults are rejected except Z4 after the last gate (1 of 15 at Gate 5). However, this does not affect the coefficient of p^2 in the conditional fidelity.
  • The logical state fidelity conditioned on acceptance, to second order, is F_logical(p) = 1 − P_L + O(p^3) = 1 − (8/15) p^2 + O(p^3).
  1. Mathematical Typesetting

The leading-order expression for the logical state fidelity (post-selected on ancilla outcome 0 and trivial [[4,2,2]] syndrome) is:

\[ F_{\text{logical}}(p) \;=\; 1 \;-\; \frac{8}{15}\,p^2 \;+\; O(p^3)\,. \]
  1. Conventions and Units
  • The error rate p is the two-qubit gate error probability per CNOT, with a uniformly random non-identity two-qubit Pauli drawn with probability p/15. Only the five CNOTs are faulty; H and measurement are ideal.
  1. Final Answer: F_logical(p) = 1 − (8/15) 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(8, 15)*p**2  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical