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

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
  • Start from |0000⟩ on qubits (0,1,2,3). Apply the circuit U = CNOT03 H0 CNOT21 H2 (right-to-left order).
  • H2: |0⟩2 → |+⟩2, so
\[ |\psi_1\rangle=\frac{1}{\sqrt{2}}\,|0\rangle_0|0\rangle_1(|0\rangle_2+|1\rangle_2)|0\rangle_3. \]
  • CNOT21 (control 2, target 1):
\[ |\psi_2\rangle=\frac{1}{\sqrt{2}}\,|0\rangle_0\,(|00\rangle_{1,2}+|11\rangle_{1,2})\,|0\rangle_3. \]
  • H0:
\[ |\psi_3\rangle=\frac{1}{\sqrt{2}}\,|+\rangle_0\,(|00\rangle_{1,2}+|11\rangle_{1,2})\,|0\rangle_3. \]
  • CNOT03 (control 0, target 3):
\[ |\psi_{\text{ideal}}\rangle=\frac{1}{2}\, (|00\rangle_{0,3}+|11\rangle_{0,3})\otimes(|00\rangle_{1,2}+|11\rangle_{1,2}). \]

Thus, the ideal four-qubit state is a product of two Bell states:

\[ |\psi_{\text{ideal}}\rangle=|\Phi^+\rangle_{0,3}\otimes|\Phi^+\rangle_{1,2},\quad |\Phi^+\rangle=\frac{|00\rangle+|11\rangle}{\sqrt{2}}. \]
  • Noise model and its placement
  • Each CNOT is followed by a two-qubit depolarizing channel on its two qubits:
\[ \mathcal{D}_p(\rho)=(1-p)\rho+\frac{p}{15}\sum_{P\in\mathcal{P}_{2}\setminus\{II\}} P\rho P, \]
where $\mathcal{P}_{2}=\{I,X,Y,Z\}^{\otimes 2}$ on that pair.
  • The first channel acts on qubits (2,1) immediately after CNOT21; the remaining gates act only on qubits (0,3), so this noise does not propagate or mix with later gates.
  • The second channel acts on qubits (0,3) after the final CNOT03. Therefore the final state is
\[ \rho_{\text{final}}=\mathcal{D}_p^{(0,3)}\!\big(|\Phi^+\rangle\langle\Phi^+|_{0,3}\big)\;\otimes\;\mathcal{D}_p^{(1,2)}\!\big(|\Phi^+\rangle\langle\Phi^+|_{1,2}\big). \]
  • Fidelity factorizes
  • The physical state fidelity with the ideal pure product state is
\[ \]
where $F_{a,b}=\langle\Phi^+|\mathcal{D}_p^{(a,b)}(|\Phi^+\rangle\langle\Phi^+|)|\Phi^+\rangle$.
  • Since both channels are identical, \(F_{0,3}=F_{1,2}\equiv F_{\text{pair}}\), hence \(F=F_{\text{pair}}^2\).

  • Two-qubit fidelity on a Bell state

  • For \(|\Phi^+\rangle\), the only two-qubit Paulis (modulo phase) that map \(|\Phi^+\rangle\) to \(\pm|\Phi^+\rangle\) are \(\{II,XX,YY,ZZ\}\). All other 12 Paulis map it to orthogonal Bell states.
  • Therefore
\[ F_{\text{pair}}=(1-p)+3\left(\frac{p}{15}\right)=1-p+\frac{p}{5}=1-\frac{4p}{5}. \]
  • Combine the two independent pairs
\[ F(p)=\Big(1-\frac{4p}{5}\Big)^2=1-\frac{8}{5}p+\frac{16}{25}p^2. \]
  1. Mathematical Typesetting
  • See equations above.
  1. Conventions and Units
  • Probabilities are unitless. The depolarizing probability per two-qubit gate is \(p\).
  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 (noise-free) output of the circuit
  • As in Subproblem 1, starting from |0000⟩ and applying H2 → CNOT21 → H0 → CNOT03 gives the pure 4-qubit state
\[ =|\Phi^+\rangle_{0,3}\otimes|\Phi^+\rangle_{1,2},\qquad \]
  • This state lies in the [[4,2,2]] code space (it is +1 for both stabilizers \(S_X=XXXX=(XX)_{03}(XX)_{12}\) and \(S_Z=ZZZZ=(ZZ)_{03}(ZZ)_{12}\)), and encodes the logical Bell state \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\) with logical stabilizers \(X_AX_B=(XX)_{12}\) and \(Z_AZ_B=(ZZ)_{12}\).

  • Noise model and locality

  • Each CNOT is followed by a 2-qubit depolarizing channel on its two qubits:
