Checkpoint-3

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
  • Start from |0000⟩ on qubits (0,1,2,3).
  • Apply H2 then CNOT21:
    • H2 creates (|0⟩2 + |1⟩2)/√2, and CNOT21 entangles qubits 2β†’1, giving a Bell state on (2,1):
\[ |\Phi^+\rangle_{21} = \frac{|00\rangle_{21} + |11\rangle_{21}}{\sqrt{2}}. \]
  • Apply H0 then CNOT03:
    • H0 creates (|0⟩0 + |1⟩0)/√2, and CNOT03 entangles qubits 0β†’3, giving a Bell state on (0,3):
\[ |\Phi^+\rangle_{03} = \frac{|00\rangle_{03} + |11\rangle_{03}}{\sqrt{2}}. \]
  • Hence the ideal final 4-qubit state is a product of two Bell pairs on disjoint qubit pairs:
\[ |\psi_{\text{id}}\rangle = |\Phi^+\rangle_{03} \otimes |\Phi^+\rangle_{21}. \]
  • Stabilizer of the ideal state
  • Each Bell state |Ξ¦+⟩ on qubits (a,b) is stabilized by {X_a X_b, Z_a Z_b}. Therefore
\[ \mathcal{S} = \langle X_0 X_3,\ Z_0 Z_3,\ X_1 X_2,\ Z_1 Z_2 \rangle. \]
  • Equivalently, this generates XXXX and ZZZZ as well, consistent with the [[4,2,2]] stabilizers and the logical Bell (GHZ) condition.

  • Noise model and its action

  • After each CNOT, a two-qubit depolarizing channel acts on the same qubit pair:
\[ \mathcal{D}_{ij}(\rho) = (1-p)\rho + \frac{p}{15}\sum_{P\in \mathcal{P}_2\setminus \{II\}} P_{ij}\,\rho\,P_{ij}, \]
where the sum runs over the 15 non-identity two-qubit Paulis on (i,j).
  • In our circuit there are two such channels: one on qubits (2,1) after CNOT21 and one on qubits (0,3) after CNOT03. No subsequent gates act on the same qubits as the earlier error, so the two channels act on disjoint pairs and are independent.

  • Fidelity for one Bell pair under the two-qubit depolarizing channel

  • For a pure target |Ξ¦+⟩, the state fidelity after applying a Pauli P is
\[ F = |\langle\Phi^+|P|\Phi^+\rangle|^2. \]
  • The only two-qubit Paulis that leave |Ξ¦+⟩ invariant up to a global phase are {II, XX, YY, ZZ}. Thus, among the 15 non-identity Paulis, exactly 3 preserve |Ξ¦+⟩.
  • Therefore, the single-pair fidelity is
\[ f_{\text{Bell}}(p) = (1-p) + \frac{3}{15}p = 1 - \frac{12}{15}p = 1 - \frac{4}{5}p. \]
  • Total 4-qubit fidelity
  • The final ideal state is a tensor product across disjoint pairs (0,3) and (2,1), and the noise on these pairs is independent and acts locally. Hence the total fidelity factorizes:
