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

Step-by-Step Derivation

  1. Ideal (error–free) state prepared by the circuit
    Apply the gates, right-to-left, on the computational basis state
    \(|0000\rangle_{0123}\).

\(H_{2}: \; |0000\rangle\;\longrightarrow\; \dfrac{|0000\rangle+|0010\rangle}{\sqrt 2}\)

\(CNOT_{21}\;(2\!\to\!1):\)

 $\dfrac{|0000\rangle+|0010\rangle}{\sqrt 2}
    \longrightarrow
    \dfrac{|0000\rangle+|0110\rangle}{\sqrt 2}$

\(H_{0}:\)

 $\dfrac{|0000\rangle+|0110\rangle}{\sqrt 2}
    \longrightarrow
    \dfrac{|0000\rangle+|1000\rangle
            +|0110\rangle+|1110\rangle}{2}$

\(CNOT_{03}\;(0\!\to\!3):\)

 $\dfrac{|0000\rangle+|1000\rangle
         +|0110\rangle+|1110\rangle}{2}
    \longrightarrow
    |\psi_{\text{ideal}}\rangle
    =\dfrac{|0000\rangle+|1001\rangle
             +|0110\rangle+|1111\rangle}{2}\;.$
  1. Noise model after each two-qubit gate
    After every CNOT we apply an independent two-qubit depolarising channel on the same two qubits:
\[ \]

where the sum runs over the 15 non-identity Paulis on that pair.

• First channel \(\mathcal E_{21}\) acts on qubits \((2,1)\)
• Second channel \(\mathcal E_{03}\) acts on qubits \((0,3)\)

The single–qubit Hadamards are taken to be perfect.

  1. Net Pauli error at the end of the circuit
    Because the two noisy CNOTs touch disjoint pairs, the overall error operator on the four physical qubits is a direct product
\[ P = P_{21}\otimes P_{03}, \]

where
\(P_{21}\in\{I,X,Y,Z\}^{\otimes 2}\) acts on qubits \((2,1)\) and
\(P_{03}\in\{I,X,Y,Z\}^{\otimes 2}\) acts on qubits \((0,3)\).

Each factor equals \(I\!\otimes\! I\) with probability \((1-p)\) and equals any one fixed non-identity two-qubit Pauli with probability \(p/15\).

  1. Stabiliser of the target state
    The four-qubit state \(|\psi_{\text{ideal}}\rangle\) is the unique +1 eigenstate of the stabiliser group generated by
