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

Checkpoints

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

Step-by-Step Derivation

  1. Circuit and error model
    We start in the physical state
\[ \rho_0 = |0000\>\!\<0000|\;, \]

and apply in sequence (right‐to‐left)

\[ H_2,\;\; \underbrace{\mathrm{CNOT}_{2\to1}}_{\rm noisy},\;\; H_0,\;\; \underbrace{\mathrm{CNOT}_{0\to3}}_{\rm noisy}. \]

Each noisy CNOT acts as the perfect CNOT followed by a two‐qubit depolarizing channel on its two qubits:

\[ \mathcal{E}_{ij}(\rho) \;=\; (1-p)\,\rho \;+\; \frac{p}{15}\sum_{P\in\{I,X,Y,Z\}^{\!\otimes2}\setminus\{II\}} P\,\rho\,P\,. \]
  1. Unitary‐invariance of fidelity
    Let \(U= \mathrm{CNOT}_{0\to3}\,H_0\,\mathrm{CNOT}_{2\to1}\,H_2\) be the ideal preparation unitary and
\[ \rho_{\rm final} = \bigl(\mathcal{E}_{03}\circ\mathcal{U}_{\rm CNOT_{0\to3}}\bigr) \circ \bigl(\mathcal{U}_{H_0}\bigr) \circ \bigl(\mathcal{E}_{21}\circ\mathcal{U}_{\rm CNOT_{2\to1}}\bigr) \circ \bigl(\mathcal{U}_{H_2}\bigr)\, (\rho_0) \]

the actual noisy output. The fidelity with the ideal pure state \(|\psi_{\rm ideal}\>=U|0000\>\) satisfies

\[ F \;=\; \<\psi_{\rm ideal}|\;\rho_{\rm final}\;|\psi_{\rm ideal}\> \;=\; \<0000|\; \bigl(\mathcal{U}_{H_2}^\dagger\circ\mathcal{U}_{\rm CNOT_{2\to1}}^\dagger\circ\cdots\bigr) (\rho_{\rm final}) \;|\!0000\>\!, \]

i.e.\ by unitarity of the H’s and CNOT’s the fidelity reduces to that obtained by applying only the two depolarizing channels to the initial \(|0000\>\).

  1. Factorization over disjoint qubit pairs
    The two depolarizing channels act on disjoint pairs: - \(\mathcal{E}_{21}\) on qubits \((2,1)\), - \(\mathcal{E}_{03}\) on qubits \((0,3)\), and leave the other qubits untouched. Hence after \(\mathcal{E}_{21}\) the state is
\[ \rho' \;=\; |0\>\<0|_{0}\;\otimes\;\mathcal{E}_{21}\bigl(|00\>\<00|_{21}\bigr)\;\otimes\;|0\>\<0|_{3}, \]

and then \(\mathcal{E}_{03}\) acts only on \((0,3)\). The fidelity with \(|0000\>=|0\>_0\otimes|00\>_{21}\otimes|0\>_3\) factorizes:

\[ F \;=\; \bigl\<00\big|\mathcal{E}_{21}(|00\>\<00|)\bigl|00\bigr\> \;\times\; \bigl\<00\big|\mathcal{E}_{03}(|00\>\<00|)\bigl|00\bigr\>. \]
  1. Single‐pair fidelity
    For any two‐qubit pure state \(|00\>\) and the above depolarizing channel \(\mathcal{E}\),
\[ \<00|\mathcal{E}(|00\>\<00|)|00\> = (1-p)\;+\;\frac{p}{15}\sum_{P\neq I\!\otimes I}\bigl|\<00|P|00\>\bigr|^2. \]

Only the Paulis \(Z\otimes I,\;I\otimes Z,\;Z\otimes Z\) leave \(|00\>\) (up to phase), so there are 3 such \(P\)’s with \(|\<00|P|00\>|^2=1\). Hence

\[ F_{2{\rm qbit}} = (1-p) \;+\;\frac{3\,p}{15} = 1 \;-\;\frac{4}{5}\,p. \]
  1. Total 4-qubit fidelity
    Since both noisy CNOTs give the same two-qubit fidelity and act on disjoint pairs,
\[ F(p) \;=\; \Bigl(1 - \tfrac{4}{5}\,p\Bigr) \times \Bigl(1 - \tfrac{4}{5}\,p\Bigr) \;=\; \Bigl(1 - \tfrac{4}{5}\,p\Bigr)^2. \]

Final Answer:

\[ F_{\rm phys}(p)\;=\;\biggl(1-\frac{4}{5}\,p\biggr)^{2}. \]
User #3

The correct answer is: $ F_{\rm{physical}}=(1-\frac{12}{15}p)^2 $

Now let’s solve the next Checkpoint.

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

Step-by-Step Derivation

We label the two noisy CNOT channels as acting on qubit‐pairs \((2,1)\) and \((0,3)\) respectively. After the ideal circuit prepares the code‐space GHZ state

\[ \]

on the four physical qubits, the two depolarizing errors produce a final mixed state

\[ \rho_{\rm final} =\sum_{E_{21},\,E_{03}} P(E_{21})\,P(E_{03})\; \bigl(E_{03}\,E_{21}\bigr)\; |\psi_{\rm ideal}\>\<\psi_{\rm ideal}|\; \bigl(E_{03}\,E_{21}\bigr)\!, \]

where each \(E_{ij}\) is one of the 16 two‐qubit Paulis on qubits \(i,j\), with

\[ P(E)=\begin{cases} 1-p,&E=I\otimes I,\\ \dfrac p{15},&E\neq I\otimes I~. \end{cases} \]

We then measure the two code‐stabilizers

\[ S_X=XXXX,\quad S_Z=ZZZZ \]

and post‐select on the “+1” outcome for both. Finally we decode the two logical qubits. Because decoding is unitary on the code‐space, the fidelity of the {\it logical} two‐qubit state with the ideal GHZ is

\[ F_{\rm logical} =\frac{\bigl\<\psi_{\rm ideal}\bigr|\, \Pi_{S_X=+1,S_Z=+1}\,\rho_{\rm final}\, \Pi_{S_X=+1,S_Z=+1}\, \bigl|\psi_{\rm ideal}\bigr\>} {\Tr\!\bigl[\Pi_{S_X=+1,S_Z=+1}\,\rho_{\rm final}\bigr]} \;=\; \frac{\sum_{E\in\mathcal C(S)}P(E)\,\bigl|\<\psi_{\rm ideal}|E|\psi_{\rm ideal}\>\bigr|^2} {\sum_{E\in\mathcal C(S)}P(E)}\!, \]

where \(\mathcal C(S)\) is the set of Pauli errors commuting with both \(S_X,S_Z\), and \(P(E)=P(E_{21})P(E_{03})\).

  1. Denominator \(P_{\rm accept}=\sum_{E\in\mathcal C(S)}P(E)\).
    Since \(E=E_{03}\,E_{21}\) acts on disjoint pairs, define for each channel the random parity bits
\[ A_X =\sum_{i\in\{2,1\}}f\bigl(E_{21,i},X\bigr)\bmod2,\qquad A_Z =\sum_{i\in\{2,1\}}f\bigl(E_{21,i},Z\bigr)\bmod2, \]

and similarly \(B_X,B_Z\) for \((0,3)\), where

\[ \quad \]

Commutation with \(S_X=S_{X_0}S_{X_1}S_{X_2}S_{X_3}\) requires \(A_X+B_X=0\pmod2\), and with \(S_Z\) requires \(A_Z+B_Z=0\).
One finds for a single channel

\[ q(a_x,a_z)\;=\;\Pr\!\bigl[(A_X,A_Z)=(a_x,a_z)\bigr] =\begin{cases} 1-\frac45\,p,&(a_x,a_z)=(0,0),\\[6pt] \frac{4}{15}\,p,&(a_x,a_z)\in\{(0,1),(1,0),(1,1)\}. \end{cases} \]

Hence by independence

\[ P_{\rm accept} =\sum_{a_x,a_z}q(a_x,a_z)\,q(a_x,a_z) =\Bigl(1-\tfrac45p\Bigr)^2 \;+\;3\Bigl(\tfrac{4}{15}p\Bigr)^2 \;=\; 1-\tfrac85\,p\;+\;\tfrac{64}{75}\,p^2\,. \]
  1. Numerator
    Only those \(E\in\mathcal C(S)\) that also preserve the GHZ up to phase contribute \(|\<\psi_{\rm ideal}|E|\psi_{\rm ideal}\>|^2=1\).
    The GHZ‐stabilizer group (within the code‐centralizer) is generated by the logical operators \(X_A X_B\) and \(Z_A Z_B\), which act (up to phase) as
\[ \]

Thus the only errors in \(\mathcal C(S)\) that act trivially on the GHZ are

\[ E_{03}=I\otimes I,\qquad E_{21}\in\{\,I\otimes I,\;X\otimes X,\;Z\otimes Z,\;Y\otimes Y\}_{(2,1)}. \]

Their total probability is

\[ \sum_{E_{21}\in\{II,XX,ZZ,YY\}}P(E_{21})\;P(E_{03}=II) =\bigl(1-p\bigr)\!\Bigl[(1-p)+3\frac p{15}\Bigr] =1-\tfrac95\,p+\tfrac45\,p^2. \]
  1. Putting it together
\[ F_{\rm logical}(p) =\frac{1-\tfrac95\,p+\tfrac45\,p^2} {1-\tfrac85\,p+\tfrac{64}{75}\,p^2} =\frac{75-135\,p+60\,p^2}{75-120\,p+64\,p^2}\,. \]

Final Answer:

\[ \boxed{ F_{\rm logical}(p) \;=\; \frac{1 - \tfrac{9}{5}\,p + \tfrac{4}{5}\,p^2} {1 - \tfrac{8}{5}\,p + \tfrac{64}{75}\,p^2} \;=\; \frac{75 - 135\,p + 60\,p^2}{75 -120\,p +64\,p^2}. \]
User #5

The correct answer is: $ F_{\rm{logical}}=1 - \frac{\frac{16}{75}p^2}{1-\frac{8}{5}p + \frac{64}{75}p^2} $

Now let’s solve the next Checkpoint.

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

Step‐by‐Step Derivation

We label the five noisy CNOT gates (in time‐order)
B: CNOT₁₂,
C: CNOT₁₀,
D: CNOT₂₃,
E: CNOT₃₄,
F: CNOT₀₄,
each followed by an independent two‐qubit depolarizing channel with strength \(p\,\). There is no error on the single‐qubit Hadamard \(H_1\).

At the end of the circuit one measures the ancilla (qubit 4) in the \(Z\)‐basis, and one measures the two code‐stabilizers

\[ \]

We post‐select on getting “\(+1\)” for the ancilla (so no flip in the \(Z_4\)‐measurement) and “\(+1\)” for both \(S_X,S_Z\). Finally we decode to two logical qubits and compare to \(|00\>_{AB}\).

  1. No single‐fault logical errors.
    One checks that any single two‐qubit Pauli error (on any gate B–F) either
    – anticommutes with \(S_X\) or \(S_Z\) (and so is caught by the code stabilizer measurement), or
    – anticommutes with the effective ancilla‐parity operator \(Z_0Z_3Z_4\) (and so flips the ancilla readout),
    and hence is rejected.

Therefore the leading contribution to an undetected logical error is order \(p^2\).

  1. Which double‐faults escape detection and cause a logical flip?
    One finds by a short “Pauli‐propagation” argument that the only weight‐two Pauli errors on the four data qubits which

(i) commute with both stabilizers \(S_X,S_Z\),

(ii) commute with the ancilla‐parity \(Z_0Z_3Z_4\),

and yet act nontrivially on the code‐space, are the two–qubit bit‐flip operators on either the pair \(\{1,2\}\) or the pair \(\{0,3\}\), namely

\[ X_1X_2,\;Y_1Y_2,\quad\text{or}\quad X_0X_3,\;Y_0Y_3, \]

each of which implements the logical operator \(X_A\,X_B\) (up to a stabilizer). All other Pauli‐pairs are either caught or act trivially on \(|00\>_{AB}\).

  1. Count the contributing Pauli‐pairs.
    A little bookkeeping shows that there are exactly – 2 inequivalent ways to get \(X_1X_2\) from faults in {B,D},

    – 2 from {C,D},

    – 2 from {C,E},

    – 4 from {D,F},

    – 4 from {E,F},

totalling \(2+2+2+4+4=16\) distinct Pauli‐pairs. Each pair occurs with probability

\[ \bigl(\tfrac p{15}\bigr)\times\bigl(\tfrac p{15}\bigr) \;=\;\frac{p^2}{225}\,, \]

and each such pair escapes all detections and flips both logical bits.

  1. Logical‐error probability and fidelity.
    To \(O(p^2)\) the probability of an undetected logical flip is
\[ P_{\rm err}^{(2)} \;=\;16\;\frac{p^2}{225} \;=\;\frac{16}{225}\;p^2. \]

Since no single‐fault contributes, the logical fidelity (conditioned on post‐selection) is

\[ F_{\rm logical}(p) \;=\; 1 \;-\;P_{\rm err}^{(2)} + O(p^3) \;=\; 1 \;-\;\frac{16}{225}\,p^2 \;+\;O(p^3). \]

Final Answer:

To second order in \(p\) one obtains

\[ \boxed{ F_{\rm logical}(p) \;=\; 1 \;-\;\frac{16}{225}\,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, 225) * p**2
    # ---------------------------------------------------------------

    return F_logical