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

a) Code, logicals, and acceptance criterion

  • [[4,2,2]] code with stabilizers Sx = XXXX and Sz = ZZZZ.
  • Logical Paulis (one choice, up to stabilizers): XA = X I X I, XB = X X I I, ZA = Z Z I I, ZB = Z I Z I.
  • We prepare |00⟩AB and post-select on:
  • ancilla measurement outcome m4 = 0,
  • passing the code checks (i.e., both stabilizers return +1). We will treat this as a final codespace check (detecting any error that anticommutes with Sx or Sz).

All gates are Clifford; Pauli errors propagate within the Pauli group. Thus, conditioned on post-selection, the output on the data qubits is a Pauli drawn from a subset of the normalizer N(S) of the stabilizer group. Those elements in S are harmless (act as the identity on the code space), while those in N(S)\S are logical errors, reducing the fidelity with |00⟩AB.

b) Noise model

  • After each of the 5 CNOTs in the circuit, an i.i.d. two-qubit depolarizing error occurs:
  • with probability 1 βˆ’ p: identity,
  • with probability p: a uniformly random non-identity two-qubit Pauli on the two participating qubits (15 choices, each with probability p/15).

c) Circuit and ordering

The circuit (right-to-left execution):

1) H1, 2) CNOT12, 3) CNOT10, 4) CNOT23, 5) CNOT34, 6) CNOT04, 7) M4 (measurement of qubit 4).

Noiseless action on data (qubits 0–3): the three CNOTs plus H1 prepare the +1 common eigenstate of Sx and Sz; with the stated logical convention that state is |00⟩AB. The flag (ancilla) sequence CNOT34 and CNOT04 is designed to detect certain single-fault β€œhook” errors during state preparation; we post-select on m4 = 0.

d) Pauli propagation and acceptance

  • Clifford propagation of Paulis through CNOT(cβ†’t):
  • Xc β†’ Xc Xt, Zc β†’ Zc,
  • Xt β†’ Xt, Zt β†’ Zc Zt.

  • Codespace acceptance (both stabilizers +1) is equivalent to requiring that the final data Pauli Edata commute with both Sx and Sz. Using the standard symplectic form,

  • Edata commutes with Sx iff the total Z-weight (number of qubits with Z or Y on data) is even,
  • Edata commutes with Sz iff the total X-weight (number of qubits with X or Y on data) is even. Therefore, accepted data errors must have even X-weight and even Z-weight on qubits 0–3.

  • Ancilla acceptance depends on the measurement basis. Writing the final ancilla Pauli as P4 ∈ {I4, X4, Y4, Z4}:

  • If M4 is in the Z basis (as is conventional unless stated otherwise), acceptance probability is:
    • 1 if P4 ∈ {I4, Z4},
    • 1/2 if P4 ∈ {X4, Y4}. That is, X4 or Y4 randomizes the Z-basis outcome; we then post-select on the m4 = 0 branch, which keeps half of those cases. (If M4 were in X basis, swap the roles of X and Z in the above sentence. The counting below is unchanged up to relabeling.)

e) Fault-tolerance and the scaling with p

  • Single-fault analysis: Under the stated post-selection (m4 = 0 and both stabilizers +1), any single two-qubit Pauli fault introduced at any of the five CNOT locations either:
  • anticommutes with Sx or Sz at the end (and is thus rejected by the codespace post-selection), or
  • flips/randomizes the ancilla readout (and is thus rejected when we post-select on m4 = 0). Therefore, after the post-selection, there are no O(p) contributions to logical error. The first nonzero contribution to logical error among accepted runs is O(p^2).

  • Two-fault analysis (leading term): Let k < β„“ index two distinct CNOT locations and let Pk, Pβ„“ be non-identity two-qubit Paulis injected after those gates. Propagate both to the end, multiply to get the total final Pauli Efinal on 5 qubits. This Efinal factorizes as Edata βŠ— P4, with Edata acting on qubits 0–3 and P4 on qubit 4.