\[ =\{I\!\!\otimes\!I\!\!\otimes\!I\!\!\otimes\!I,\; \]

Any Pauli in \(S\) leaves the state unchanged (up to an irrelevant global phase). For fidelity with the pure target state we therefore need the net error \(P\) to be one of these four elements.

  1. Probability that \(P\) is a stabiliser element

\(P = I\)
Requires \(P_{21}=II\) and \(P_{03}=II\).
Probability: \((1-p)^2\).

\(P = XXXX\)
Requires \(P_{21}=XX\) and \(P_{03}=XX\).
Probability: \((p/15)^2\).

\(P = ZZZZ\)
Requires \(P_{21}=ZZ\) and \(P_{03}=ZZ\).
Probability: \((p/15)^2\).

\(P = YYYY\)
Requires \(P_{21}=YY\) and \(P_{03}=YY\).
Probability: \((p/15)^2\).

Summing these mutually exclusive cases,

\[ \Pr(P\in S)= (1-p)^2 + 3\left(\frac{p}{15}\right)^2. \]
  1. Physical state fidelity
    The output density matrix is a classical mixture over all error realisations. Its fidelity with the target pure state is exactly the probability that the realised Pauli lies in \(S\):
\[ (1-p)^2 + 3\frac{p^2}{225} \]

This expression is exact – there are only two noisy gates, so no higher powers of \(p\) appear.

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

\[ F_{\text{phys}}(p)=1-2p+\frac{76}{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

  1. Ideal logical target
    After the (perfect) circuit
\[ \left(CNOT_{03}\right)\!\left(H_{0}\right)\!\left(CNOT_{21}\right)\!\left(H_{2}\right) \]

is executed on the computational vacuum \(|0000\rangle_{0123}\) the code qubits are in the physical state

\[ \]

which is the encoded Bell state
\(\bigl(|00\rangle_{AB}+|11\rangle_{AB}\bigr)/\sqrt2\).

  1. Error model (per two–qubit gate)
    A two–qubit depolarising channel acts after each CNOT:
\[ (1-p)\rho+\frac{p}{15}\! \]

where \(\mathcal P_{ij}\) is the 16-element Pauli set on qubits \(\{i,j\}\). The two error operators are independent:

\(P_{21}\) acts on qubits \((2,1)\) (after \(CNOT_{21}\))
\(P_{03}\) acts on qubits \((0,3)\) (after \(CNOT_{03}\))

The net physical error is the four–qubit Pauli
\(P=P_{21}P_{03}\).

  1. Detectable versus undetectable errors
    The code stabilisers are
\[ S_X=XXXX,\qquad S_Z=ZZZZ. \]

A Pauli commutes with both \(S_X\) and \(S_Z\) (i.e. produces the all-zero syndrome) iff on every qubit pair its two letters are identical:

\[ \quad\Longrightarrow\quad \]

Proof: write a Pauli letter as the binary vector \((f_1,f_2)\) with
\(f_1(l)=1\) for \(l\in\{Y,Z\}\), \(f_2(l)=1\) for \(l\in\{X,Y\}\). A two-qubit Pauli commutes with \(S_X\) (\(S_Z\)) when the parity of \(f_1\) (\(f_2\)) across the pair is even. Only the four elements of \(\mathcal C\) satisfy both parity constraints.

Hence

• “accept” (no detected error) ⇔ \(P_{21},P_{03}\in\mathcal C\) or they lie in the same other parity class;
• “good” (no logical damage) ⇔ \(P_{21},P_{03}\in\mathcal C\).

  1. Probabilities for one noisy gate
\[ \]

Therefore

\[ \]
\[ {\textstyle\hbox{same parity class}}\bigr) \]

Define

\[ \]
  1. Acceptance probability
    The syndrome is trivial when the two parity‐class vectors add to zero. Because the four classes are equally likely apart from the weight \(\alpha\) of \(\mathcal C\) we get
\[ =\alpha^{2}+3\beta^{2} \]
  1. Logical–error-free (“good”) probability
    The logical Bell state is stabilised by
    \(X_{A}X_{B}=IXXI\) and \(Z_{A}Z_{B}=IZZI\). Multiplying these with the code stabilisers produces the 16-element set
\[ \mathcal G=\langle XXXX,\,ZZZZ,\,IXXI,\,IZZI\rangle. \]

Any \(P\in\mathcal G\) leaves \(|\psi_{\mathrm{ideal}}\rangle\) (and therefore the logical state) unchanged. All such \(P\) arise exactly when both two-qubit errors lie in \(\mathcal C\). Hence

\[ \]
  1. Logical fidelity after post-selection
    By definition
\[ =\frac{P_{\mathrm{good}}}{P_{\mathrm{acc}}} =\frac{\alpha^{2}} {\alpha^{2}+3\beta^{2}} =\frac{1-\dfrac{8p}{5}+\dfrac{16}{25}p^{2}} \]

Multiplying numerator and denominator by 75 gives a compact polynomial ratio,

\[ =\frac{75-120p+48p^{2}} \]

Series expansion for small \(p\):

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

i.e. the leading logical infidelity is second order in the physical gate error, as expected for a distance-2 error-detection code with post-selection.

Final Answer: The logical two-qubit state fidelity after post-selecting on a trivial syndrome is

\[ F_{\mathrm{logical}}(p)= \frac{75-120\,p+48\,p^{2}}{75-120\,p+64\,p^{2}} \;=\; 1-\frac{16}{75}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 + 48*p**2) / (75 - 120*p + 64*p**2)
    # ---------------------------------------------------------------

    return F_logical