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

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

1. Step–by–Step Derivation

  1. Ideal (error-free) circuit action
    • Start in the computational vacuum \(\lvert0000\rangle_{0\,1\,2\,3}\).
    \(H_2 \;CNOT_{21}\) creates a Bell pair on qubits 2 & 1
\[ \frac{1}{\sqrt2}\bigl(\lvert0000\rangle+\lvert0110\rangle\bigr). \]

\(H_0 \;CNOT_{03}\) then creates a Bell pair on qubits 0 & 3, giving the final ideal state

\[ =\frac{1}{2}\Bigl( \lvert0000\rangle+\lvert0110\rangle +\lvert1001\rangle+\lvert1111\rangle \Bigr) \]
 where $\lvert\Phi^+\rangle=(\lvert00\rangle+\lvert11\rangle)/\sqrt2$.

Hence the four-qubit target is a product of two identical Bell states on the disjoint pairs (0,3) and (2,1).

  1. Noise model after every CNOT
    After each two-qubit gate a depolarising channel acts on the same two qubits:
\[ \mathcal{E}_p(\rho)= (1-p)\rho+\frac{p}{15}\sum_{P\neq I}P\rho P, \]

where the sum runs over the 15 non-identity two-qubit Pauli operators \(P\in\{X,Y,Z\}^{\otimes2}\).

  1. Fidelity loss for one Bell pair
    The stabiliser of \(\lvert\Phi^+\rangle\) is \(\{II,XX,ZZ,-YY\}\).
    For any Pauli \(P\),
\[ =\begin{cases}1,&P\in\{XX,ZZ,YY\}\\ \]

Therefore, when the depolarising channel acts on a single Bell pair,

\[ F_{\text{Bell}}(p)=\langle\Phi^+|\mathcal{E}_p(|\Phi^+\rangle\langle\Phi^+|)|\Phi^+\rangle =(1-p)+\frac{p}{15}(3)=1-\tfrac{4}{5}p. \]
  1. Two independent error locations
    • The first noisy CNOT acts on qubits (2,1), affecting only the Bell pair \(\lvert\Phi^+\rangle_{21}\).
    • The second noisy CNOT acts on qubits (0,3), affecting only the Bell pair \(\lvert\Phi^+\rangle_{03}\).

Because the pairs are disjoint and the final ideal state factorises, the total four-qubit state after the whole circuit is

\[ \;\otimes\; \]
  1. Overall physical fidelity
    The fidelity with the error-free four-qubit target factorises:
\[ F_{\text{phys}}(p)= \langle\Psi_{\text{ideal}}|\rho(p)|\Psi_{\text{ideal}}\rangle =F_{\text{Bell}}(p)\times F_{\text{Bell}}(p) =\bigl(1-\tfrac{4}{5}p\bigr)^2. \]

Expanding to second order,

\[ F_{\text{phys}}(p)=1-1.6\,p+0.64\,p^{2}. \]

2. Final Answer

Final Answer:
The physical four-qubit state fidelity after the circuit, as a function of the two-qubit gate error rate \(p\), is

\[ F_{\text{phys}}(p)=\bigl(1-\tfrac{4}{5}p\bigr)^{2} =1-1.6\,p+0.64\,p^{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

  1. Error model after every CNOT
    • With probability \((1-p)\) the gate is ideal.
    • With probability \(p/15\) one of the \(15\) non–identity two-qubit Paulis is applied on the same two qubits.

  2. Detectable vs. undetectable error on the [[4,2,2]] code
    An error \(E\) escapes detection (commutes with both stabilisers \(XXXX\) and \(ZZZZ\)) iff the parities

\[ x(E)=\bigl(\text{ \# of }X\text{ or }Y\bigr)\bmod 2,\qquad z(E)=\bigl(\text{ \# of }Z\text{ or }Y\bigr)\bmod 2 \]

are both even.
Among the 15 Paulis on the two qubits of a CNOT,

\(XX,\;YY,\;ZZ\) give \((x,z)=(0,0)\) ⇒ undetectable,
• the remaining \(12\) give one of the three odd-parity patterns
\((1,0)\), \((0,1)\), \((1,1)\) ⇒ detectable.

Hence, for a single CNOT

\[ \Pr[\text{undetectable}]=3/15=\tfrac15 ,\qquad \Pr[\text{detected}]=\tfrac{12}{15}=\tfrac45 . \]
  1. Physical fidelity of one Bell pair
    The ideal Bell state \(|\Phi^{+}\rangle\) is stabilised by \(XX,YY,ZZ\), so an undetectable error does not change the state.
    Therefore the per-pair physical fidelity is
\[ F_{\text{pair}}(p)=(1-p)+\frac{p}{15}\times 3 =1-\frac{12}{15}p . \]
  1. Two noisy CNOTs – probabilities to second order in \(p\)
    For the whole 4-qubit circuit we need the joint error on the two disjoint pairs (03) and (21).

• No error: probability \((1-p)^2\).

• Exactly one faulty CNOT: probability \(2(1-p)p\).
– passes detection only if the single error is undetectable
\(\,\Rightarrow\) success probability \(2(1-p)p\,(3/15)\).

• Errors on both CNOTs: probability \(p^2\).
The two errors, chosen independently, have parities
\((x_1,z_1)\) and \((x_2,z_2)\).
Detection is passed iff \((x_1,z_1)=(x_2,z_2)\).
Using the counts
\((0,0):3,\;(1,0):4,\;(0,1):4,\;(1,1):4\)
we get

\[ \Pr[\text{pass }|\,2\text{ errors}] =\frac{3^{2}+4^{2}+4^{2}+4^{2}}{15^{2}} =\frac{57}{225}. \]
  1. Probability of passing the check
\[ P_{\text{pass}}(p)= (1-p)^2 +2(1-p)p\,\frac{3}{15} +p^{2}\frac{57}{225} =1-\tfrac85\,p+\tfrac{64}{75}p^{2}+O(p^{3}). \]
  1. Probability of being correct after passing
    The state is unchanged whenever both pairs experience either
    no error or an undetectable \((0,0)\) error.
    Thus
\[ P_{\text{correct \& pass}}(p)= (1-p)^2 +2(1-p)p\,\frac{3}{15} +p^{2}\Bigl(\frac{3}{15}\Bigr)^{2} =(1-\tfrac45 p)^{2} =1-\tfrac85\,p+\tfrac{16}{25}p^{2}+O(p^{3}). \]
  1. Logical fidelity conditioned on no detected syndrome
\[ F_{\text{logical}}(p) =\frac{P_{\text{correct \& pass}}(p)} {P_{\text{pass}}(p)} =\frac{(1-\frac45 p)^{2}} {1-\frac85 p+\frac{64}{75}p^{2}} =1-\frac{16}{75}p^{2}+O(p^{3}). \]

The linear term cancels completely: all first-order errors that escape detection act only as stabilisers, not as logical faults. Logical errors first appear at second order in the physical error rate.

Final Answer:

The logical two-qubit fidelity, conditioned on post-selecting runs with no detected syndrome, is

\[ \boxed{\,F_{\text{logical}}(p)=1-\dfrac{16}{75}\,p^{2}+O\!\bigl(p^{3}\bigr)\,}. \]

To leading order, the logical infidelity scales quadratically with the physical two-qubit-gate error rate \(p\), showing that the [[4,2,2]] code suppresses first-order faults under perfect detection.

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(16, 75) * p**2
    # ---------------------------------------------------------------

    return F_logical