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 state prepared by the circuit:
  • Starting from |0000⟩, the sequence (right-to-left) H₂ → CNOT₂₁ prepares a Bell state on qubits (2,1): |Φ⁺⟩₂₁ = (|00⟩ + |11⟩)/√2.
  • Then H₀ → CNOT₀₃ prepares a Bell state on qubits (0,3): |Φ⁺⟩₀₃.
  • Hence the ideal final 4-qubit state factorizes:
\[ |\psi_{\text{ideal}}\rangle = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{21}. \]
  • Noise model:
  • After each CNOT, a two-qubit depolarizing channel acts on the same pair:
\[ \mathcal{E}_p(\rho) = (1-p)\rho + \frac{p}{15}\sum_{P\in\mathcal{P}_2\setminus\{II\}} P \rho P, \]
where the sum is over the 15 non-identity two-qubit Paulis.
  • The two channels act independently on disjoint pairs (0,3) and (2,1). Since the ideal state is a product state across these pairs, the final state factorizes:
\[ \rho_{\text{out}} = \rho_{03} \otimes \rho_{21}, \qquad \rho_{\text{pair}} = \mathcal{E}_p\!\left(|\Phi^+\rangle\langle\Phi^+|\right). \]
  • Single-pair fidelity under the depolarizing channel:
  • For the Bell state |Φ⁺⟩, the only nonzero Pauli expectations are
\[ \langle \Phi^+|XX|\Phi^+\rangle = 1,\quad \langle \Phi^+|ZZ|\Phi^+\rangle = 1,\quad \langle \Phi^+|YY|\Phi^+\rangle = -1, \]
and all other two-qubit Paulis have zero expectation.
  • Thus, for a Pauli error P applied to |Φ⁺⟩, the overlap squared is
\[ \begin{cases} 1, & P \in \{II,\, XX,\, YY,\, ZZ\},\\ 0, & \text{otherwise}. \]
  • The single-pair fidelity is therefore
\[ = (1-p)\cdot 1 + \frac{p}{15}\cdot(1+1+1) \]
  • Total 4-qubit fidelity:
  • Because the two pairs are independent and the ideal state factorizes,
\[ = \big(F_{\text{pair}}\big)^2 \]
  1. Mathematical Typesetting

Already used above.

  1. Conventions and Units
  • No unit conventions are needed. The depolarizing probability is p per two-qubit gate.
  1. Final Answer:
\[ F_{\text{phys}}(p) = \left(1 - \frac{4p}{5}\right)^2 = 1 - \frac{8}{5}p + \frac{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 (noiseless) state prepared by the circuit:
  • As in Subproblem 1, the sequence prepares a Bell pair on qubits (2,1) and a Bell pair on qubits (0,3):
\[ |\psi_{\mathrm{ideal}}\rangle = |\Phi^+\rangle_{03}\otimes|\Phi^+\rangle_{21},\qquad |\Phi^+\rangle=\frac{|00\rangle+|11\rangle}{\sqrt2}. \]
  • This state lies in the code space (it is +1 for both \(XXXX\) and \(ZZZZ\)) and encodes the logical Bell state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt2\).

  • Noise model and factorization:

  • After each CNOT, a two-qubit depolarizing channel acts on the same pair:
\[ \mathcal{E}_p(\rho)=(1-p)\rho+\frac{p}{15}\sum_{P\in\mathcal{P}_2\setminus\{II\}}P\rho P. \]
  • The two noisy gates act on disjoint pairs (03) and (21), and there are no subsequent gates touching those pairs. Hence the final state is
\[ \rho_{\mathrm{out}} = ( \mathcal{E}_p(|\Phi^+\rangle\langle\Phi^+|) )_{03} \otimes ( \mathcal{E}_p(|\Phi^+\rangle\langle\Phi^+|) )_{21}. \]
  • Classifying Pauli errors on a Bell pair:
  • For a two-qubit Pauli \(P\) acting on one Bell pair, define the flip parities with respect to the pair stabilizers \(ZZ\) and \(XX\):
    • \(f_Z(P)=1\) iff \(P\) anticommutes with \(ZZ\) on that pair (i.e., an odd number of \(X\) or \(Y\) occur on the two qubits), else \(0\).
    • \(f_X(P)=1\) iff \(P\) anticommutes with \(XX\) on that pair (i.e., an odd number of \(Y\) or \(Z\) occur), else \(0\).
  • Acting on \(|\Phi^+\rangle\), the pair transitions as:
    • \((f_Z,f_X)=(0,0)\Rightarrow |\Phi^+\rangle\) (possibly a global phase),
    • \((0,1)\Rightarrow |\Phi^-\rangle\),
    • (1,0) ⇒ \(|\Psi^+\rangle\),
    • (1,1) ⇒ \(|\Psi^-\rangle\).
  • Among the 16 two-qubit Paulis, each of the four flip types occurs exactly 4 times (Klein-four structure under bitwise XOR of \((f_Z,f_X)\)). Therefore, under the depolarizing channel on one pair,
\[ r_{00} &:= \Pr[(f_Z,f_X)=(0,0)] = (1-p) + 3\frac{p}{15} = 1-\frac{4p}{5},\\ r_{01} = r_{10} = r_{11} &= \frac{4}{15}p. \]
  • Post-selection (error detection) using the [[4,2,2]] stabilizers:
  • The global stabilizers are \(S_X=XXXX\) and \(S_Z=ZZZZ\). Since the ideal state factorizes and \(S_X=XX_{03}\,XX_{21}\), \(S_Z=ZZ_{03}\,ZZ_{21}\) (up to qubit ordering), their eigenvalues after errors are the products of the pair eigenvalues.
  • Let \((f_Z^{03},f_X^{03})\) and \((f_Z^{21},f_X^{21})\) be the flip bits produced on the two pairs. The post-selection keeps runs with \(S_X=+1\) and \(S_Z=+1\), which is equivalent to:
\[ f_Z^{03}\oplus f_Z^{21}=0,\qquad f_X^{03}\oplus f_X^{21}=0, \]
i.e., the flip vectors must match: $(f_Z^{03},f_X^{03})=(f_Z^{21},f_X^{21})$.
  • Acceptance probability:
  • By independence of the two pairs,
\[ = r_{00}^2 + r_{01}^2 + r_{10}^2 + r_{11}^2 \]
  • Logical state after post-selection and its fidelity:
  • Conditional on acceptance, the two pairs end in the same Bell state, so the physical state remains in the code space and equals one of the four orthonormal encoded Bell states:
\[ |\Phi^-\rangle_{03}\otimes|\Phi^-\rangle_{21},\; |\Psi^+\rangle_{03}\otimes|\Psi^+\rangle_{21},\; \]
  • These correspond to mutually orthogonal logical states. Therefore, the logical fidelity with the target logical GHZ (encoded \(|\Phi^+\rangle_{AB}\)) equals the conditional probability that both pairs have \((f_Z,f_X)=(0,0)\):
\[ \]
  • Small-\(p\) expansion:
\[ F_{\mathrm{log}}(p) = 1 - \frac{16}{75}p^2 + O(p^3), \]

showing that all first-order (single-gate) error contributions are detected and discarded.

  1. Mathematical Typesetting
  • Used throughout.
  1. Conventions and Units
  • Probability \(p\) is the error probability per two-qubit gate; errors act only after CNOTs.
  1. Final Answer:
\[ = \frac{1 - \frac{8}{5}p + \frac{16}{25}p^2}{1 - \frac{8}{5}p + \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