\[ \mathcal{D}_p(\rho)=(1-p)\rho+\frac{p}{15}\sum_{P\neq II}P\rho P, \]
with $P\in\{I,X,Y,Z\}^{\otimes 2}$ on that pair.
  • The two channels act independently on disjoint pairs: after CNOT21 on (1,2) and after CNOT03 on (0,3). Because the later gates do not couple these pairs, we can treat the final noisy state as
\[ \rho=\mathcal{D}_p^{(0,3)}\!\otimes\,\mathcal{D}_p^{(1,2)}\big(|\psi_{\text{ideal}}\rangle\langle\psi_{\text{ideal}}|\big). \]
  • Bell-pair flip classification
  • For any two-qubit Pauli \(P\) acting on a Bell pair, define the flip vector
\[ v(P)=(\delta_X,\delta_Z)\in\{0,1\}^2, \]
where $\delta_X$ is 1 if $P$ anticommutes with $XX$ on that pair, and $\delta_Z$ is 1 if $P$ anticommutes with $ZZ$ on that pair. Then
- $v=(0,0)$ maps $|\Phi^+\rangle$ to itself,
- $v=(1,0)$ maps $|\Phi^+\rangle\to|\Phi^-\rangle$,
- $v=(0,1)$ maps $|\Phi^+\rangle\to|\Psi^+\rangle$,
- $v=(1,1)$ maps $|\Phi^+\rangle\to|\Psi^-\rangle$.
  • On a given pair, the 16 Paulis partition evenly into four classes by \(v\), with
\[ \#\{P:\,v(P)=v\}=4\quad\text{for each }v, \]
and explicitly $v=(0,0)$ corresponds to $\{II,XX,YY,ZZ\}$; each of the other three classes contains four non-identity operators.
  • Post-selection on the code
  • The code stabilizers are \(S_X=(XX)_{03}(XX)_{12}\) and \(S_Z=(ZZ)_{03}(ZZ)_{12}\). After applying Pauli errors \(P_{03}\) on (0,3) and \(Q_{12}\) on (1,2), the total eigenvalue flips of \(S_X\) and \(S_Z\) are given by
\[ v(P_{03}\otimes Q_{12})=v(P_{03})\oplus v(Q_{12}). \]
  • Post-selecting on “no detected error” means we keep only those terms with \(v(P_{03})=v(Q_{12})\) (so the net flips of \(S_X,S_Z\) are zero).

  • Weights per class

  • For a single depolarizing channel on one pair:
    • The identity has weight \(w(I)=1-p\).
    • Each non-identity has weight \(w_{\neq I}=p/15\).
  • Hence the total weight in each class on one pair is
\[ \]
  • Acceptance probability and conditional distribution
  • Acceptance requires the two pairs have the same class \(v\), so the total accepted weight is
\[ =\Big(1-\frac{4p}{5}\Big)^2+3\Big(\frac{4p}{15}\Big)^2 \]
  • Logical fidelity conditioned on acceptance
  • The encoded Bell state is stabilized by the logical operators \(X_AX_B\) and \(Z_AZ_B\), whose physical representatives can be taken as \((XX)_{12}\) and \((ZZ)_{12}\). Therefore the logical state remains the target \((|00\rangle_{AB}+|11\rangle_{AB})/\sqrt{2}\) if and only if the (1,2) pair stays in \(|\Phi^+\rangle\), i.e., \(v(Q_{12})=(0,0)\).
  • Because acceptance also requires \(v(P_{03})=v(Q_{12})\), the accepted events that preserve the logical state are exactly those with \(v=(0,0)\) on both pairs. Their total weight is \(W_{00}^2\).
  • Thus the logical state fidelity after post-selection is
\[ \]
  • Closed forms and small-p expansion
  • Simplifying,
\[ \]
  • For small \(p\),
\[ F_L(p)=1-\frac{16}{75}\,p^2+O(p^3), \]
i.e., logical infidelity is second order in $p$ under post-selection.
  1. Mathematical Typesetting
  • See equations above.
  1. Conventions and Units
  • Probabilities are unitless; \(p\) is the two-qubit depolarizing probability per CNOT.
  1. Final Answer:
\[ \]
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)  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical