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

We denote the five CNOTs that appear (from right to left in the circuit) by

\[ \begin{aligned} g_1 &= C_{12},\qquad g_2 &= C_{10},\qquad g_3 &= C_{23},\qquad g_4 &= C_{34},\qquad g_5 &= C_{04}, \end{aligned} \]

where the first index is the control, the second the target.
After every CNOT a two-qubit depolarising channel acts

\[ \mathcal E_{ct}(\rho)= (1-p)\rho+\frac{p}{15}\! \sum_{(P,Q)\neq(I,I)} \bigl(P_c\otimes Q_t\bigr)\rho\bigl(P_c\otimes Q_t\bigr),\qquad P,Q\in\{I,X,Y,Z\}. \]

Because we post-select

  1. on the ancilla measurement outcome \(|0\rangle\), and
  2. on the two stabilisers \(S_X=XXXX,\;S_Z=ZZZZ\) both giving eigenvalue \(+1\),

only those Pauli faults that commute with both stabilisers and leave the ancilla in an eigenstate of \(Z\) with eigenvalue \(+1\) can survive. All other faults are detected and the run is discarded.


A single–gate fault is already order \(p\); probabilities with two or more faults are \(\mathcal O(p^{2})\) and can be neglected for leading-order fidelity. Hence we examine, for every gate \(g_k\), the 15 Pauli pairs that may appear immediately after that gate and propagate them through the remaining circuit.

Useful CNOT conjugation rules
(control \(c\), target \(t\)):

\[ \begin{aligned} X_c &\;\longrightarrow\; X_cX_t, &\qquad Z_c &\;\longrightarrow\; Z_c,\\ X_t &\;\longrightarrow\; X_t, & Z_t &\;\longrightarrow\; Z_cZ_t,\\ Y_c &\;\longrightarrow\; Y_cX_t, & Y_t &\;\longrightarrow\; Z_cY_t . \end{aligned} \]

Because weight-1 faults are always caught by the distance-2 code, we only have to look at the three weight-2 same-Pauli errors
\(XX,\;YY,\;ZZ\) on each pair; all other 12 possibilities are detected.


Gate–by–gate analysis (Heisenberg propagation)

  1. \(g_{1}=C_{12}\):
    \(XX_{12}\;\Rightarrow\;XXXX = S_X\) (stabiliser – accepted, no logical error).
    \(YY_{12},\,ZZ_{12}\;\Rightarrow\; X_0Y_1Y_2X_3\equiv Z_1Z_2 = Z_AZ_B\)
    (undetected logical \(Z_AZ_B\)).

  2. \(g_{2}=C_{10}\):
    \(ZZ_{10}\;\Rightarrow\;Z_0Z_1=Z_A\) (undetected logical \(Z_A\)).
    \(XX_{10},YY_{10}\) contain \(X_4\) and flip the ancilla; detected.

  3. \(g_{3}=C_{23}\):
    \(ZZ_{23}\;\Rightarrow\;Z_0Z_1=Z_A\) (undetected logical \(Z_A\)).
    \(XX_{23},YY_{23}\) propagate an \(X_4\); detected.

  4. \(g_{4}=C_{34}\):
    \(ZZ_{34}\;\Rightarrow\;Z_0Z_3\equiv Z_AZ_B\) (undetected logical \(Z_AZ_B\)).
    \(XX_{34},YY_{34}\) act on the ancilla; detected.

  5. \(g_{5}=C_{04}\):
    All three same-Pauli errors leave a single-qubit Pauli on qubit 0, which flips at least one stabiliser and is therefore detected.


Summary of single-gate faults that survive post-selection

\[ \begin{array}{c|c} \text{gate}&\text{undetected logical Pauli}\\ \hline g_1&YY_{12},\;ZZ_{12}\;(\;Z_AZ_B\;)\\ g_2&ZZ_{10}\;(\;Z_A\;)\\ g_3&ZZ_{23}\;(\;Z_A\;)\\ g_4&ZZ_{34}\;(\;Z_AZ_B\;)\\ g_5&\text{none} \end{array} \]

That is five logically harmful Pauli pairs altogether.


Probability bookkeeping to first order in \(p\)

• Probability that exactly one gate suffers one of the five bad Paulis:

\[ P_{\text{log}}^{(1)} = 5 \times\frac{p}{15}= \frac{p}{3}. \]

• Total acceptance probability (no detected fault) is

\[ P_{\text{acc}} = 1-\underbrace{\Bigl(\tfrac{69}{15}\Bigr)}_{\text{detected pairs}}\,p +\mathcal O(p^{2}) = 1+\mathcal O(p). \]

Logical fidelity conditioned on acceptance

\[ F_{\text{logical}}(p)= 1-\frac{P_{\text{log}}^{(1)}}{P_{\text{acc}}} =1-\frac{p}{3}+\mathcal O(p^{2}). \]

(The \(\mathcal O(p^{2})\) term comes from two-fault events as well as the product \(P_{\text{log}}^{(1)}/P_{\text{acc}}\); it is suppressed here because the problem only asks for the functional dependence.)


2. Mathematical typesetting

All equations above are typeset in LaTeX.

3. Conventions and Units

No physical units occur; probabilities are dimensionless.


Final Answer:
To leading order in the physical two-qubit gate error rate \(p\), the logical two-qubit state fidelity after post-selection is

\[ \boxed{\,F_{\text{logical}}(p)=1-\dfrac{p}{3}+\mathcal O\!\bigl(p^{2}\bigr)\,}. \]

Hence the logical infidelity scales linearly with slope \(1/3\) in the small-\(p\) regime.

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 - p/3  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical