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

We label the four physical qubits by 0,1,2,3, and start in the product state

\[ \rho_0 = |0000\rangle\langle0000|\,. \]

The ideal preparation circuit is

\[ U_{\rm ideal} \;=\; \Bigl(\mathrm{CNOT}_{0\to3}\Bigr)\,(H_0)\,\Bigl(\mathrm{CNOT}_{2\to1}\Bigr)\,(H_2)\,, \]

where the gates act (right‐to‐left) on \(\rho_0\). We assume only the two CNOT gates are noisy: immediately after each CNOT\(_{i\to j}\) we apply a two‐qubit depolarizing channel of error‐rate \(p\),

\[ \mathcal E^{(ij)}(\sigma) \;=\;(1-p)\,\sigma\;+\;\frac p{15}\sum_{P\in\{I,X,Y,Z\}^{\otimes2}\setminus\{I\otimes I\}} P\,\sigma\,P\,. \]

Thus the actual final state is

\[ \rho_f =\;\mathcal E^{(0,3)}\!\bigl( \mathrm{CNOT}_{0\to3}\, H_0\, \mathcal E^{(2,1)}\!\bigl(\mathrm{CNOT}_{2\to1}\,H_2\,\rho_0\,H_2^\dagger\,\mathrm{CNOT}_{2\to1}^\dagger\bigr)\, H_0^\dagger\, \mathrm{CNOT}_{0\to3}^\dagger \bigr)\,. \]

The \emph{physical‐state fidelity} is

\[ F(p)\;=\;\bigl\langle\psi_{\rm ideal}\bigr|\, \rho_f\, \bigl|\psi_{\rm ideal}\bigr\rangle \,,\qquad |\psi_{\rm ideal}\rangle =\;U_{\rm ideal}\,|0000\rangle\,. \]

1. Unitary‐covariance of the Pauli‐depolarizing channel

Because each \(\mathcal E^{(ij)}\) is a uniform average over the non‐identity two‐qubit Pauli group, it is covariant under any Clifford unitary on qubits \(i,j\). In particular for a Clifford \(V\) on \((i,j)\),

\[ V^\dagger\,\mathcal E^{(ij)}(\sigma)\,V =\mathcal E^{(ij)}\!\bigl(V^\dagger\,\sigma\,V\bigr)\,. \]

Both CNOT and \(H\) are Cliffords. Hence in the fidelity

\[ F =\Tr\Bigl[\,|\psi_{\rm ideal}\rangle\langle\psi_{\rm ideal}|\;\rho_f\Bigr] \]

we may cyclically commute the ideal unitaries \(U_{\rm ideal}\) past the \(\mathcal E\)‐channels, reducing the problem to computing the fidelity of the \emph{intermediate} pure state immediately before each noise channel.


2. State after the first two gates (before \(\mathrm{CNOT}_{0\to3}\))

Compute

\[ |\phi\rangle \;=\;\mathrm{CNOT}_{2\to1}\,H_2\,|0000\rangle. \]
  1. \(H_2\,|0000\rangle = \tfrac1{\sqrt2}(|0000\rangle + |0010\rangle)\).
  2. \(\mathrm{CNOT}_{2\to1}\) flips qubit 1 iff qubit 2=1, so
\[ |\phi\rangle =\frac1{\sqrt2}\bigl(|0\,0\,0\,0\rangle+|0\,1\,1\,0\rangle\bigr) =\;|0\!\rangle_0\;\otimes\;\frac{|00\rangle_{21}+|11\rangle_{21}}{\sqrt2}\;\otimes\;|0\!\rangle_3. \]

Thus

\[ |\phi\rangle =\;|\phi_{21}\rangle\;\otimes\;|\phi_{03}\rangle, \]

with a Bell‐state \(|\phi_{21}\rangle=|\Phi^+\rangle\) on qubits \((2,1)\) and \(|\phi_{03}\rangle=|00\rangle\) on \((0,3)\).


3. Fidelity factorizes on disjoint subsystems

Because the two noise channels act on disjoint qubit‐pairs \((2,1)\) and \((0,3)\), and the pre‐noise state \(|\phi\rangle\) is a product across that split, the total fidelity factorizes:

\[ F(p) =\bigl\langle\phi_{21}\bigr|\, \mathcal E^{(2,1)}\bigl(|\phi_{21}\rangle\langle\phi_{21}|\bigr)\, \bigl|\phi_{21}\bigr\rangle \;\times\; \bigl\langle\phi_{03}\bigr|\, \mathcal E^{(0,3)}\bigl(|\phi_{03}\rangle\langle\phi_{03}|\bigr)\, \bigl|\phi_{03}\bigr\rangle \;\equiv\;F_{21}(p)\,F_{03}(p)\,. \]

4. Single‐channel fidelities

A two‐qubit depolarizing channel \(\mathcal E\) with error‐rate \(p\) has Kraus operators

\[ K_{I}= \sqrt{1-p}\,I\,,\quad K_{P}=\sqrt{\tfrac p{15}}\,P\quad(P\neq I\text{ a 2‐qubit Pauli}), \]

and for any pure stabilizer state \(|\psi\rangle\) on 2 qubits the fidelity is

\[ \langle\psi|\mathcal E(|\psi\rangle\langle\psi|)\,|\psi\rangle =(1-p)\;+\;\frac p{15}\sum_{P\neq I} \bigl|\langle\psi|P|\psi\rangle\bigr|^2. \]

Since a 2‐qubit stabilizer state has exactly three non‐identity Pauli stabilizers, \(\langle\psi|P|\psi\rangle=\pm1\) for those 3 and \(0\) for the other 12, one finds

\[ F_{\rm stab}(p) =1-p\;+\;\frac p{15}\times3 =1-\frac{12}{15}\,p =1-\frac{4}{5}\,p. \]

In our case both subsystems are 2‐qubit stabilizer states: – \(|\phi_{21}\rangle=|\Phi^+\rangle\)
\(|\phi_{03}\rangle=|00\rangle\)
hence

\[ F_{21}(p)=1-\tfrac45p, \qquad F_{03}(p)=1-\tfrac45p. \]

5. Final expression

Therefore the physical state fidelity of the full 4‐qubit output is

\[ \boxed{% F(p)\;=\;\Bigl(1-\tfrac45\,p\Bigr)^2 \;=\;1-\frac{8}{5}\,p+\frac{16}{25}\,p^2\,.} \]

Final Answer:

\[ \boxed{F_{\rm phys}(p)=\bigl(1-\tfrac45\,p\bigr)^{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
  1. Notation and setup
    • Label physical qubits 0,1,2,3.
    • Ideal state‐preparation unitary (right‐to‐left)
\[ U = \mathrm{CNOT}_{0\to3}\;H_0\;\mathrm{CNOT}_{2\to1}\;H_2\,. \]

• After each two‐qubit CNOT\(_{i\to j}\) we insert a depolarizing channel on qubits \((i,j)\) with error‐rate \(p\):

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

• We assume the Hadamards are perfect.

  1. Error operators and post‐selection
    Because the two CNOT gates act on disjoint qubit pairs \(\{2,1\}\) and \(\{0,3\}\), and no subsequent gate couples these pairs, the two error channels produce independent Pauli errors
\[ \]

with

\[ \]

These errors commute with the ideal unitaries, so the net effect is a single Pauli

\[ E_{\rm tot}=E_1\otimes E_2\equiv P_0\otimes P_1\otimes P_2\otimes P_3 \]

on qubits \((0,1,2,3)\).

We then measure the stabilizers

\[ \]

and post‐select on both outcomes \(+1\). Equivalently we keep only those \(E_{\rm tot}\) which commute with both \(S_X\) and \(S_Z\).

  1. Logical fidelity under post‐selection
    The logical state is undisturbed exactly when \(E_{\rm tot}\) lies in the stabilizer group
\[ \mathcal S=\{\,I,\;X_0X_1X_2X_3,\;Z_0Z_1Z_2Z_3,\;Y_0Y_1Y_2Y_3\}\,. \]

Any other \(E_{\rm tot}\) that still commutes with \(S_X,S_Z\) is a nontrivial logical Pauli error and yields zero overlap with the GHZ state. Hence the conditional (post‐selected) logical fidelity is

\[ F_{\rm log}(p) =\Pr\bigl[E_{\rm tot}\in\mathcal S\;\big|\; [E_{\rm tot},S_X]=[E_{\rm tot},S_Z]=0\bigr] =\frac{P_{\rm triv}(p)}{P_{\rm succ}(p)}\,, \]

where
- \(P_{\rm triv}(p)=\Pr[E_{\rm tot}\in\mathcal S]\),
- \(P_{\rm succ}(p)=\Pr\bigl([E_{\rm tot},S_X]=[E_{\rm tot},S_Z]=0\bigr)\)
are evaluated under the product distribution on \((E_1,E_2)\).

  1. Probability of trivial (stabilizer) error
    To get \(E_{\rm tot}=I\) requires no error on either CNOT: probability \((1-p)^2\).
    To get \(E_{\rm tot}=X_0X_1X_2X_3\) requires each channel to emit the two-qubit Pauli “\(XX\)” on its pair: probability \((p/15)^2\). Similarly for \(ZZZZ\) and \(YYYY\). Hence
\[ P_{\rm triv}(p) =(1-p)^2 \;+\;3\!\left(\frac p{15}\right)^{\!2} =(1-p)^2+\frac{p^2}{75}\,. \]
  1. Probability of passing the stabilizer check
    Define for a single two-qubit error \(E\in\{I,X,Y,Z\}^{\otimes2}\) the “parity‐weight” exponents
\[ n_X(E)=\#\{\,\text{factors of }E\text{ that }\!{\in\{Z,Y\}\}\},\quad n_Z(E)=\#\{\,\text{factors of }E\text{ that }\!{\in\{X,Y\}\}\}. \]

Then \(E_{\rm tot}=E_1\otimes E_2\) commutes with \(S_X\) iff \(n_X(E_1)+n_X(E_2)\) is even, and with \(S_Z\) iff \(n_Z(E_1)+n_Z(E_2)\) is even. One shows by a two-variable Fourier (generating-function) trick that

\[ P_{\rm succ}(p) =\frac14\sum_{\eps_X,\eps_Z=\pm1} \Bigl[\;A(\eps_X,\eps_Z)\Bigr]^2, \]

where

\[ A(\eps_X,\eps_Z) =\sum_{E}\Pr[E]\;\eps_X^{\,n_X(E)}\;\eps_Z^{\,n_Z(E)} =(1-p)\;+\;\frac p{15}\Bigl[(1+\eps_X)^2(1+\eps_Z)^2-1\Bigr]. \]

Evaluating the four cases \((\eps_X,\eps_Z)=(\pm1,\pm1)\) gives

\[ A(1,1)=1, \quad A(1,-1)=A(-1,1)=A(-1,-1)=1-\frac{16}{15}p, \]

and hence

\[ P_{\rm succ}(p) =\frac14\Bigl[1+3\Bigl(1-\tfrac{16}{15}p\Bigr)^2\Bigr] =\frac{75-120p+64p^2}{75} =1-\frac{8}{5}p+\frac{64}{75}p^2. \]
  1. Final ratio
    Putting (4) and (5) together,
\[ F_{\rm log}(p) =\frac{P_{\rm triv}(p)}{P_{\rm succ}(p)} =\frac{(1-p)^2+\tfrac{p^2}{75}} {1-\tfrac{8}{5}p+\tfrac{64}{75}p^2} =\frac{75-150p+76p^2}{75-120p+64p^2}\,. \]

Final Answer:

\[ \boxed{% F_{\rm log}(p) =\frac{(1-p)^2 + \tfrac{p^2}{75}} {1 - \tfrac{8}{5}\,p + \tfrac{64}{75}\,p^2} \;=\; \frac{75 - 150\,p + 76\,p^2}{75 - 120\,p + 64\,p^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 - 150*p + 76*p**2)/(75 - 120*p + 64*p**2)
    # ---------------------------------------------------------------

    return F_logical