\[ F_{\text{phys}}(p) = f_{\text{Bell}}(p)\times f_{\text{Bell}}(p) = \left(1 - \frac{4}{5}p\right)^2. \]
  1. Mathematical Typesetting - All equations above use LaTeX.

  2. Conventions and Units - Qubit labeling 0,1,2,3 as in the problem. Error probability p per two-qubit gate as specified.

  3. Final Answer: F_phys(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 state prepared by the circuit (as in Subproblem 1)
  • Starting from |0000⟩ on qubits (0,1,2,3), the circuit
\[ (CNOT_{03}) (H_0) (CNOT_{21}) (H_2) \]
prepares
\[ \]
  • This state lies in the [[4,2,2]] code space and is the logical Bell (GHZ) state on qubits A and B. Indeed,
\[ X_A X_B = X_1 X_2,\quad Z_A Z_B = Z_1 Z_2, \]
and both have +1 eigenvalue on the final state.
  • Noise model and post-selection
  • After each CNOT (on pairs (2,1) and (0,3)), a two-qubit depolarizing channel acts:
\[ \mathcal{D}_{ij}(\rho)=(1-p)\rho+\frac{p}{15}\sum_{P\in\mathcal{P}_2\setminus\{II\}} P_{ij}\rho P_{ij}. \]
  • Let the realized Pauli on pair (0,3) be \(Q_{03}\) and on (2,1) be \(Q_{21}\) (each independently distributed).
  • Post-selection keeps only runs where the measured code stabilizers \(S_X=XXXX\) and \(S_Z=ZZZZ\) return +1. Since \(|\psi_{\text{id}}\rangle\) is a +1 eigenstate of both, the post-selection accepts exactly those \(E=Q_{03}\otimes Q_{21}\) that commute with both \(S_X\) and \(S_Z\).

  • Commutation/parity classification per pair

  • For a two-qubit Pauli \(Q\) on a given pair, define the parity vector
\[ \]
  • For \(E=Q_{03}\otimes Q_{21}\):

    • \(E\) commutes with \(S_Z=ZZZZ\) iff \(a(Q_{03})=a(Q_{21})\),
    • \(E\) commutes with \(S_X=XXXX\) iff \(b(Q_{03})=b(Q_{21})\). Hence acceptance ⇔ the two pairs have the same parity vector \((a,b)\).
  • The four parity (coset) classes per pair

  • The 16 two-qubit Paulis (up to phase) on a pair split into four classes of size 4:
    • Class 00: {II, XX, YY, ZZ}
    • Class 10: {XI, IX, YZ, ZY}
    • Class 01: {ZI, IZ, XY, YX}
    • Class 11: {YI, IY, ZX, XZ}
  • Under the depolarizing channel on a pair:
\[ \]
  • Acceptance probability
  • Since the two pairs are independent and acceptance requires matching classes on both,
\[ \]
  • Logical action of accepted errors
  • If both pairs are in class 00, then \(E\in\langle X_0X_3,Z_0Z_3,X_1X_2,Z_1Z_2\rangle\), which preserves \(|\psi_{\text{id}}\rangle\) (it is the stabilizer group of the two Bell pairs). Logical state fidelity contribution = 1.
  • If both pairs are in class 10, pick representatives \(Q_{03}=XI\), \(Q_{21}=XI\). Then
\[ E=XI_{03}\,XI_{21}=X_0X_2=X_A, \]
up to multiplication by elements in class 00 (state stabilizers). This maps $|\Phi^+\rangle_{AB}$ to $|\Psi^+\rangle_{AB}$, orthogonal to the target. Contribution = 0.
  • If both pairs are in class 01, similarly
\[ E=ZI_{03}\,ZI_{21}=Z_0Z_2=Z_B, \]
mapping $|\Phi^+\rangle_{AB}\to|\Phi^-\rangle_{AB}$, orthogonal. Contribution = 0.
  • If both pairs are in class 11,
\[ E=YI_{03}\,YI_{21}=Y_0Y_2 \propto X_A Z_B, \]
mapping $|\Phi^+\rangle_{AB}\to|\Psi^-\rangle_{AB}$, orthogonal. Contribution = 0.

Therefore, conditioned on acceptance, the logical state fidelity equals the conditional probability that both pairs are in class 00.

  • Logical fidelity with post-selection
\[ \]

Small-\(p\) expansion (showing error-detection removes all first-order effects):

\[ F_{\text{L}}(p)=1-\frac{16}{75}p^2+O(p^3). \]
  1. Mathematical Typesetting - All expressions above are written in LaTeX.

  2. Conventions and Units - Qubits labeled 0,1,2,3 as specified; logicals A,B with \(X_A=XIXI\), \(X_B=XXII\), \(Z_A=ZZII\), \(Z_B=ZIZI\). - Two-qubit gate error rate \(p\) per CNOT; depolarizing over the 15 non-identity Paulis.

  3. Final Answer:

\[ =\frac{\left(1-\frac{4p}{5}\right)^2}{\left(1-\frac{4p}{5}\right)^2+3\left(\frac{4p}{15}\right)^2} =\frac{\left(1-\frac{4p}{5}\right)^2}{\left(1-\frac{4p}{5}\right)^2+\frac{16}{75}p^2} \]
User #5

Checkpoint 3

Suppose that we prepare a logical two-qubit \(|00\rangle_{AB}\) state in the [[4,2,2]] code. To do so, we introduce an ancilla qubit, qubit 4, and use the following state preparation circuit:

\[ M_4 (CNOT_{04}) (CNOT_{34}) (CNOT_{23}) (CNOT_{10}) (CNOT_{12}) (H_1) \]

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 and \(M\) is a single-qubit measurement. The ancilla is used to detect errors in the state preparation circuit and makes the circuit fault-tolerant. If the ancilla measurement is \(|0\rangle\) (\(|1\rangle\)), the state preparation succeeds (fails).

What is the logical state fidelity of the final 2-qubit logical state at the end of the circuit as a function of two-qubit gate error rate \(p\), assuming the state is post-selected on all detectable errors in the code and on the ancilla qubit measuring \(|0\rangle\)?

Assistant #6
  1. Step-by-Step Derivation
  • Goal and setup
  • We prepare the logical |00⟩AB of the [[4,2,2]] code with stabilizers S = ⟨XXXX, ZZZZ⟩. Logical operators are X_A = X0 X2, X_B = X0 X1, Z_A = Z0 Z1, Z_B = Z0 Z2.
  • The circuit (right-to-left) is H1 β†’ CNOT12 β†’ CNOT10 β†’ CNOT23 β†’ CNOT34 β†’ CNOT04 β†’ M4(Z), with a two-qubit depolarizing channel after each CNOT: D(ρ) = (1βˆ’p)ρ + (p/15)βˆ‘_{P∈P2{II}} P ρ P.

  • Post-selection:

    • accept only if ancilla measurement is 0 (no X/Y on ancilla just before M4),
    • and if both stabilizers XXXX and ZZZZ give +1 on the data (no detectable syndrome).
  • Logical fidelity target: since the target is |00⟩AB, accepted logical Z-type errors (Z_A, Z_B) are harmless (they have +1 eigenvalue on |00⟩), while accepted logical X-type errors (X_A and/or X_B) are harmful (map |00⟩ to an orthogonal state). Thus:

    • Logical fidelity F_L = Prob[no logical X on A or B | accept].
    • By fault-tolerance, all single faults are either rejected or equivalent to logical Z (hence harmless). Therefore 1 βˆ’ F_L = O(p^2).
  • Propagate Pauli errors from each location

  • Label the five CNOTs (from earliest to latest insertion point) and the qubits they act on: A: after CNOT12 (qubits 1,2), B: after CNOT10 (qubits 1,0), C: after CNOT23 (qubits 2,3), D: after CNOT34 (qubits 3,4), E: after CNOT04 (qubits 0,4).

  • Conjugation rules through a CNOTcβ†’t: X_c β†’ X_c X_t, Z_c β†’ Z_c, X_t β†’ X_t, Z_t β†’ Z_c Z_t. We push each error forward to just before ancilla measurement.

  • Images of single-qubit X or Z generators at each location (Y is the product of X and Z on that qubit): β€’ A (after 12; subsequent 10, 23, 34, 04): X1 β†’ X0 X1 X4, Z1 β†’ Z1, X2 β†’ X2 X3 X4, Z2 β†’ Z2. β€’ B (after 10; subsequent 23, 34, 04): X1 β†’ X1, Z1 β†’ Z1, X0 β†’ X0 X4, Z0 β†’ Z0. β€’ C (after 23; subsequent 34, 04): X2 β†’ X2, Z2 β†’ Z2, X3 β†’ X3 X4, Z3 β†’ Z3. β€’ D (after 34; subsequent 04): X3 β†’ X3, Z3 β†’ Z3, X4 β†’ X4, Z4 β†’ Z0 Z4. β€’ E (after 04; no subsequent gates): X0 β†’ X0, Z0 β†’ Z0, X4 β†’ X4, Z4 β†’ Z4.

  • Acceptance and logical-X indicators as mod-2 parities

  • Define, for any final Pauli error, the bits:

    • data X-parity a = (x0 βŠ• x1 βŠ• x2 βŠ• x3), where xi=1 if qubit i carries X or Y,
    • data Z-parity b = (z0 βŠ• z1 βŠ• z2 βŠ• z3), where zi=1 if qubit i carries Z or Y,
    • ancilla X-bit x4 = 1 if qubit 4 carries X or Y (Z4 is irrelevant to M4(Z)).

    Acceptance ⇔ a = 0, b = 0, x4 = 0.

  • Logical-X on data is detected by commutation with logical Z’s:

    • β„“_A = (x0 βŠ• x1) (anticommutes with Z_A = Z0 Z1),
    • β„“_B = (x0 βŠ• x2) (anticommutes with Z_B = Z0 Z2). Logical-X present iff (β„“_A, β„“_B) β‰  (0,0).
  • For each location k ∈ {A,B,C,D,E}, and for its two-qubit Pauli P (encoded as s ∈ F2^4 specifying X/Z on each of the two qubits), the propagated error determines a triple c_k(P) = (x4, a, b) ∈ F2^3 and a logical-X vector β„“_k(P) = (β„“_A, β„“_B) ∈ F2^2.

    From the images above one finds the following deterministic relations between c and β„“ at each location: - A: β„“ = (0, x4), with c having a = 0 (only). - B: β„“ = (a, x4). - C: β„“ = (0, a βŠ• x4). - D: β„“ = (0, 0). - E: β„“ = (a, a).

  • Counting non-identity Pauli errors by c at each location

  • Each two-qubit depolarizing draw at a location is uniform over 15 non-identity Paulis. For counting, it’s convenient to parameterize errors by s ∈ F2^4 \ {0}, where the 4 bits indicate the presence of X and Z on each of the two qubits (Y = XZ).

  • The number of non-identity errors at location k that realize a given c = (x4,a,b) is:

    • A: only a=0 is possible; counts: (x4, a=0, b) = (0,0,0): 3; and (0,0,1), (1,0,0), (1,0,1): 4 each. (all a=1 classes: 0)
    • B, C, D, E: all 8 c-classes occur; counts: c = (0,0,0): 1; all other 7 classes: 2.

(These counts follow from linear maps from s to c; they also satisfy that the totals per location sum to 15.)

  • Why there is no O(p) logical infidelity
  • With exactly one fault at location k, acceptance requires c_k = (x4, a, b) = (0,0,0). For every location, the corresponding β„“_k(c = 000) = (0,0). Thus every accepted single-fault event is logically Z-only (or trivial) on data, hence harmless for |00⟩AB. Therefore 1 βˆ’ F_L has no linear term in p.

  • Leading O(p^2) contribution: exactly two faults

  • For two faults at distinct locations k β‰  β„“, with non-identity Paulis P_k, P_β„“, acceptance requires c_k(P_k) = c_β„“(P_β„“) ≑ c (so that x4, a, b each sum to 0 mod 2).
  • The resulting logical-X vector is β„“_tot = β„“_k(c) βŠ• β„“_β„“(c). This is nonzero iff β„“_k(c) β‰  β„“_β„“(c).
  • Hence, for each unordered pair {k,β„“} and each c in the intersection of their supports, the number of accepted two-fault events that cause a logical X is N_{kβ„“}(c) = count_k(c) Γ— count_β„“(c) Γ— 1[β„“_k(c) β‰  β„“_β„“(c)].

  • Using the β„“(c) functions above and the counts, one finds: β€’ AB: 0 β€’ AC: 0 β€’ AD: 16 β€’ AE: 16 β€’ BC: 16 β€’ BD: 24 β€’ BE: 16 β€’ CD: 16 β€’ CE: 24 β€’ DE: 16

    Summing over the 10 unordered pairs, N_tot = 144.

  • Each such pair contributes probability (p/15)Β·(p/15) = p^2/225 (the other three gates are identity with prob 1 + O(p)), so the total probability weight of accepted two-fault events that cause a logical X is N2 = (144/225) p^2 + O(p^3) = (16/25) p^2 + O(p^3).

  • As argued, the acceptance probability and the β€œgood” probability share the same O(p) term; thus it cancels in the ratio. Consequently the logical state fidelity conditioned on acceptance is F_L(p) = 1 βˆ’ (16/25) p^2 + O(p^3).

  1. Mathematical Typesetting - All algebra written in LaTeX above.

  2. Conventions and Units - Qubits 0–3 are data, 4 is ancilla. Depolarizing parameter p per two-qubit gate as specified. Post-selection on ancilla M4=0 and on XXXX=+1, ZZZZ=+1.

  3. Final Answer: F_L(p) = 1 βˆ’ (16/25) p^2 + O(p^3).

User #7

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 the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = ...  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical
Assistant #8
import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = 1 - sp.Rational(16, 25) * p**2
    # ---------------------------------------------------------------

    return F_logical