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
  • Ideal output state of the circuit
  • Start from the initial state |0000⟩ on qubits (0,1,2,3).
  • Apply H2: qubit 2 becomes (|0⟩+|1⟩)/√2.
  • Apply CNOT21 (control 2 → target 1): this prepares a Bell pair on qubits (2,1), i.e.,
\[ |\Phi^+\rangle_{21}=\frac{|00\rangle_{21}+|11\rangle_{21}}{\sqrt{2}}. \]
The state is now |0⟩0 āŠ— |Φ+⟩21 āŠ— |0⟩3.
  • Apply H0: qubit 0 becomes (|0⟩+|1⟩)/√2.
  • Apply CNOT03 (control 0 → target 3): this prepares a Bell pair on qubits (0,3),
\[ |\Phi^+\rangle_{03}=\frac{|00\rangle_{03}+|11\rangle_{03}}{\sqrt{2}}. \]
  • Hence the ideal final state is the product of two Bell pairs:
\[ |\psi_{\mathrm{id}}\rangle = |\Phi^+\rangle_{03}\otimes|\Phi^+\rangle_{21}. \]
  • Stabilizer of the ideal state
  • A Bell pair |Φ+⟩ on a qubit pair (i,j) is stabilized by
\[ \{II,\ X_iX_j,\ Z_iZ_j,\ Y_iY_j\}. \]
  • Therefore,
\[ \]
and the stabilizer of the full state is the tensor product
\[ \mathcal{S}=\mathcal{S}_{03}\otimes\mathcal{S}_{21}. \]
  • Error model and where errors act
  • After CNOT21, a two-qubit depolarizing error acts on qubits (2,1): with probability 1āˆ’p it is identity II, and with probability p it is uniformly one of the 15 non-identity two-qubit Paulis on (2,1).
  • After CNOT03, independently, an analogous two-qubit depolarizing error acts on qubits (0,3).
  • The intermediate H0 and the last CNOT act on qubits disjoint from the first error, so the first error remains confined to (2,1); the second error is applied at the very end on (0,3). Thus the final error is
\[ E = E_{21}\otimes E_{03}, \]
with E21 and E03 independent.
  • Fidelity for a stabilizer state under Pauli errors
  • For a stabilizer state |ψ⟩, and a Pauli E, one has
\[ \begin{cases} 1, & E\in \mathcal{S} \\ 0, & E\notin \mathcal{S} \]
  • Hence the state fidelity equals the probability that the net error E lies in the stabilizer:
\[ F = \Pr[E\in\mathcal{S}] = \Pr[E_{21}\in\mathcal{S}_{21}]\ \Pr[E_{03}\in\mathcal{S}_{03}], \]
using independence and the factorized stabilizer.
  • Single-pair survival probability
  • For a single pair (say, 2,1), the error is in the pair stabilizer if it is:
    • II (probability 1āˆ’p), or
    • one of {XX, ZZ, YY} (3 favorable among 15 non-identity Paulis), with probability pā‹…(3/15).
  • Therefore, for either pair,
\[ s(p) = (1-p) + p\,\frac{3}{15} = 1 - \frac{4}{5}p. \]
  • Total fidelity
  • Since the two pairs are independent,
\[ F(p) = [s(p)]^2 = \left(1 - \frac{4}{5}p\right)^2. \]
  1. Mathematical Typesetting

All key steps and equations are expressed above in LaTeX.

  1. Conventions and Units

Not applicable.

  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
  • Ideal encoded target and its stabilizer
  • The circuit prepares the 4-qubit physical stabilizer state
\[ \]
  • This state is stabilized by
\[ \{XXXX,\ ZZZZ,\ IXXI,\ IZZI\}, \]
where the two logical Bell stabilizers are
\[ X_A X_B = IXXI,\qquad Z_A Z_B = IZZI. \]
  • Error model and placement
  • A two-qubit depolarizing error is applied after CNOT21 on qubits (2,1) and after CNOT03 on qubits (0,3). Denote these by independent Paulis
\[ E = E_{03}\otimes E_{21}. \]
  • Each \(E_{ij}\) equals \(II\) with probability \(1-p\), and otherwise is one of the 15 non-identity two-qubit Paulis with probability \(p/15\) each.

  • Post-selection (error detection) criterion

  • We post-select on being in the code space, i.e., only keep runs where \(E\) commutes with both code stabilizers \(XXXX\) and \(ZZZZ\).
  • Note that \(XXXX = X_{03}\otimes X_{21}\) and \(ZZZZ = Z_{03}\otimes Z_{21}\), where e.g. \(X_{03}=X_0X_3\).
  • For a two-qubit Pauli \(P\) on a pair, define the parity bits
    • \(a(P) =\) parity of the number of \(\{Z,Y\}\) in \(P\) (determines commutation with \(X_{\,\text{pair}}\)),
    • \(b(P) =\) parity of the number of \(\{X,Y\}\) in \(P\) (determines commutation with \(Z_{\,\text{pair}}\)).
  • Then \(E\) commutes with \(XXXX\) and \(ZZZZ\) iff the pairwise parity classes match:
\[ (a(E_{03}),\,b(E_{03})) = (a(E_{21}),\,b(E_{21})). \]
  • Distribution over the four parity classes on a pair
  • The four classes on a given pair are \((a,b)\in\{(0,0),(0,1),(1,0),(1,1)\}\), each containing 4 Paulis.
  • Class \((0,0)\) is exactly the Bell-pair stabilizer on that pair: \(\{II,XX,ZZ,YY\}\).
  • Hence for a given pair,
\[ s_0 := \Pr[(a,b)=(0,0)] = (1-p) + 3\frac{p}{15} = 1-\frac{4p}{5}, \]
\[ s_1 = s_2 = s_3 := \Pr[(a,b)\in\{(0,1),(1,0),(1,1)\}] = 4\frac{p}{15} = \frac{4p}{15}. \]
  • Acceptance probability (no detected error)
  • We accept iff the two pairs are in the same class, therefore \begin{align} P_{\mathrm{acc}} &= s_0^2 + s_1^2 + s_2^2 + s_3^2 \ &= \left(1-\frac{4p}{5}\right)^2 + 3\left(\frac{4p}{15}\right)^2 = 1 - \frac{8}{5}p + \frac{64}{75}p^2. \end{align}

  • Logical state fidelity conditioned on acceptance

  • Conditioned on acceptance, the final (logical) state equals \(E|\psi_{\mathrm{id}}\rangle\), with \(E\) in the code normalizer.
  • The target logical Bell state \(|\psi_{\mathrm{id}}\rangle\) has stabilizer generated by \(\{XXXX,ZZZZ,IXXI,IZZI\}\). Therefore, the fidelity equals the probability (conditioned on acceptance) that \(E\) lies in this full stabilizer group.
  • This happens iff both pairs are in class \((0,0)\), i.e.
\[ P_{\mathrm{good}} = s_0^2 = \left(1-\frac{4p}{5}\right)^2. \]
  • The other accepted classes correspond to nontrivial logical Paulis that flip at least one of \(IXXI\) or \(IZZI\), mapping \(|\Phi^+\rangle_{AB}\) to an orthogonal Bell state (hence zero overlap).
  • Therefore, the logical fidelity is \begin{align} F_{\mathrm{log}}(p) &= \frac{P_{\mathrm{good}}}{P_{\mathrm{acc}}} = \frac{\left(1-\frac{4p}{5}\right)^2}{\left(1-\frac{4p}{5}\right)^2 + 3\left(\frac{4p}{15}\right)^2} \ &= \frac{1 - \frac{8}{5}p + \frac{16}{25}p^2}{1 - \frac{8}{5}p + \frac{64}{75}p^2} = \frac{75 - 120p + 48p^2}{75 - 120p + 64p^2}. \end{align}
  • Small-\(p\) expansion: \(F_{\mathrm{log}}(p) = 1 - \frac{16}{75}p^2 + O(p^3)\).
  1. Mathematical Typesetting

All equations are provided in LaTeX above.

  1. Conventions and Units

Not applicable.

  1. Final Answer: F_log(p) = [(1 āˆ’ 4p/5)^2] / [(1 āˆ’ 4p/5)^2 + 3(4p/15)^2] = (75 āˆ’ 120p + 48p^2)/(75 āˆ’ 120p + 64p^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 = (75 - 120*p + 48*p**2) / (75 - 120*p + 64*p**2)
    # ---------------------------------------------------------------

    return F_logical