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, 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\).

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
  • Noise model and effective error:
  • Only the two CNOTs are noisy. After CNOT21 a two-qubit depolarizing channel acts on qubits (2,1), and after CNOT03 a depolarizing channel acts on qubits (0,3).
  • Let the Pauli error after CNOT21 be \(P_{12}\) (acting on qubits 1,2; same as 2,1 up to ordering) and after CNOT03 be \(P_{03}\) (acting on qubits 0,3). Each takes value
    • \(II\) with probability \(1-p\),
    • each of the 15 non-identity two-qubit Paulis with probability \(p/15\).
  • Because the gates following \(P_{12}\) (namely \(H_0\) and CNOT03) act only on qubits 0 and 3, they commute with \(P_{12}\). Hence the effective Pauli at the end is simply
\[ P_{\text{eff}} = P_{03}\,P_{12} = P_{03} \otimes P_{12}, \]
acting on disjoint pairs.
  • Target state is a stabilizer state:
  • The code stabilizers are \(XXXX\) and \(ZZZZ\).
  • For the logical GHZ state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\), the logical stabilizers are \(X_A X_B\) and \(Z_A Z_B\).
  • Using the given logical operators,
\[ X_A X_B = (XIXI)(XXII) = IXXI, \]
\[ Z_A Z_B = (ZZII)(ZIZI) = IZZI. \]
  • Thus the target 4-qubit state is the unique stabilizer state with generators
\[ \langle\, XXXX,\; ZZZZ,\; IXXI,\; IZZI \,\rangle. \]
  • Stabilizer factorization over the two disjoint pairs (0,3) and (1,2):
  • Restrict these generators to qubits (0,3):
    • \(XXXX \to XX\), \(ZZZZ \to ZZ\), \(IXXI \to II\), \(IZZI \to II\),
    • generating the subgroup \(\{II,\,XX,\,YY,\,ZZ\}\) on qubits (0,3).
  • Restrict to qubits (1,2):
    • \(XXXX \to XX\), \(ZZZZ \to ZZ\), \(IXXI \to XX\), \(IZZI \to ZZ\),
    • also generating \(\{II,\,XX,\,YY,\,ZZ\}\) on qubits (1,2).
  • Therefore the full stabilizer group is
\[ \mathcal{S}_{\text{target}} = \{P_{03}\otimes P_{12}\;|\;P_{03}\in\{II,XX,YY,ZZ\},\;P_{12}\in\{II,XX,YY,ZZ\}\}, \]
of size 16.
  • Fidelity with a stabilizer state under Pauli noise:
  • For a stabilizer state \(|\psi\rangle\), and a Pauli error \(P\), \(\langle\psi|P|\psi\rangle=1\) iff \(P\in\mathcal{S}_{\text{target}}\), and \(0\) otherwise.
  • The physical state fidelity is thus the probability that the effective Pauli lies in the stabilizer:
\[ F(p) = \Pr\big(P_{\text{eff}}\in\mathcal{S}_{\text{target}}\big). \]
  • Since \(P_{\text{eff}}=P_{03}\otimes P_{12}\) and \(\mathcal{S}_{\text{target}}\) factorizes as above, this becomes
\[ F(p) = \Pr\big(P_{03}\in\{II,XX,YY,ZZ\}\big)\cdot \Pr\big(P_{12}\in\{II,XX,YY,ZZ\}\big). \]
  • Probability for one noisy CNOT to yield a “good” pair:
  • For a two-qubit depolarizing channel with error rate \(p\):
\[ \Pr(P=II) = 1-p,\quad \Pr(P=Q\neq II)=\frac{p}{15}. \]
  • The “good” set is \(\{II,XX,YY,ZZ\}\), which contains \(II\) and 3 specific non-identity Paulis. Hence for one channel,
\[ \Pr(\text{good}) = (1-p) + 3\frac{p}{15} = 1 - \frac{4}{5}p. \]
  • Combine the two independent channels:
\[ F(p) = \left(1-\frac{4}{5}p\right)^2 = 1 - \frac{8}{5}p + \frac{16}{25}p^2. \]
  1. Mathematical Typesetting

All equations are presented above using LaTeX.

  1. Conventions and Units
  • Qubits labeled 0–3; logical qubits A,B; stabilizers and logical operators as provided.
  • Only two-qubit CNOT gates are noisy per the stated depolarizing model; single-qubit H gates are ideal.
  1. Final Answer: F(p) = (1 - 4p/5)^2 = 1 - (8/5)p + (16/25)p^2.
User #3

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
  • Circuit and noise model
  • The only noisy operations are the two CNOTs. Right after each CNOT, a two-qubit depolarizing channel acts on that CNOT’s two qubits:
    • after CNOT21: an error \(P_{12}\) on qubits \((1,2)\),
    • after CNOT03: an error \(P_{03}\) on qubits \((0,3)\).
  • Each error is a Pauli on its two qubits: \(P\in\{II, IX,\dots, ZZ\}\) with
