Checkpoint-3

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

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 state prepared by the circuit
  • Start with |0000⟩ on qubits (0,1,2,3).
  • Apply H2 then CNOT21: this prepares a Bell pair on qubits (2,1),
\[ |\Phi^+\rangle_{21}=\frac{|00\rangle_{21}+|11\rangle_{21}}{\sqrt{2}}, \]
so the state is |Φ+⟩21 ⊗ |00⟩03.
  • Apply H0 then CNOT03: this prepares a Bell pair on qubits (0,3),
\[ |\Phi^+\rangle_{03}=\frac{|00\rangle_{03}+|11\rangle_{03}}{\sqrt{2}}, \]
so the final ideal state is
\[ |\psi_{\mathrm{ideal}}\rangle=|\Phi^+\rangle_{21}\otimes|\Phi^+\rangle_{03}. \]
  • Stabilizers of the ideal state
  • Each Bell state |Φ+⟩ab is stabilized by X_a X_b and Z_a Z_b. Hence
\[ \mathcal{S}=\langle X_2 X_1,\; Z_2 Z_1,\; X_0 X_3,\; Z_0 Z_3\rangle. \]
  • Noise model and factorization
  • After CNOT21, a two-qubit depolarizing channel acts on qubits (2,1): with probability 1−p apply I, and with probability p/15 apply each of the 15 non-identity two-qubit Paulis.
  • After CNOT03, an independent depolarizing channel acts on qubits (0,3).
  • The subsequent gates after the first noise (H0 and CNOT03) act only on qubits (0,3), disjoint from (2,1). Therefore the error inserted after CNOT21 does not propagate or change; the total error at the end is simply
\[ E_{\mathrm{tot}}=E_{21}\otimes E_{03}, \]
where E21 acts on (2,1) and E03 acts on (0,3), independently.
  • Fidelity for one Bell pair under a two-qubit depolarizing channel
  • For a stabilizer state |s⟩ and a Pauli channel, the state fidelity is the total probability that the applied Pauli lies in the stabilizer (up to a global phase):
\[ F_{\text{pair}}(p)=\sum_E \Pr(E)\,|\langle \Phi^+|E|\Phi^+\rangle|^2. \]
  • The stabilizer of |Φ+⟩ contains (ignoring global phases) {II, XX, YY, ZZ}. Thus among the 15 non-identity two-qubit Paulis, exactly 3 (XX, YY, ZZ) keep |Φ+⟩ invariant up to a phase.
  • Therefore,
\[ F_{\text{pair}}(p)=(1-p)+\frac{3}{15}p=1-\frac{4}{5}p. \]
  • Total 4-qubit fidelity
  • Since the two error channels act independently on the two disjoint Bell pairs, the total fidelity factorizes:
\[ F_{\text{phys}}(p)=\big(F_{\text{pair}}(p)\big)^2=\left(1-\frac{4}{5}p\right)^2. \]
  1. Mathematical Typesetting

All equations are given above in LaTeX.

  1. Conventions and Units
  • We used the stated two-qubit depolarizing channel: identity with probability 1−p, each non-identity two-qubit Pauli with probability p/15.
  • Single-qubit gates are noiseless.
  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 prepared by the circuit
  • As in Subproblem 1, the circuit
\[ (CNOT_{03})(H_0)(CNOT_{21})(H_2) \]
acting on |0000⟩ prepares
\[ |\psi_{\mathrm{ideal}}\rangle=|\Phi^+\rangle_{21}\otimes|\Phi^+\rangle_{03}, \]
where $|\Phi^+\rangle=(|00\rangle+|11\rangle)/\sqrt{2}$.
  • Post-selection on the [[4,2,2]] code
  • Stabilizers: \(S=\langle XXXX,\; ZZZZ\rangle\).
  • We post-select on runs with \(+1\) outcomes for both stabilizers (i.e., the error \(E\) must commute with both \(XXXX\) and \(ZZZZ\)).

  • Error model and independence across the two pairs

  • Two independent two-qubit depolarizing channels act:
    • After \(CNOT_{21}\) on qubits (2,1): error \(E_{21}\).
    • After \(CNOT_{03}\) on qubits (0,3): error \(E_{03}\).
  • No subsequent gates couple (2,1) to (0,3), so the total error is \(E=E_{21}\otimes E_{03}\).

  • Parity-classification of two-qubit Paulis on a pair

  • For a two-qubit Pauli \(P\in\{I,X,Y,Z\}^{\otimes 2}\) on a pair, define syndrome parities
