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. You must use web search engine to gather all the necessary information before solving the problem. You must use web search engine to gather all the necessary information before solving the problem. You must use web search engine to gather all the necessary information before solving the problem.

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

  • What the circuit prepares ideally
  • Start in |0000> (qubits ordered 0,1,2,3).
  • Apply H2: |0>2 → (|0>2 + |1>2)/√2.
  • Apply CNOT21: this entangles qubits 2→1, giving a Bell state on (2,1): |Φ+>21 = (|00>21 + |11>21)/√2.
  • Apply H0 then CNOT03: this prepares a Bell state on (0,3), |Φ+>03 = (|00>03 + |11>03)/√2.
  • Hence the ideal final 4-qubit state is the product of two Bell states |Ψideal> = |Φ+>21 ⊗ |Φ+>03. The Bell state |Φ+> is a stabilizer state with generators X⊗X and Z⊗Z. (qiskit.qotlabs.org)
  • The ideal state lies in the [[4,2,2]] code space with stabilizers XXXX and ZZZZ, since (X0X3)(X2X1) = XXXX and (Z0Z3)(Z2Z1) = ZZZZ both stabilize |Φ+>03 ⊗ |Φ+>21. This matches the standard [[4,2,2]] code description with stabilizers {XXXX, ZZZZ}. (errorcorrectionzoo.org)

  • Noise model (per the problem statement)

  • After each two-qubit gate, a two-qubit depolarizing channel applies one of the 15 non-identity two-qubit Pauli operators uniformly at random with probability p/15 each (and applies identity with probability 1−p). This is the standard “uniform Pauli” form of depolarization on two qubits. (qiskit.github.io)
  • In our circuit there are exactly two such noise insertions: 1) after CNOT21 on the pair (2,1); 2) after CNOT03 on the pair (0,3). These two noise events act on disjoint qubit pairs and are independent; the subsequent single-qubit H0 and the other CNOT act on different qubits, so they do not transform the earlier (2,1) error.

  • Fidelity reduction for a single Bell pair hit by a 2-qubit depolarizing error

  • Let E be the two-qubit Pauli sampled by the (two-qubit) depolarizing channel on a Bell pair.
  • For the pure target |Φ+>, the state fidelity after the Pauli E is Fpair = ⟨Φ+| E |Φ+⟩⟨Φ+| E |Φ+⟩ = 1 if E maps |Φ+> to itself up to a global phase, and 0 otherwise.
  • The stabilizer (up to phase) of |Φ+> is generated by X⊗X and Z⊗Z; consequently the only Paulis that preserve |Φ+> up to a phase are { I⊗I, X⊗X, Z⊗Z, Y⊗Y }. All other two-qubit Paulis take |Φ+> to an orthogonal Bell state. (qiskit.qotlabs.org)
  • Under the specified channel on a given pair: P(E = I⊗I) = 1 − p, P(E ∈ {X⊗X, Y⊗Y, Z⊗Z}) = 3 × (p/15). Therefore Fpair(p) = (1 − p) + 3 (p/15) = 1 − (12/15) p = 1 − (4/5) p.

  • Total 4-qubit physical state fidelity

  • The two error channels act independently on disjoint pairs (2,1) and (0,3), and the ideal state is the tensor product of the two Bell pairs. Hence the final-state fidelity is the product of the two independent pair fidelities: F4q(p) = [Fpair(p)]^2 = [1 − (4/5) p]^2.

2) Mathematical Typesetting

  • Ideal state:
\[ \]
  • Single-pair fidelity under the two-qubit depolarizing channel:
\[ \]
  • Total fidelity:
\[ = \left(1-\frac{4}{5}p\right)^2 \]

3) Conventions and Units

  • Qubits are labeled 0,1,2,3; logical qubits A,B; stabilizers XXXX and ZZZZ; logical Paulis as given in the problem statement. The depolarizing probability parameter is p per two-qubit gate as defined above. (errorcorrectionzoo.org, qiskit.github.io)

4) Final Answer

Final Answer: Fphys(p) = [1 − (4/5)p]^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 the prepared state
  • The [[4,2,2]] code has stabilizer generators S = {XXXX, ZZZZ}. We label physical qubits 0,1,2,3. The ideal logical target is the encoded Bell (logical GHZ) state (|00⟩AB + |11⟩AB)/√2 in the codespace stabilized by S. (errorcorrectionzoo.org)
  • The given circuit (right-to-left) H2 → CNOT21 → H0 → CNOT03 prepares two physical Bell pairs on disjoint qubit pairs (2,1) and (0,3):
\[ \]
A Bell state |Φ+⟩ is a simultaneous +1 eigenstate of X⊗X and Z⊗Z; the four Bell states are labeled by the eigenvalue pair (a_x,a_z)∈{±1}^2. ([en.wikipedia.org](https://en.wikipedia.org/wiki/Bell_state))
  • Noise model and where it appears
  • After each two-qubit gate, a 2-qubit depolarizing channel applies, which with probability 1−p does nothing, and with total probability p applies a uniformly random non-identity 2-qubit Pauli (there are 4^2−1=15 of them), each with probability p/15. We have two such insertions: after CNOT21 (on qubits 2,1) and after CNOT03 (on qubits 0,3). Because the two CNOTs act on disjoint pairs, the two error events are independent and never propagate into each other. (qiskit.github.io)

  • How a 2-qubit Pauli acts on a Bell pair

  • The stabilizer of |Φ+⟩ is generated by X⊗X and Z⊗Z, so the 2-qubit Pauli group partitions into four cosets relative to this stabilizer. Acting on |Φ+⟩, these cosets map it to exactly one of the four Bell states. In particular, elements in the stabilizer coset {II, XX, ZZ, (−)YY} leave |Φ+⟩ invariant up to a global phase; the other three cosets map |Φ+⟩ to Φ−, Ψ+, or Ψ−, respectively. Thus, for a single 2-qubit depolarizing error on a Bell pair:
    • Remains |Φ+⟩ with probability
\[ p_0 = (1-p) + 3\frac{p}{15} = 1-\frac{4}{5}p. \]
- Becomes each of the other three Bell states with equal probability
\[ p_1 = \frac{4}{15}p. \]
(There are 3 non-identity stabilizer elements and three other cosets of size 4.) ([en.wikipedia.org](https://en.wikipedia.org/wiki/Bell_state), [qiskit.github.io](https://qiskit.github.io/qiskit-aer/stubs/qiskit_aer.noise.depolarizing_error.html?utm_source=openai))
  • What “post-select on all detectable errors” means here
  • We measure the two code stabilizers XXXX and ZZZZ and keep only outcomes with eigenvalue +1 for both. Since XXXX = (X0X3)(X2X1) and ZZZZ = (Z0Z3)(Z2Z1), their measurement outcomes equal the products of the individual pair outcomes for X⊗X and Z⊗Z, respectively. If the Bell state on pair (0,3) has labels (a_x,a_z) and on (2,1) has (b_x,b_z), then the code-syndrome is (a_x b_x, a_z b_z). Acceptance (+1,+1) occurs iff (a_x,a_z) = (b_x,b_z), i.e., both pairs end in the same Bell state. Errors that anti-commute with at least one stabilizer are detected and discarded; those commuting with both are undetected (logical) and are kept. (errorcorrectionzoo.org, learning.quantum.ibm.com)

  • Acceptance probability

  • The two pairs are independent with the same distribution over Bell labels. Let p0 and p1 be as above. The probability to accept is the probability that both pairs have the same label:
\[ = \Big(1-\tfrac{4}{5}p\Big)^2 + 3\Big(\tfrac{4}{15}p\Big)^2 \]
  • Logical state conditioned on acceptance and its fidelity
  • Conditioned on acceptance, the (encoded) 2-qubit logical state is an incoherent mixture of the four orthogonal logical Bell states corresponding to the four Bell labels shared by the two pairs:
    • Correct logical target (both pairs Φ+): weight p0^2.
    • Three orthogonal logical Bell states (both pairs Φ−, Ψ+, Ψ−): total weight 3 p1^2.
  • Since these four logical states are mutually orthogonal within the codespace, the logical fidelity with the target equals the posterior probability of the “Φ+ and Φ+” branch:
\[ = \frac{p_0^2}{p_0^2 + 3 p_1^2} \]
  • Small-p expansion (shows error suppression by post-selection)
  • Expanding the exact expression:
\[ F_{\text{logical}}(p) = 1 - \frac{16}{75}p^2 + O(p^3), \]
i.e., all O(p) logical infidelity is removed by post-selection, consistent with the distance-2, error-detecting nature of the [[4,2,2]] code. ([errorcorrectionzoo.org](https://errorcorrectionzoo.org/c/stab_4_2_2))

2) Mathematical Typesetting

  • Single-pair output probabilities under depolarizing noise:
\[ p_0 = 1-\frac{4}{5}p,\qquad p_1 = \frac{4}{15}p. \]
  • Acceptance probability:
\[ P_{\text{acc}}(p) = p_0^2 + 3p_1^2 = 1 - \frac{8}{5}p + \frac{64}{75}p^2. \]
  • Logical fidelity (post-selected):
\[ = \frac{p_0^2}{p_0^2 + 3p_1^2} = \frac{\big(1-\frac{4}{5}p\big)^2} {1 - \frac{8}{5}p + \frac{64}{75}p^2} \]

3) Conventions and Units

  • Physical qubits ordered (0,1,2,3). Logical qubits (A,B). Stabilizers S = {XXXX, ZZZZ}. Two-qubit depolarizing noise of strength p appended after each CNOT gate; no other noise. Post-selection keeps only +1 outcomes on both stabilizers. (errorcorrectionzoo.org, qiskit.github.io)

4) Final Answer: F_logical(p) = [(1 − 4p/5)^2] / [1 − (8/5)p + (64/75)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 = ((1 - sp.Rational(4, 5)*p)**2) / (1 - sp.Rational(8, 5)*p + sp.Rational(64, 75)*p**2)
    # ---------------------------------------------------------------

    return F_logical