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 state prepared by the circuit:
  • Apply H2 then CNOT21: this prepares a Bell state on qubits (2,1),
\[ |\Phi^+\rangle_{21} = \frac{|00\rangle_{21} + |11\rangle_{21}}{\sqrt{2}}. \]
  • Apply H0 then CNOT03: this prepares a Bell state on qubits (0,3),
\[ |\Phi^+\rangle_{03} = \frac{|00\rangle_{03} + |11\rangle_{03}}{\sqrt{2}}. \]
  • Therefore the ideal final 4-qubit state is a product of Bell pairs
\[ |\psi_{\text{ideal}}\rangle = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{21}. \]
Equivalently, it is the unique +1 eigenstate of the commuting generators
\[ \{XXXX,\; ZZZZ,\; IXXI,\; IZZI\}, \]
i.e., the [[4,2,2]] code stabilizers plus logical GHZ stabilizers.
  • Noise model and factorization:
  • After CNOT21, a two-qubit depolarizing channel acts on qubits (2,1):
\[ \mathcal{E}_{21}(\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 on that pair.
  • After CNOT03, an identical channel acts on qubits (0,3), independently:
\[ \mathcal{E}_{03}(\rho) = (1-p)\rho + \frac{p}{15}\sum_{Q\in\mathcal{P}_2\setminus\{II\}} Q\rho Q. \]
  • Because the remaining gates after each CNOT act on disjoint qubits, each channel is effectively applied at the end, and the total channel factors:
\[ \rho_{\text{final}} = \big(\mathcal{E}_{03}\otimes \mathcal{E}_{21}\big)\big(|\psi_{\text{ideal}}\rangle\langle\psi_{\text{ideal}}|\big). \]
  • Since the target state is a product and the channel factors across the two pairs, the physical state fidelity factorizes:
\[ \]
where
\[ F_{\Phi^+}(p) = \langle\Phi^+|\mathcal{E}(|\Phi^+\rangle\langle\Phi^+|)|\Phi^+\rangle \]
is the single-pair (two-qubit) fidelity under the depolarizing channel.
  • Single Bell-pair fidelity under two-qubit depolarizing:
  • For a pure stabilizer state,
\[ F = \sum_j p_j\,|\langle\psi|P_j|\psi\rangle|^2, \]
where the sum runs over the Pauli errors in the channel. For |Φ+, the only two-qubit Paulis with nonzero expectation are its (projective) stabilizers. The stabilizer of |Φ+ is generated by XX and ZZ, implying that the three non-identity Paulis
\[ \{X\otimes X,\; Y\otimes Y,\; Z\otimes Z\} \]
map |Φ+⟩ to itself up to a phase. All other 12 non-identity two-qubit Paulis are orthogonal (zero overlap).
  • Hence,
\[ F_{\Phi^+}(p) = (1-p)\cdot 1 + \frac{p}{15}\cdot 3 = 1 - \frac{12}{15}p = 1 - \frac{4}{5}p. \]
  • Total fidelity:
\[ \]
  1. Mathematical Typesetting
  • As above.
  1. Conventions and Units
  • Noise is applied only after CNOT gates as specified; single-qubit H gates are taken to be 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
  • Ideal target and its stabilizer
  • The given circuit prepares the 4-qubit state
\[ \]
which encodes the logical Bell/GHZ state on qubits A,B.
  • A convenient generating set for the stabilizer of this state is
\[ \mathcal{S}_\psi=\langle X_0X_3,\ Z_0Z_3,\ X_2X_1,\ Z_2Z_1\rangle. \]
  • The code stabilizers are
\[ \mathcal{S}_{\rm code}=\langle XXXX,\ ZZZZ\rangle. \]
  • Noise model
  • There are two noisy CNOTs, on pairs (2,1) and (0,3). Each is followed by an independent two-qubit depolarizing channel:
\[ \mathcal{E}(\rho)=(1-p)\rho + \frac{p}{15}\sum_{P\in\mathcal{P}_2\setminus\{II\}} P\rho P. \]
  • The net error is a 4-qubit Pauli of the form
\[ E=P_{03}\,Q_{21},\qquad P_{03},Q_{21}\in\{I,X,Y,Z\}^{\otimes 2}. \]
  • Post-selection criterion (detectable-error rejection)
  • Measuring the code stabilizers accepts (post-selects) iff the error commutes with both XXXX and ZZZZ.
  • For a two-qubit Pauli on a given pair, define the parity vector
\[ s(R)=(u(R),v(R))\in\mathbb{Z}_2^2, \]
where u is the parity of letters in {Z,Y} and v is the parity of letters in {X,Y} across the two qubits of the pair. Then:
- R commutes with XXXX iff u(R)=0,
- R commutes with ZZZZ iff v(R)=0.
  • Hence E=P_{03}Q_{21} is accepted iff
\[ s(P_{03})=s(Q_{21}). \]
  • Classification on one pair: Among the 16 two-qubit Paulis,
    • the class s=(0,0) consists of {II, XX, YY, ZZ} (4 elements),
    • the classes s∈{(1,0),(0,1),(1,1)} each also have 4 elements.
  • With the depolarizing distribution on one pair:
\[ \Pr[s=(0,0)]=a:=1-\frac{4}{5}p,\qquad \Pr[s\in\{(1,0),(0,1),(1,1)\}]=b:=\frac{4}{15}p. \]
  • Acceptance probability
  • By independence across the two pairs and the “match” rule s(P_{03})=s(Q_{21}),
\[ =\Big(1-\frac{4}{5}p\Big)^2+3\Big(\frac{4}{15}p\Big)^2 \]
  • Which accepted errors preserve the target state?
  • For a stabilizer state |ψ⟩, a Pauli E has overlap |⟨ψ|E|ψ⟩|^2=1 iff E∈±𝒮ψ; otherwise the overlap is 0.
  • Elements of ±𝒮ψ are precisely those with s(P_{03})=s(Q_{21})=(0,0) (i.e., on each pair either II, XX, YY, or ZZ). Thus the total probability of accepted “harmless” errors is
\[ \Pr[E\in\pm\mathcal{S}_\psi]=a^2=\Big(1-\frac{4}{5}p\Big)^2. \]
  • Logical (post-selected) fidelity
  • Decoding is an isometry on the code space, so the logical fidelity equals the physical fidelity conditioned on acceptance:
\[ =\frac{a^2}{a^2+3b^2} \]
  • Closed-form:
\[ \]
  • Small-p expansion:
\[ F_{\rm logical}(p)=1-\frac{16}{75}p^2+O(p^3). \]
  1. Mathematical Typesetting
  • As above.
  1. Conventions and Units
  • Only two-qubit gates are noisy as specified; H gates are ideal. Post-selection keeps runs with +1 outcomes for both XXXX and ZZZZ.
  1. Final Answer: F_logical(p) = [(1 - 4p/5)^2] / [(1 - 4p/5)^2 + 3 (4p/15)^2] = (75 - 120 p + 48 p^2) / (75 - 120 p + 64 p^2) = 1 - (16/75) p^2 + O(p^3).
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