\[ s_Z(P)=\#\{X,Y\}\bmod 2,\qquad s_X(P)=\#\{Z,Y\}\bmod 2, \]
i.e., whether $P$ anticommutes with $ZZ$ and $XX$, respectively.
  • This partitions the 16 Paulis on a pair into 4 classes labeled by \((s_Z,s_X)\):

    • \((0,0):\{II,XX,YY,ZZ\}\)
    • \((1,0):\{XI,IX,YZ,ZY\}\)
    • \((0,1):\{ZI,IZ,XY,YX\}\)
    • \((1,1):\{YI,IY,XZ,ZX\}\)
  • Acceptance (post-selection) condition

  • For \(E=E_{21}\otimes E_{03}\), the stabilizer outcomes are
\[ ZZZZ:\ (-1)^{s_Z(E_{21})\oplus s_Z(E_{03})},\qquad XXXX:\ (-1)^{s_X(E_{21})\oplus s_X(E_{03})}. \]
  • Accepted iff \(s_Z(E_{21})=s_Z(E_{03})\) and \(s_X(E_{21})=s_X(E_{03})\), i.e., both pair errors lie in the same parity class.

  • One-pair class probabilities under the two-qubit depolarizing channel

  • For one pair:
    • \(P(II)=1-p\),
    • each of the 15 non-identity Paulis has probability \(p/15\).
  • Therefore the probability a pair lands in each class is
\[ P_{00}=1-p+3\frac{p}{15}=1-\frac{12}{15}p,\qquad P_{10}=P_{01}=P_{11}=4\frac{p}{15}. \]
  • Accepted-event statistics and logical mapping
  • Because the two pair errors are independent, the probability to accept is
\[ P_{\mathrm{acc}}=\sum_{b\in\{00,10,01,11\}} P_b^2 =\left(1-\frac{12}{15}p\right)^2+3\left(\frac{4}{15}p\right)^2. \]
  • Conditioned on acceptance, both pairs are in the same Bell label \(b\). The resulting logical two-qubit state (on \(A,B\)) equals the logical Bell state with the same label \(b\):
    • \(b=00\ \Rightarrow\ |{\Phi^+}\rangle_{AB}\),
    • \(b=10\ \Rightarrow\ |{\Psi^+}\rangle_{AB}\),
    • \(b=01\ \Rightarrow\ |{\Phi^-}\rangle_{AB}\),
    • \(b=11\ \Rightarrow\ |{\Psi^-}\rangle_{AB}\), since \(X_AX_B=IXXI\) and \(Z_AZ_B=IZZI\) act as \(XX\) and \(ZZ\) on qubits (1,2).
  • Hence the logical state fidelity with the target \(|{\Phi^+}\rangle_{AB}\), conditioned on acceptance, is the conditional probability of \(b=00\):
\[ F_{\mathrm{logical}}(p) =\frac{P_{00}^2}{\sum_b P_b^2} =\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}. \]
  • Optional simplification
\[ F_{\mathrm{logical}}(p)=\frac{1-\frac{8}{5}p+\frac{16}{25}p^2}{1-\frac{8}{5}p+\frac{64}{75}p^2} =1-\frac{16}{75}p^2+O(p^3). \]
  1. Mathematical Typesetting

All expressions have been written in LaTeX above.

  1. Conventions and Units
  • Two-qubit depolarizing channel after each CNOT: identity with probability \(1-p\), and each non-identity two-qubit Pauli with probability \(p/15\).
  • Single-qubit gates are ideal; post-selection keeps only \(+1\) outcomes of both stabilizers \(XXXX\) and \(ZZZZ\).
  1. Final Answer: \(F_{\mathrm{logical}}(p)=\dfrac{\left(1-\frac{12}{15}p\right)^2}{\left(1-\frac{12}{15}p\right)^2+3\left(\frac{4}{15}p\right)^2}=\dfrac{1-\frac{8}{5}p+\frac{16}{25}p^2}{1-\frac{8}{5}p+\frac{64}{75}p^2}\,.\)
User #5

The correct answer is: $ F_{\rm{logical}}=1 - \frac{\frac{16}{75}p^2}{1-\frac{8}{5}p + \frac{64}{75}p^2} $

Now let’s solve the next Checkpoint.

Checkpoint 3

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 #6
  1. Step-by-Step Derivation
  • Target and circuit
  • The circuit
\[ M_4\,(CNOT_{04})\,(CNOT_{34})\,(CNOT_{23})\,(CNOT_{10})\,(CNOT_{12})\,(H_1) \]
prepares the 4-qubit cat state
$
(|0000\rangle+|1111\rangle)/\sqrt{2}
$
on data qubits 0,1,2,3 (a +1 eigenstate of $XXXX$ and $ZZZZ$), which is the logical $|00\rangle_{AB}$ for the [[4,2,2]] code (since $Z_A=ZZII$ and $Z_B=ZIZI$ both have eigenvalue +1 on this state). The two final CNOTs with ancilla 4 measure the parity $Z_0Z_3$ (accept $M_4=0$). We then post-select on $XXXX=+1$, $ZZZZ=+1$, and ancilla $M_4=0$.
  • Noise model and reduction to Pauli propagation
  • Each CNOT is followed by a two-qubit depolarizing channel: with probability \(1-p\) do \(II\) and with probability \(p/15\) apply one of the 15 non-identity two-qubit Paulis uniformly.
  • There are 5 noisy CNOTs; to leading non-zero order we need at most two faults (\(O(p^2)\)). Any single fault is either detected by the stabilizers or the ancilla parity, or (if undetected) it is a pure logical \(Z\) on \(A\) and/or \(B\), which does not change \(|00\rangle_{AB}\). Hence the logical infidelity starts at \(O(p^2)\).

  • Signature vector for a propagated Pauli

  • Push each Pauli error to the end of the circuit using CNOT conjugation rules. For the final (data+ancilla) Pauli \(P'\), define the binary signature
\[ v(P')=(s_Z,s_X,a,x_A,x_B)\in\{0,1\}^5 \]
where
- $s_Z=1$ iff $P'$ anticommutes with $ZZZZ$ (equivalently, $P'$ has an odd number of $X/Y$ on data),
- $s_X=1$ iff $P'$ anticommutes with $XXXX$ (odd number of $Z/Y$ on data),
- $a=1$ iff $P'$ has $X/Y$ on ancilla 4 (flips the measured $M_4$ bit),
- $x_A=1$ iff $P'$ anticommutes with $Z_A=ZZII$ (odd number of $X/Y$ on data qubits 0 or 1),
- $x_B=1$ iff $P'$ anticommutes with $Z_B=ZIZI$ (odd number of $X/Y$ on data qubits 0 or 2).
  • Post-selection (accept) requires \(s_Z=0\), \(s_X=0\), and \(a=0\) for the total error. A logical bit-flip error occurs iff \((x_A,x_B)\neq(0,0)\).

  • Basis-signatures after each noisy gate

  • Let the five noisy CNOTs (in time order) be labeled by their control→target pairs: 1) \((1\to 2)\), 2) \((1\to 0)\), 3) \((2\to 3)\), 4) \((3\to 4)\), 5) \((0\to 4)\).
  • For each gate location ℓ, and for each of the two qubits \(q\) of that gate, compute \(v(X_q)\) and \(v(Z_q)\) after propagation through all subsequent gates:
    • After \((1\to 2)\):
    • \(v(X_1)=v(X_2)=(0,0,1,0,1)\), \(v(Z_1)=v(Z_2)=(0,1,0,0,0)\).
    • After \((1\to 0)\):
    • \(v(X_1)=(1,0,0,1,0)\), \(v(Z_1)=(0,1,0,0,0)\),
    • \(v(X_0)=(1,0,1,1,1)\), \(v(Z_0)=(0,1,0,0,0)\).
    • After \((2\to 3)\):
    • \(v(X_2)=(1,0,0,0,1)\), \(v(Z_2)=(0,1,0,0,0)\),
    • \(v(X_3)=(1,0,1,0,0)\), \(v(Z_3)=(0,1,0,0,0)\).
    • After \((3\to 4)\):
    • \(v(X_3)=(1,0,0,0,0)\), \(v(Z_3)=(0,1,0,0,0)\),
    • \(v(X_4)=(0,0,1,0,0)\), \(v(Z_4)=(0,1,0,0,0)\).
    • After \((0\to 4)\):
    • \(v(X_0)=(1,0,0,1,1)\), \(v(Z_0)=(0,1,0,0,0)\),
    • \(v(X_4)=(0,0,1,0,0)\), \(v(Z_4)=(0,0,0,0,0)\).
  • A two-qubit Pauli at a location is a product of single-qubit \(X\) and \(Z\) factors on the two qubits; its signature is the XOR-sum of the corresponding single-qubit signatures (and \(Y\) contributes both \(X\) and \(Z\)).

  • Classifying errors by the accept-triplet and the logical-X label

  • For each location ℓ and each non-identity two-qubit Pauli there is a triplet \(t=(s_Z,s_X,a)\) and a logical-\(X\) label \(x=(x_A,x_B)\).
  • Let \(N_\ell(t)\) be the count of non-identity two-qubit Paulis at location ℓ with accept-triplet \(t\), and let \(x_\ell(t)\) be the associated (deterministic) logical-\(X\) label for that \(t\). From the signatures above, one finds:

    • After \((1\to 2)\): only \(s_Z=0\) appears. Counts are \(N(0,0,0)=3\), \(N(0,0,1)=4\), \(N(0,1,0)=4\), \(N(0,1,1)=4\), with \(x=(0,\text{anc})\), i.e. \(x=(0,0)\) if \(a=0\) and \(x=(0,1)\) if \(a=1\).
    • After \((1\to 0)\): for all \(t\), \(N(t)=2\) except \(N(0,0,0)=1\), and \(x=(s_Z,\;a)\).
    • After \((2\to 3)\): for all \(t\), \(N(t)=2\) except \(N(0,0,0)=1\), and \(x=(0,\;s_Z\oplus a)\).
    • After \((3\to 4)\): for all \(t\), \(N(t)=2\) except \(N(0,0,0)=1\), and \(x=(0,0)\).
    • After \((0\to 4)\): for all \(t\), \(N(t)=2\) except \(N(0,0,0)=1\), and \(x=(s_Z,\;s_Z)\).
  • Two-fault contribution and “malignant” pairs

  • With two faults at locations \(\ell<\ell'\), acceptance requires the two triplets to match: \(t_\ell=t_{\ell'}\equiv t\). The logical-\(X\) accumulated is \(x_\ell(t)\oplus x_{\ell'}(t)\).
  • For a fixed triplet \(t\), among the \(N_\ell(t)\,N_{\ell'}(t)\) accepted pairs, those that are harmless are exactly the ones with \(x_\ell(t)=x_{\ell'}(t)\). Therefore, the number of harmful accepted pairs from that \(t\) is
\[ H_{\ell,\ell'}(t)= \begin{cases} N_\ell(t)\,N_{\ell'}(t), & x_\ell(t)\neq x_{\ell'}(t),\\[2pt] 0, & x_\ell(t)=x_{\ell'}(t). \end{cases} \]
  • Summing \(H_{\ell,\ell'}(t)\) over triplets \(t\) and over unordered location pairs \((\ell,\ell')\) gives the total number of accepted, harmful two-fault Pauli pairs. Evaluating with the \(N_\ell(t)\) and \(x_\ell(t)\) above yields for the 10 unordered pairs:

    • \((1\!\to\!2,\,1\!\to\!0)\): 0, (1→2, 2→3): 0,
    • (1→2, 3→4): 16, (1→2, 0→4): 16,
    • (1→0, 2→3): 16, (1→0, 3→4): 24, (1→0, 0→4): 16,
    • (2→3, 3→4): 16, (2→3, 0→4): 24,
    • (3→4, 0→4): 16. Summing gives a total of 144 accepted, harmful pairs out of \(15^2=225\) Pauli-pair choices per location pair.
  • Logical infidelity to second order

  • The probability that two specified locations are faulty and the other three are not is \(p^2+O(p^3)\). Given those two faults, the (conditional) probability of an accepted harmful pair is \(N_{\ell,\ell'}/15^2\).
  • Summing over the 10 unordered location pairs, the \(O(p^2)\) contribution to the accepted logical error probability is
\[ P_{\mathrm{log\;err}}=p^2\,\sum_{\ell<\ell'}\frac{N_{\ell,\ell'}}{15^2}+O(p^3) =\frac{144}{225}\,p^2+O(p^3)=\frac{16}{25}\,p^2+O(p^3). \]
  • The post-selection acceptance probability satisfies \(P_{\mathrm{acc}}=1+O(p)\) (single undetected faults are purely logical \(Z\)’s and do not reduce fidelity), so dividing by \(P_{\mathrm{acc}}\) does not change the \(p^2\) coefficient. Hence the logical state fidelity is
\[ F_{\mathrm{logical}}(p)=1-P_{\mathrm{log\;err}}=1-\frac{16}{25}\,p^2+O(p^3). \]
  1. Mathematical Typesetting
  • All steps use Pauli propagation through CNOT and parity (anticommutation) bookkeeping in LaTeX as above.
  1. Conventions and Units
  • Two-qubit depolarizing channel after each CNOT: identity with probability \(1-p\); each non-identity two-qubit Pauli with probability \(p/15\).
  • Single-qubit \(H\) and the measurement \(M_4\) are ideal.
  • Post-selection on \(XXXX=+1\), \(ZZZZ=+1\), and ancilla outcome \(0\).
  1. Final Answer: \(F_{\mathrm{logical}}(p)=1-\dfrac{16}{25}\,p^2+O(p^3)\,.\)
User #7

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 #8
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  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical