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, 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. The ideal prepared state

Starting from the vacuum \(|0000\rangle\), the perfect circuit

\[ U \;=\;CNOT_{03}\;H_0\;CNOT_{21}\;H_2 \]

produces a [[4,2,2]] code word that encodes the logical two–qubit GHZ state

\[ |\psi_{\text{ideal}}\rangle_{AB} \;=\;\frac{|00\rangle_{AB}+|11\rangle_{AB}}{\sqrt2}\;. \]

The physical four–qubit state will be denoted \(|\psi\rangle\equiv|\psi_{\text{ideal}}\rangle\).


2. Error model and fidelity formula

• Every CNOT is followed by an independent two–qubit depolarizing channel

\[ \mathcal E(\rho)\;=\;(1-p)\,\rho +\frac{p}{15}\sum_{P\neq I\!\!I}P\,\rho\,P , \]

where the sum runs over the \(15\) non-identity two–qubit Paulis acting on the same pair of qubits as that CNOT.

• There are only two noisy gates, hence two independent error operators
\(E_{21}\) (acting on qubits \(2,1\)) and \(E_{03}\) (acting on \(0,3\)) with

\[ \Pr[E_{ij}=I\!\!I]=(1-p),\qquad \Pr[E_{ij}=P\neq I\!\!I]=\frac{p}{15}. \]

Because qubits \(\{2,1\}\) and \(\{0,3\}\) are disjoint and all gates are Clifford, both error operators can be moved to the end of the circuit without changing their form. The final state therefore is

\[ \rho_{\text{out}} =\sum_{E_{21},E_{03}}\Pr(E_{21})\Pr(E_{03}) \;E_{03}E_{21}\,|\psi\rangle\!\langle\psi|\,E_{21}E_{03}. \]

For a pure target state the (state) fidelity is

\[ F(p)=\langle\psi|\rho_{\text{out}}|\psi\rangle =\sum_{E_{21},E_{03}}\Pr(E_{21})\Pr(E_{03}) \,\,f(E_{21}E_{03}), \qquad f(P)\equiv|\langle\psi|P|\psi\rangle|^{2}. \]

3. Which Paulis leave \(|\psi\rangle\) unchanged?

The code is stabilised by

\[ S=\langle XXXX,\;ZZZZ\rangle , \]

and the logical operators are (up to stabilisers)

\[ X_A=X I X I,\; X_B=XX I I,\qquad Z_A=ZZ I I,\; Z_B=Z I Z I . \]

For the GHZ logical state one has

\[ X_A X_B|\psi\rangle=|\psi\rangle,\quad Z_A Z_B|\psi\rangle=|\psi\rangle,\quad Y_A Y_B|\psi\rangle=-|\psi\rangle . \]

Multiplying these by stabilisers shows that the six two-qubit Paulis

\[ \begin{aligned} \mathcal C_{12}&=\{\,I X X I,\;I Y Y I,\;I Z Z I\},\\ \mathcal C_{03}&=\{\,X I I X,\;Y I I Y,\;Z I I Z\}, \end{aligned} \]

as well as the three weight-4 stabilisers
\(XXXX,\;YYYY,\;ZZZZ\), act as \(\pm1\) on \(|\psi\rangle\).
Therefore

\[ f(P)=1\quad\text{iff}\quad P\in \{I\}\cup\mathcal C_{12}\cup\mathcal C_{03}\cup \{XXXX,YYYY,ZZZZ\}, \]

and \(f(P)=0\) otherwise.


4. Counting the contributing error configurations

Write \(C\) for the set \(\mathcal C_{12}\) or \(\mathcal C_{03}\) and \(N\) for the remaining \(12\) non-identity two-qubit Paulis on a given pair.

  1. No error
    • probability \((1-p)^2\),
    • contribution to \(F\): \(1\).

  2. Exactly one (benign) error
    • probability \(2(1-p)\dfrac{p}{15}\times|C|=2(1-p)p\dfrac{3}{15}\),
    • contribution: \(1\).

  3. Two errors

There are \(15^{2}=225\) ordered pairs \((E_{21},E_{03})\) with both errors non-identity. A direct parity count (or an explicit table) shows that
\(57\) of these pairs multiply to an operator with \(f=1\) (all others give \(f=0\)):
\((C,C)\) with identical letters \(:\) \(3\times3=9\),
\((N,N)\) pairs whose parities match the stabiliser conditions \(:\) \(48\).
The probability of such double-error events is \(\Bigl(\dfrac{p}{15}\Bigr)^{2}\) for each pair.

Putting everything together,

\[ \begin{aligned} F(p) &=(1-p)^2 +2(1-p)p\frac{3}{15} +\frac{57}{225}\,p^{2}\\[2mm] &=1-\frac{8}{5}\,p+\frac{64}{75}\,p^{2}. \end{aligned} \]

5. Result

The physical four–qubit state fidelity after the preparation circuit, as a function of the two-qubit gate error probability \(p\), is

\[ \boxed{\,F(p)=1-\frac{8}{5}\,p+\frac{64}{75}\,p^{2}\,}. \]

This expression is exact, since at most two faulty CNOTs occur in the circuit.


Final Answer:
The physical state fidelity is
\(F(p)=1-\dfrac{8}{5}\,p+\dfrac{64}{75}\,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

Step-by-Step Derivation

(Throughout we ignore global phases and denote Pauli products by juxtaposition.
Qubit order is 0-1-2-3.)


  1. The target state and its full stabiliser

• Code stabilisers \(S_{\text{code}}=\langle XXXX,\,ZZZZ\rangle\)
• Logical operators (up to \(S_{\text{code}}\))

$X_A=X I X I,\;X_B=XX I I,\;Z_A=ZZ I I,\;Z_B=Z I Z I$

For

\[ |\psi_{\rm GHZ}\rangle=\frac{|00\rangle_{AB}+|11\rangle_{AB}}{\sqrt2} \]

the two extra (logical) stabilisers are

\[ X_A X_B = IXXI ,\qquad Z_A Z_B = IZZI . \]

Hence the full stabiliser group of the prepared state is

\[ S_{\psi}=\langle XXXX,\,ZZZZ,\,IXXI,\,IZZI\rangle \]

which has \(2^4=16\) elements. The 16 operators are

\[ \begin{aligned} &\mathbf 1,\\[1pt] &XXXX,\;ZZZZ,\;YYYY,\\[1pt] &IXXI,\;IZZI,\;IYYI,\\ &XIIX,\;Z I I Z,\;Y I I Y,\\ &XYYX,\;ZYYZ,\\ &XYXZ,\;ZXXZ,\\ &\;XZZX,\;ZY YZ . \end{aligned} \]

Every member of \(S_{\psi}\) acts on \(|\psi_{\rm GHZ}\rangle\) as \(\pm1\); for every other Pauli \(P\), \(\langle\psi_{\rm GHZ}|P|\psi_{\rm GHZ}\rangle=0\).


  1. Gate–error model

Two CNOTs are used, hence two independent two-qubit depolarising channels:

\[ \mathcal E_{ij}(\rho) =(1-p)\rho+\frac{p}{15}\!\!\sum_{P\neq I\!I}P_{ij}\rho P_{ij}, \]

one acting on qubits \((2,1)\), one on \((0,3)\).
Let

\[ P_{21}\,,P_{03}\in\{I,X,Y,Z\}^{\otimes2}\quad (15\ \hbox{non–identity each}) \]

be the Pauli errors drawn from the two channels.
Because the qubit pairs are disjoint and all gates are Clifford, the combined error operator reaching the end of the circuit is simply

\[ E=P_{03}\,P_{21}\;\;(\hbox{tensor product on }0\!:\!3\hbox{ and }2\!:\!1). \]

  1. Detectable versus undetectable errors

An error survives the post-selection iff it commutes with the code stabilisers \(XXXX\) and \(ZZZZ\). Denote by

\[ \chi(P)=\bigl(\,w_X(P)\bmod 2,\;w_Z(P)\bmod 2\bigr)\in\{0,1\}^2 \]

the parities of the numbers \(w_X,w_Z\) of \(X\)- (\(=\) \(X\) or \(Y\)) and \(Z\)- (\(=\) \(Z\) or \(Y\)) components in a two-qubit Pauli.

For a single two-qubit Pauli on a fixed pair we find

\[ \#\bigl\{P:\chi(P)=(0,0)\bigr\}=3, \quad \#\bigl\{P:\chi(P)=(1,0)\bigr\}=4, \quad \#\bigl\{P:\chi(P)=(0,1)\bigr\}=4, \quad \#\bigl\{P:\chi(P)=(1,1)\bigr\}=4 . \]

Because the two error operators act on disjoint pairs, the overall error \(E=P_{03}P_{21}\) commutes with the code stabilisers iff

\[ \chi(P_{03})=\chi(P_{21}). \]

Hence among the \(15^2=225\) double-error patterns

\[ \#\{\hbox{undetectable}\}=3^2+3\times4^2=57 . \]

(The \(3^2\) term corresponds to \((0,0)\), the other three squares to \((1,0),(0,1),(1,1)\).)


  1. Which undetectable errors are actually harmless?

\(E\) is harmless (i.e. leaves the logical state unchanged) iff \(E\in S_{\psi}\). Among the \(57\) undetectable two-error patterns, exactly \(12\) produce such operators:

• choose \((a,b)\neq(0,0)\) in \((XXXX)^a(ZZZZ)^b\) (\(3\) choices),
• choose \((c,d)\) arbitrarily in \((IXXI)^c(IZZI)^d\) (\(4\) choices).

Therefore

\[ \#\{\hbox{undetectable \&\ harmless}\}=12,\qquad \#\{\hbox{undetectable but logical error}\}=57-12=45 . \]

  1. Probability bookkeeping

Write

\[ T_0=(1-p)^2,\quad T_1=2(1-p)p\Bigl(\frac{3}{15}\Bigr),\quad T_{2,\;{\rm tot}}=\frac{57}{225}p^2,\quad T_{2,\;{\rm good}}=\frac{12}{225}p^2 . \]

\(T_0\) : no fault.
\(T_1\) : one fault, and it must be one of the three Pauli pairs \(\{XX,YY,ZZ\}\), hence passes post-selection and is harmless.
\(T_{2,\;{\rm tot}}\) : all undetectable double faults.
\(T_{2,\;{\rm good}}\) : those double faults that land in \(S_{\psi}\).

Success (post-selection) probability:

\[ P_{\rm acc}(p)=T_0+T_1+T_{2,\;{\rm tot}} =(1-p)^2+\frac{2}{5}p(1-p)+\frac{19}{75}p^2 . \]

Probability that the accepted state is the correct logical state:

\[ P_{\rm good}(p)=T_0+T_1+T_{2,\;{\rm good}} =(1-p)^2+\frac{2}{5}p(1-p)+\frac{4}{75}p^2 . \]

  1. Logical state fidelity (conditioned on acceptance)
\[ F_{\rm logical}(p)=\frac{P_{\rm good}(p)}{P_{\rm acc}(p)} =\frac{75-120p+49p^{2}}{75-120p+64p^{2}} =1-\frac{15p^{2}}{75-120p+64p^{2}} . \]

Expanding for small \(p\),

\[ F_{\rm logical}(p)=1-\frac{1}{5}p^{2}+O(p^{3}), \]

so all first-order (\(\propto p\)) logical errors are removed by the post-selection; the first non-vanishing term is quadratic in the physical error rate.


Final Answer:
The logical two-qubit fidelity of the post-selected output state is

\[ \boxed{\,F_{\text{logical}}(p)= \dfrac{75-120\,p+49\,p^{2}} {75-120\,p+64\,p^{2}} =1-\frac{15\,p^{2}}{75-120\,p+64\,p^{2}}\,} \]

and, for small physical error probabilities,

\[ F_{\text{logical}}(p)=1-\frac{1}{5}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 + 49*p**2) / (75 - 120*p + 64*p**2)
    # ---------------------------------------------------------------

    return F_logical