Checkpoint-2

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, mathematical identities or numerical codes.
  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\).

Checkpoints

Checkpoint 1

Suppose that we wish to prepare a logical two-qubit GHZ state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\) in the [[4,2,2]] code. To do so, we use the following state preparation circuit:

\[ (CNOT_{03}) (H_0) (CNOT_{21}) (H_2). \]

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.

What is the physical state fidelity of the final physical 4-qubit state at the end of the circuit as a function of the two-qubit gate error rate \(p\)?

Assistant #2
  1. Step-by-Step Derivation
  • Ideal target state and its stabilizers
  • The circuit acts (right-to-left) as H2 → CNOT21 → H0 → CNOT03 on |0000⟩.
  • H2 followed by CNOT21 prepares the Bell state |Φ+⟩ on qubits (2,1).
  • H0 followed by CNOT03 prepares the Bell state |Φ+⟩ on qubits (0,3).
  • Hence the ideal final state is
\[ |\psi_{\text{ideal}}\rangle = |\Phi^+\rangle_{21}\otimes|\Phi^+\rangle_{03},\quad |\Phi^+\rangle=\frac{|00\rangle+|11\rangle}{\sqrt{2}}. \]
  • A Bell state |Φ+⟩ is stabilized by X⊗X and Z⊗Z. Therefore
\[ \mathcal{S} = \langle X_1X_2,\ Z_1Z_2,\ X_0X_3,\ Z_0Z_3\rangle. \]
Equivalently (using the logical-operator identifications provided), this equals
\[ \langle XXXX,\ ZZZZ,\ IZZI,\ IXXI\rangle. \]
  • The full stabilizer group has 16 elements and factorizes across the pairs (1,2) and (0,3) as
\[ \mathcal{S}=\{P_{12}\otimes Q_{03}\,:\, P,Q\in\{II,\,XX,\,YY,\,ZZ\}\}. \]
  • Noise model and propagation
  • A two-qubit depolarizing channel follows each CNOT:
    • With probability 1−p it applies identity.
    • With probability p it applies uniformly one of the 15 non-identity two-qubit Paulis.
  • The first channel acts on qubits (2,1) after CNOT21; subsequent gates act only on qubits (0,3), so errors on (2,1) do not propagate.
  • The second channel acts on qubits (0,3) after CNOT03; there are no later gates.
  • Thus the net error at the end is E = E_{21} ⊗ E_{03}, with E_{21} supported on (1,2) and E_{03} on (0,3), independently drawn from their respective two-qubit depolarizing channels.

  • Fidelity under Pauli noise for a stabilizer state

  • For a pure stabilizer state |ψ⟩ and a Pauli channel ρ = ∑_E p_E E|ψ⟩⟨ψ|E, the fidelity is
\[ F=\langle\psi|\rho|\psi\rangle=\sum_E p_E\,|\langle\psi|E|\psi\rangle|^2, \]
which equals the total probability that E lies in the stabilizer group of |ψ⟩ (since ⟨ψ|E|ψ⟩=0 unless E∈𝒮, in which case it equals ±1).
  • Counting the harmless (stabilizer) errors
  • E ∈ 𝒮 if and only if E_{21} ∈ {II,XX,YY,ZZ} and E_{03} ∈ {II,XX,YY,ZZ}.
  • For a two-qubit depolarizing channel on a given pair:
    • P(E_pair = II) = 1 − p.
    • Among the 15 non-identity Paulis, exactly 3 are in {XX,YY,ZZ}, so P(E_pair ∈ {XX,YY,ZZ}) = 3·(p/15) = p/5.
    • Therefore the “harmless” probability per pair is
\[ P_{\text{ok (per pair)}} = (1-p) + \frac{p}{5} = 1 - \frac{4p}{5}. \]
  • The two pairs are independent, so the total fidelity is the product:
\[ F(p) = \left(1 - \frac{4p}{5}\right)^2. \]
  1. Mathematical Typesetting
  • Already included above.
  1. Conventions and Units
  • Dimensionless error probability p; no units involved.
  1. Final Answer: F(p) = (1 - 4p/5)^2 = 1 - (8/5)p + (16/25)p^2.
User #3

The correct answer is: $ F_{\rm{physical}}=(1-\frac{12}{15}p)^2 $

Now let’s solve the next Checkpoint.

Checkpoint 2

Suppose that we wish to prepare a logical two-qubit GHZ state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\) in the [[4,2,2]] code. To do so, we use the following state preparation circuit:

\[ (CNOT_{03}) (H_0) (CNOT_{21}) (H_2). \]

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.

What is the logical state fidelity of the final 2-qubit logical state at the end of the circuit as a function of the two-qubit gate error rate \(p\), assuming the state is post-selected on all detectable errors in the code?

Assistant #4
  1. Step-by-Step Derivation
  • Ideal state and error locations
  • The circuit prepares the physical state
