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 target state - Data qubits: 0,1,2,3. Logical operators (up to stabilizers S = ⟨XXXX, ZZZZ⟩): - X_A = X I X I, X_B = X X I I - Z_A = Z Z I I, Z_B = Z I Z I - Circuit (executed right-to-left): H1 → CNOT12 → CNOT10 → CNOT23 → CNOT34 → CNOT04 → measure M4 (Z-basis). - With no faults, H1 followed by CNOT12, CNOT10, CNOT23 prepares the 4-qubit GHZ |0000⟩ + |1111⟩ (an S=+1 state and the desired |00⟩AB). The last two CNOTs implement a measurement of Z0Z3 with ancilla 4; the success flag is ancilla outcome “0”.

Noise model and Pauli propagation - After each CNOTij, a two-qubit depolarizing error acts on i,j: with probability p it applies uniformly one of the 15 non-identity two-qubit Paulis. - We analyze Pauli faults using the binary symplectic representation. For a CNOT with control c and target t, conjugation updates Pauli bits (x,z) over GF(2) as - x′c = xc, x′t = xt ⊕ xc - z′c = zc ⊕ zt, z′t = zt

Mapping a fault inserted after each CNOT to the end of the circuit Label the five CNOTs (in time order) as L1=CNOT12, L2=CNOT10, L3=CNOT23, L4=CNOT34, L5=CNOT04. For a fault at Lk, write the error on that gate’s two wires with x,z bits; propagate through the subsequent CNOTs to obtain final bits on qubits 0,1,2,3,4. The x-part (bit-flip content) mappings are

  • L1 (qubits 1,2, with x-bits a=x1, c=x2):
  • x0=a, x1=a, x2=c, x3=c, x4=a⊕c
  • L2 (qubits 1,0, with x-bits b=x1, u=x0):
  • x0=u, x1=b, x2=0, x3=0, x4=u
  • L3 (qubits 2,3, with x-bits p=x2, r=x3):
  • x0=0, x1=0, x2=p, x3=r, x4=r
  • L4 (qubits 3,4, with x-bits e=x3, g=x4):
  • x0=0, x1=0, x2=0, x3=e, x4=g
  • L5 (qubits 0,4, with x-bits u=x0, n=x4):
  • x0=u, x1=0, x2=0, x3=0, x4=n

The z-part (phase-flip content) mappings needed only for the Z-stabilizer parity are

  • L1 (qubits 1,2, with z-bits b=z1, d=z2):
  • z0=0, z1=b, z2=d, z3=0
  • L2 (qubits 1,0, with z-bits b′=z1, d′=z0):
  • z0=d′, z1=b′, z2=0, z3=0
  • L3 (qubits 2,3, with z-bits d″=z2, f″=z3):
  • z0=0, z1=0, z2=d″, z3=f″
  • L4 (qubits 3,4, with z-bits f=z3, h=z4):
  • z0=h, z1=0, z2=0, z3=f
  • L5 (qubits 0,4, with z-bits d=z0, h=z4):
  • z0=d, z1=0, z2=0, z3=0

Acceptance (post-selection) conditions We keep only runs in which: - The ancilla outcome is 0. Because the ancilla is measured in Z, any X_4 or Y_4 flips the outcome. Thus acceptance requires x4=0. - The prepared block is in the code space: XXXX=+1, ZZZZ=+1. In the Pauli-bit language: - Even X-parity on data: x0⊕x1⊕x2⊕x3=0 - Even Z-parity on data: z0⊕z1⊕z2⊕z3=0

Which accepted errors change |00⟩AB? - The target state is the +1 eigenstate of Z_A and Z_B; any logical Z on A/B acts trivially on |0⟩, so it does not reduce the fidelity with |00⟩AB. - Logical bit-flips (X_A, X_B) change the state and reduce fidelity. In physical bits, these occur exactly when - X_A flips if and only if x0⊕x1=1 - X_B flips if and only if x0⊕x2=1 Thus, among accepted runs, the logical infidelity equals the probability that x0⊕x1=1 or x0⊕x2=1.

No O(p) logical error With one fault, our acceptance constraints (x4=0 and both stabilizer parities even) force any undetected weight-2 error to be either a stabilizer or a logical Z-type on |00⟩AB, which does not change the state. Hence the conditional logical infidelity is O(p^2).

Counting malignant fault pairs at O(p^2) Let two independent faults occur after distinct gates Li and Lj. Each two-qubit Pauli on a gate’s wires is equally likely (15 choices). For each ordered pair (Li,Lj) there are 15^2 combinations.

We count, for each pair (Li,Lj): - The number of Pauli-pair combinations that satisfy all three acceptance constraints: - x4=0, - x0⊕x1⊕x2⊕x3=0, - z0⊕z1⊕z2⊕z3=0, and additionally cause a logical bit-flip (x0⊕x1=1 or x0⊕x2=1).

We perform this count using the linear (GF(2)) relations given by the propagation maps above. It is convenient to count on the 16×16 space of all (x,z)-bit quadruples per fault (including the identity quadruple) and then note that, for the malignant sets below, the identity quadruple at either location is incompatible with the required constraints (so the count is the same on 15×15).

Result of the pairwise enumeration (sketch): - We denote the x-bits on the two wires of Li as free variables and impose the acceptance equations to solve for the remaining bits. We then impose “logical flip” as x0⊕x1=1 or x0⊕x2=1, and finally impose the Z-parity constraint (one linear equation in the four z-bits of the two faults). For each pair we obtain a number Nmal(Li,Lj) of malignant Pauli-pair choices among the 15^2 possible for that pair. - The outcomes are: - (L1,L2): 0 - (L1,L3): 0 - (L1,L4): 16 - (L1,L5): 16 - (L2,L3): 16 - (L2,L4): 24 - (L2,L5): 16 - (L3,L4): 16 - (L3,L5): 24 - (L4,L5): 16 - Summing over the 10 ordered gate pairs gives Σpairs Nmal = 6×16 + 2×24 = 96 + 48 = 144.

Therefore, to second order in p, the probability of an undetected logical bit-flip (conditional on acceptance to O(p^0), see below) is - P_L(error ∧ accept) = (p^2) × (Σpairs Nmal)/(15^2) + O(p^3) = (p^2) × (144/225) + O(p^3) = (16/25) p^2 + O(p^3).

Conditional vs. unconditional fidelity - The acceptance probability is 1 − O(p) because essentially all single-fault events are rejected by either the ancilla or the stabilizers. Conditioning on acceptance multiplies by 1/(1 − O(p)) = 1 + O(p), which only affects terms at O(p^3) and higher. Hence the conditional logical infidelity is (16/25) p^2 + O(p^3).

Thus the logical state fidelity of the prepared two-qubit logical state, post-selected on “accept,” is - F_log(p) = 1 − (16/25) p^2 + O(p^3).

2) Mathematical Typesetting - Propagation under CNOT(c,t): - X_c → X_c X_t, X_t → X_t, - Z_c → Z_c, Z_t → Z_c Z_t. - Acceptance: - x4 = 0, - x0⊕x1⊕x2⊕x3 = 0, z0⊕z1⊕z2⊕z3 = 0. - Logical flips: - X_A flip iff x0⊕x1 = 1, X_B flip iff x0⊕x2 = 1.

3) Conventions and Units - Faults occur only after CNOTs; the H and measurement are ideal. - Two-qubit depolarizing after each CNOT: each non-identity two-qubit Pauli with probability p/15.

4) Final Answer: F_log(p) = 1 − (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
    # ---------------------------------------------------------------

    return F_logical