\[ \Pr(P=II)=1-p,\qquad \Pr(P=Q\neq II)=\frac{p}{15}. \]
  • The subsequent ideal gates act on disjoint qubits, so the effective end-of-circuit error is
\[ E = P_{03}\otimes P_{12}, \]
with $P_{03}$ and $P_{12}$ independent.
  • Target logical state and its physical stabilizer
  • The code stabilizers are \(XXXX\) and \(ZZZZ\).
  • For the logical Bell state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\),
\[ X_A X_B = (XIXI)(XXII) = IXXI,\qquad Z_A Z_B = (ZZII)(ZIZI) = IZZI. \]
  • Hence the physical 4-qubit target state is the unique stabilizer state with generators
\[ \langle\, XXXX,\; ZZZZ,\; IXXI,\; IZZI \,\rangle. \]
  • Restricted to the disjoint pairs (0,3) and (1,2), this is exactly the product of two Bell pairs:
\[ \{II,XX,YY,ZZ\}_{03}\ \times\ \{II,XX,YY,ZZ\}_{12}. \]
  • Post-selection condition (detectable vs. undetectable)
  • We post-select on “no detectable error,” i.e., on errors \(E\) that commute with both \(XXXX\) and \(ZZZZ\).
  • For a two-qubit Pauli \(P\) on a pair, define the commutation signatures
\[ s_X(P)=\pm1 \text{ for } [P,XX]=0\text{ or }\{P,XX\}=0,\qquad s_Z(P)=\pm1 \text{ for } [P,ZZ]=0\text{ or }\{P,ZZ\}=0. \]
  • For the full error \(E=P_{03}\otimes P_{12}\), we have
\[ s_X(E)=s_X(P_{03})\,s_X(P_{12}),\qquad s_Z(E)=s_Z(P_{03})\,s_Z(P_{12}). \]
  • Post-selection acceptance requires
\[ s_X(E)=+1,\quad s_Z(E)=+1\quad\Longleftrightarrow\quad s_X(P_{03})=s_X(P_{12})\text{ and } s_Z(P_{03})=s_Z(P_{12}). \]
Thus $P_{03}$ and $P_{12}$ must lie in the same signature class.
  • Classifying two-qubit Paulis by signature
  • The 16 two-qubit Paulis on a pair split into four classes by \((s_X,s_Z)\in\{(+,+),(+,-),(-,+),(-,-)\}\), with exactly 4 Paulis per class.
  • The \((+,+)\) class is \(\{II,XX,YY,ZZ\}\); the other three classes each contain 4 non-identity Paulis.
  • Under the depolarizing model, the per-pair class probabilities are
\[ w_0:=\Pr\big((+,+)\big)=(1-p)+3\frac{p}{15}=1-\frac{4}{5}p, \]
\[ w_2=\Pr\big((-,+)\big)=\frac{4}{15}p,\quad \]
  • Acceptance probability (yield)
  • We accept iff the two independent draws \(P_{03}\) and \(P_{12}\) fall in the same class:
\[ = \left(1-\frac{4}{5}p\right)^2 + 3\left(\frac{4}{15}p\right)^2 \]
  • Logical fidelity conditioned on acceptance
  • Within the accepted set, the final logical 2-qubit state matches the target Bell state iff \(E\) fixes the target physical state, i.e., \(E\) lies in its stabilizer. From above, this requires
\[ P_{03}\in\{II,XX,YY,ZZ\},\quad P_{12}\in\{II,XX,YY,ZZ\}, \]
which occurs with probability $w_0^2 = \left(1-\frac{4}{5}p\right)^2$.
  • Any other accepted error is an undetectable logical Pauli (e.g., \(X_B\), \(Z_A\), or \(Y_A Y_B\) up to stabilizers) that maps the target Bell state to an orthogonal Bell state, yielding zero overlap.
  • Therefore the conditional logical state fidelity is
\[ = \frac{\Pr(E\in \text{stabilizer of target})}{\Pr(\text{accepted})} = \frac{\left(1-\frac{4}{5}p\right)^2}{\left(1-\frac{4}{5}p\right)^2 + 3\left(\frac{4}{15}p\right)^2} \]
  • Small-\(p\) expansion:
\[ F_{\text{logical}}(p)=1-\frac{16}{75}p^2+O(p^3), \]
i.e., all first-order logical errors are detected and discarded.
  1. Mathematical Typesetting

All expressions are typeset in LaTeX above.

  1. Conventions and Units
  • Qubits are labeled 0–3; logical qubits A,B as given.
  • Depolarizing noise only on the two CNOTs; Hadamards are ideal.
  • Post-selection keeps only errors commuting with \(XXXX\) and \(ZZZZ\).
  1. Final Answer: F_logical(p) = [(1 - 4p/5)^2] / [(1 - 4p/5)^2 + 3(4p/15)^2] = [1 - (8/5)p + (16/25)p^2] / [1 - (8/5)p + (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