We keep the run iff: - Edata has even X-weight and even Z-weight (commutes with Sx and Sz), - the ancilla measurement yields m4 = 0; i.e., - always, if P4 ∈ {I4, Z4}; - with probability 1/2, if P4 ∈ {X4, Y4}.

Among the accepted runs, the fidelity with |00⟩AB is 1 minus the probability (conditioned on acceptance) that Edata ∈ N(S)\S, i.e., that Edata is a nontrivial logical Pauli. In other words, - good accepted events: Edata ∈ S, - bad accepted events: Edata ∈ N(S)\S.

f) Closed-form at second order

Let π’œ be the set of 5 CNOT locations. For each unordered pair {k,β„“} βŠ‚ π’œ, define: - N(k,β„“; I/Z) = number of ordered pairs (Pk, Pβ„“) ∈ (P2{II}) Γ— (P2{II}), where P2 is the 16 two-qubit Paulis on the two qubits of the gate, such that after propagation to the end: - Edata ∈ N(S)\S (a nontrivial logical on the code), - ancilla factor P4 ∈ {I4, Z4} (so acceptance weight 1).

  • N(k,β„“; X/Y) defined the same way but with P4 ∈ {X4, Y4} (so acceptance weight 1/2).

Because each two-qubit error is drawn uniformly from 15 possibilities and the two faults are independent, the total (unconditional) probability for any fixed ordered pair (Pk, Pβ„“) is (p/15)^2. Summing and normalizing by the acceptance probability (which equals 1 + O(p) and so contributes only at O(p^3) to the conditional error rate), we obtain the leading-order logical error probability among accepted runs:

pL(p) = 1 βˆ’ Flogical(p) = (p^2 / 15^2) Γ— βˆ‘_{k<β„“} [N(k,β„“; I/Z) + (1/2) N(k,β„“; X/Y)] + O(p^3).

Therefore, the logical-state fidelity conditioned on post-selection is:

Flogical(p) = 1 βˆ’ C p^2 + O(p^3),

with C = (1 / 225) βˆ‘_{k<β„“} [N(k,β„“; I/Z) + (1/2) N(k,β„“; X/Y)].

This C is fully determined by the given circuit (its five CNOT locations) and the [[4,2,2]] code, and can be obtained by an explicit (but routine) enumeration using the binary symplectic (GF(2)) propagation rules above.

g) Remarks

  • The key structural result is that, under the stated post-selection, all O(p) fault paths are removed, so the leading infidelity is quadratic in p.
  • The exact numerical value of C is a circuit-dependent combinatorial count of β€œmalignant” two-fault pairs (those that pass the post-selection yet implement a nontrivial logical). It can be computed efficiently by code; the analytic form above gives the precise counting prescription.
  • Because this is a distance-2 code, all accepted Edata necessarily have even X- and Z-weight. Among those, precisely the elements in N(S)\S are the 15 nontrivial logical Paulis on the two logical qubits (up to stabilizers). Those are exactly what reduce the logical-state fidelity.
  1. Mathematical Typesetting
  • All equations are included inline or displayed above.
  1. Conventions and Units
  • Standard qubit Pauli/stabilizer conventions as per problem statement.
  1. Final Answer:

Flogical(p) = 1 βˆ’ C p^2 + O(p^3),

with

C = (1 / 225) βˆ‘_{k<β„“} [N(k,β„“; I/Z) + (1/2) N(k,β„“; X/Y)],

where the sum runs over the 10 unordered pairs {k,β„“} of the five CNOT locations in the circuit, and N(k,β„“; I/Z) (respectively N(k,β„“; X/Y)) is the number of ordered two-fault Pauli pairs at those locations which, after Clifford propagation to the end of the circuit, yield a nontrivial logical Pauli on the data while the ancilla factor is in {I,Z} (respectively {X,Y}).

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