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. Step–by–Step Derivation

a) Ideal (error–free) state produced by the circuit

Start from the computational vacuum \(\lvert0000\rangle_{0123}\).

  1. \(H_2\)
\[ \frac{1}{\sqrt2}\left(\lvert0000\rangle+\lvert0010\rangle\right). \]
  1. \(CNOT_{21}\) (control 2, target 1)
\[ \frac{1}{\sqrt2}\left(\lvert0000\rangle+\lvert0110\rangle\right). \]

Qubits 2 and 1 are now in the Bell state

\[ \lvert\Phi^{+}\rangle_{21}=\frac{\lvert00\rangle+\lvert11\rangle}{\sqrt2}. \]
  1. \(H_0\)
\[ \frac{1}{2}\bigl(\lvert0000\rangle+\lvert1000\rangle+\lvert0110\rangle+\lvert1110\rangle\bigr). \]
  1. \(CNOT_{03}\) (control 0, target 3)
\[ \]

Write the four–qubit state as a tensor product of two Bell states

\[ \boxed{\; \lvert\psi_{\mathrm{ideal}}\rangle =\lvert\Phi^{+}\rangle_{21}\;\otimes\;\lvert\Phi^{+}\rangle_{03}}, \qquad \lvert\Phi^{+}\rangle=\frac{\lvert00\rangle+\lvert11\rangle}{\sqrt2}. \]

Thus qubits (2,1) form one Bell pair, and qubits (0,3) a second, completely independent Bell pair.


b) Two–qubit depolarizing channel on a Bell pair

For each CNOT gate, an independent depolarizing channel

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

acts on the same two qubits as the gate.

For a Bell state, only the three two–qubit Paulis

\[ \{X\otimes X,\; Y\otimes Y,\; Z\otimes Z\} \]

(stabilizer generators of \(\lvert\Phi^{+}\rangle\)) leave the state unchanged, i.e.
\(P\lvert\Phi^{+}\rangle=\pm\lvert\Phi^{+}\rangle\) and therefore
\(|\langle\Phi^{+}|P|\Phi^{+}\rangle|^{2}=1\).
All other 12 non-identity Paulis give zero overlap.

Hence, when the channel acts on one Bell pair,

• probability that no error or a “harmless’’ error occurs

\[ (1-p)\;+\;p\frac{3}{15}=1-\frac{4p}{5}, \]

• probability that a “harmful’’ error occurs

\[ p\frac{12}{15}=\frac{4p}{5}. \]

Consequently, the state-fidelity of a single Bell pair after the channel is

\[ F_{\text{pair}}(p)=1-\frac{4p}{5}. \]

c) Fidelity for the whole 4-qubit state

• The first depolarizing channel acts only on qubits (2,1).
• The second channel acts only on qubits (0,3).

Because the two Bell pairs are independent and the error events are independent, the total fidelity is the product of the pair fidelities:

\[ F_{\text{total}}(p)=\bigl(1-\tfrac{4p}{5}\bigr)^2. \]

Expanding,

\[ \boxed{\,F_{\text{total}}(p)=1-\frac{8}{5}\,p+\frac{16}{25}\,p^{2}\,}. \]

2. Conventions and Units

No dimensional quantities appear; \(p\) is a dimensionless physical-gate error probability.


Final Answer:
The physical four-qubit state fidelity after the complete preparation circuit is

\[ F(p)=\bigl(1-\tfrac{4}{5}p\bigr)^{2}=1-\frac{8}{5}p+\frac{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

Step–by–Step Derivation

Throughout this sub-problem
\(p\) = physical two–qubit depolarising probability per CNOT.
• Only the two CNOTs, \(CNOT_{21}\) and \(CNOT_{03}\), are faulty; the single–qubit \(H\) gates are taken to be perfect.
• After the circuit finishes we measure the two stabilisers

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

and keep the run ( “post–select’’ ) only when both outcomes are \(+1\).
• Logical fidelity is then

\[ \Pr\!\bigl[\hbox{final logical state }= |\Phi^+\rangle_{AB}\, \bigl|\, \text{accepted}\bigr], \qquad |\Phi^+\rangle_{AB}= \tfrac{|00\rangle_{AB}+|11\rangle_{AB}}{\sqrt2}. \]

  1. Classification of a single two–qubit Pauli error

For one CNOT a depolarising channel \(\mathcal D_p\) acts on the same two qubits.
After the gate the error operator \(E\) is

\(E = I\) with probability \(1-p\),

• one of the \(15\) non–identity Paulis, each with probability \(p/15\).

For every such \(E\) record the commutation parities

\[ c_Z(E)= \begin{cases} 0 & \text{if }E\text{ commutes with }S_Z,\\ 1 & \text{if }E\text{ anticommutes with }S_Z, \end{cases} \qquad c_X(E)= \begin{cases} 0 & \text{if }E\text{ commutes with }S_X,\\ 1 & \text{if }E\text{ anticommutes with }S_X. \end{cases} \]

Enumerating the 16 two-qubit Paulis gives four equally sized classes

(Class label \(\equiv (c_Z,c_X)\)):  0 = (0,0), 1 = (1,0), 2 = (0,1), 3 = (1,1)

Probabilities for a single gate

\[ \begin{aligned} P_0 &= (1-p)+3\frac{p}{15}=1-\frac{4p}{5},\\ P_1 &=P_2=P_3 = 4\frac{p}{15}. \end{aligned} \tag{1} \]

  1. Two faulty CNOTs: acceptance probability

Errors after the first and second CNOT are \(E_1,E_2\) (independent).
After both have occurred the combined error is \(E_{\text{tot}}=E_2E_1\).

Because \(E_1\) acts only on qubits (2,1) and \(E_2\) only on (0,3),
the commutation signs add mod 2:

\[ c_{Z,X}(E_{\text{tot}})=c_{Z,X}(E_1)\oplus c_{Z,X}(E_2). \]

“Accept’’ \(\Longleftrightarrow\) \(c_Z(E_{\text{tot}})=c_X(E_{\text{tot}})=0\),
which happens iff the two individual errors belong to the same class.
Hence

\[ P_{\text{acc}}(p)=\sum_{i=0}^{3}P_i^2 \,=\,\bigl(1-\tfrac{4p}{5}\bigr)^2 +3\Bigl(\tfrac{4p}{15}\Bigr)^2 =1-\frac{8p}{5}+\frac{64p^{2}}{75}. \tag{2} \]

  1. Logical effect of the accepted errors

(a) Class 0 operators (commute with both stabilisers) are

\[ \{I,\,X\!X,\,Y\!Y,\,Z\!Z\} \]
on the relevant qubit pair.  On qubits $(1,2)$ they equal, inside the code space,
\[ I,\;X_A X_B,\;Y_A Y_B,\;Z_A Z_B, \]
and on qubits $(0,3)$ they are the same up to the stabiliser $S_X$.  
Therefore **any product of two class-0 operators is**
\[ S\;\bigl\{I,\,X_A X_B,\,Y_A Y_B,\,Z_A Z_B\bigr\},\qquad S\in\langle S_X,S_Z\rangle, \]
i.e. it either does nothing or multiplies the logical state by a
stabiliser of $|\Phi^+\rangle_{AB}$.  These cases give unit overlap with
the target state.

(b) Accepted errors from classes 1, 2 or 3 always act as a single-qubit logical Pauli (\(X_A,\,Z_A,\,X_B,\,Z_B\) or their products).
Each maps \(|\Phi^+\rangle_{AB}\) to an orthogonal Bell state, giving zero overlap.

Consequently the conditional logical fidelity is

\[ F_{\text{log}}(p)= \frac{\Pr\!\left[\text{both errors in class }0\right]} {P_{\text{acc}}(p)} =\frac{P_0^{\,2}}{P_{\text{acc}}(p)}. \tag{3} \]

  1. Putting the algebra together

Insert (1) and (2) into (3):

\[ \boxed{F_{\text{log}}(p)= \frac{\bigl(1-\tfrac{4}{5}p\bigr)^{2}} {\bigl(1-\tfrac{4}{5}p\bigr)^{2}+\,\dfrac{16}{75}p^{2}} =\frac{75-120p+48p^{2}}{75-120p+64p^{2}} }. \]

Series expansion for small \(p\) (notice the absence of a linear term):

\[ F_{\text{log}}(p)=1-\frac{16}{75}p^{2}+O(p^{3}). \]

Final Answer:
After post-selecting on the \([[4,2,2]]\) code stabilisers, the logical two-qubit state fidelity is

\[ F_{\text{logical}}(p)= \frac{\bigl(1-\tfrac{4}{5}p\bigr)^{2}} {\bigl(1-\tfrac{4}{5}p\bigr)^{2}+\,\dfrac{16}{75}\,p^{2}} =\frac{75-120p+48p^{2}}{75-120p+64p^{2}}. \]
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 + 48*p**2) / (75 - 120*p + 64*p**2)
    # ---------------------------------------------------------------

    return F_logical