\[ |\psi_{\mathrm{ideal}}\rangle=|\Phi^+\rangle_{21}\otimes|\Phi^+\rangle_{03},\quad |\Phi^+\rangle=\frac{|00\rangle+|11\rangle}{\sqrt{2}}. \]
  • A two-qubit depolarizing channel acts after each CNOT. Thus the final error is a product
\[ E=E_{21}\otimes E_{03}, \]
where each $E_{\mathrm{pair}}$ is a two-qubit Pauli with
- $P(E_{\mathrm{pair}}=II)=1-p$,
- each of the 15 non-identity Paulis with probability $p/15$,
and the two pairs are independent.
  • Detectability condition (membership in the code normalizer)
  • The code stabilizers are \(S_X=XXXX\) and \(S_Z=ZZZZ\), which factor across the pairs as
\[ S_X=(X_2X_1)\otimes(X_0X_3),\qquad S_Z=(Z_2Z_1)\otimes(Z_0Z_3). \]
  • For a Pauli \(P\) on a given pair, define its pair-syndrome
\[ s(P)=(s_X(P),s_Z(P))\in\{0,1\}^2, \]
where $s_X(P)=0$ if $P$ commutes with $X\otimes X$ and $1$ if it anticommutes (similarly for $s_Z$ with $Z\otimes Z$).
  • The total error \(E=E_{21}\otimes E_{03}\) commutes with both \(S_X,S_Z\) (i.e., is undetected) if and only if the pair-syndromes match:
\[ s(E_{21})=s(E_{03}). \]
  • Distribution of pair-syndromes under two-qubit depolarizing noise
  • On a pair, the 16 Paulis split into 4 equally sized classes by \(s\in\{(0,0),(1,0),(0,1),(1,1)\}\).
  • Among non-identity elements, the counts are:
    • class \((0,0)\): 3 elements (XX, YY, ZZ),
    • classes \((1,0)\), \((0,1)\), \((1,1)\): 4 elements each.
  • Therefore, for a single pair:
\[ P_{00} &:= P\big(s=(0,0)\big) = (1-p)+3\frac{p}{15}=1-\frac{12}{15}p=1-\frac{4p}{5},\\ P_{10} &= P_{01}=P_{11}=4\frac{p}{15}. \]
  • Acceptance probability (post-selecting on no detected error)
  • Because the two pairs are independent,
\[ = \left(1-\frac{4p}{5}\right)^2+3\left(\frac{4p}{15}\right)^2 \]
  • Logical fidelity of the post-selected state
  • The logical target is the Bell state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\), whose logical stabilizer is generated by \(X_A X_B\) and \(Z_A Z_B\). A Pauli error preserves this logical state iff, modulo the code stabilizer, it is in
\[ \{I,\,X_A X_B,\,Y_A Y_B,\,Z_A Z_B\}. \]
  • Physically, these correspond exactly to the class where both pairs lie in \(s=(0,0)\) (i.e., \(E_{21},E_{03}\in\{II,XX,YY,ZZ\}\)). Any accepted error with \(s\neq(0,0)\) maps the logical Bell state to an orthogonal Bell state and contributes zero to the fidelity.
  • Hence the numerator (accepted and logically correct) is
\[ P_{\mathrm{good}}=\left(1-\frac{12}{15}p\right)^2=\left(1-\frac{4p}{5}\right)^2. \]
  • The logical fidelity conditioned on acceptance is
\[ = \frac{P_{\mathrm{good}}}{P_{\mathrm{acc}}} = \frac{\left(1-\frac{12}{15}p\right)^2} \]
  • Small-p expansion (sanity check)
  • Using the above,
\[ F_{\mathrm{logical}}(p) = 1 - \frac{16}{75}p^2 + O(p^3), \]
showing first-order errors are fully detected and removed by post-selection.
  1. Mathematical Typesetting
  • All expressions are given in LaTeX above.
  1. Conventions and Units
  • Dimensionless error probability \(p\); no units.
  1. Final Answer:
\[ F_{\mathrm{logical}}(p) = \frac{\left(1-\frac{12}{15}p\right)^2} {\left(1-\frac{12}{15}p\right)^2 + 3\left(\frac{4}{15}p\right)^2} = \frac{\left(1-\frac{4p}{5}\right)^2}{1-\frac{8p}{5}+\frac{64}{75}p^2}. \]
User #5

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 logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of the two-qubit gate error rate $p$ in Sympy format.

    Inputs
    ----------
    p: sympy.Symbol, the two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, the logical state fidelity as a function of $p$
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = ...  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical
Assistant #6
import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of the two-qubit gate error rate $p$ in Sympy format.

    Inputs
    ----------
    p: sympy.Symbol, the two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, the logical state fidelity as a function of $p$
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = ((1 - sp.Rational(4, 5)*p)**2) / (((1 - sp.Rational(4, 5)*p)**2) + 3*(sp.Rational(4, 15)*p)**2)
    # ---------------------------------------------------------------

    return F_logical