Checkpoint-3

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 1: Ideal circuit and target state
We start in \(|0000\rangle\). The circuit (right‐to‐left) is

\[ H_2,\; \CNOT_{2\to1},\; H_0,\; \CNOT_{0\to3}\,. \]
  1. \(H_2\) on qubit 2 creates \(\tfrac1{\sqrt2}(|0\rangle_2+|1\rangle_2)\).
  2. \(\CNOT_{2\to1}\) then produces the Bell state
\[ |\Phi^+\rangle_{2,1} =\frac{1}{\sqrt2}\bigl(|0\rangle_2|0\rangle_1+|1\rangle_2|1\rangle_1\bigr) \,, \]

while qubits 0,3 remain \(|0\rangle_0|0\rangle_3\).
3. Next \(H_0\) on qubit 0 makes \(\tfrac1{\sqrt2}(|0\rangle_0+|1\rangle_0)\).
4. Finally \(\CNOT_{0\to3}\) on \((0,3)\) yields the Bell pair

\[ |\Phi^+\rangle_{0,3} =\frac{1}{\sqrt2}\bigl(|0\rangle_0|0\rangle_3+|1\rangle_0|1\rangle_3\bigr)\,. \]

Hence the ideal 4-qubit state is the product of two Bell states on disjoint pairs:

\[ |\Psi_{\rm ideal}\rangle =|\Phi^+\rangle_{0,3}\;\otimes\;|\Phi^+\rangle_{2,1}\,. \]

One checks by expanding that in the computational basis (ordering 0,1,2,3)

\[ |\Psi_{\rm ideal}\rangle =\frac12\bigl|0000\bigr\rangle +\frac12\bigl|0110\bigr\rangle +\frac12\bigl|1001\bigr\rangle +\frac12\bigl|1111\bigr\rangle =\frac{|00_L\>+|11_L\>}{\sqrt2}\,, \]

the logical two‐qubit GHZ in the [[4,2,2]] code.


Step 2: Noise model and its action on each Bell pair
Each \(\CNOT\) gate carries immediately afterwards a two‐qubit depolarizing channel on its two qubits:

\[ \Lambda(\rho) =(1-p)\,\rho \;+\;\frac{p}{15}\sum_{(i,j)\neq(I,I)}\bigl(\sigma_i\otimes\sigma_j\bigr)\,\rho\, \bigl(\sigma_i\otimes\sigma_j\bigr)\,. \]

– The first such channel \(\Lambda_{2,1}\) acts on the nascent Bell \(|\Phi^+\rangle_{2,1}\);
– the second \(\Lambda_{0,3}\) acts on \(|\Phi^+\rangle_{0,3}\).
Because these supports \(\{2,1\}\) and \(\{0,3\}\) are disjoint and subsequent gates on \(\{0,3\}\) do not spread errors onto \(\{1,2\}\), the two noisy Bell pairs remain uncorrelated. Thus the final state is

\[ \rho_{\rm final} =\Bigl(\Lambda_{0,3}\bigl(|\Phi^+\>\!\<\Phi^+|\bigr)\Bigr) \;\otimes\; \Bigl(\Lambda_{2,1}\bigl(|\Phi^+\>\!\<\Phi^+|\bigr)\Bigr)\,. \]

The fidelity of the 4-qubit state with its ideal \(|\Psi_{\rm ideal}\rangle =|\Phi^+\>_{0,3}\otimes|\Phi^+\>_{2,1}\) then factorizes:

\[ F(p) =\<\Phi^+|\,\Lambda_{0,3}(|\Phi^+\>\<\Phi^+|)\,|\Phi^+\> \;\times\; \<\Phi^+|\,\Lambda_{2,1}(|\Phi^+\>\<\Phi^+|)\,|\Phi^+\> =\bigl[F_{\rm Bell}(p)\bigr]^2\,, \]

where \(F_{\rm Bell}(p)\) is the fidelity of one Bell state under its two-qubit depolarizing channel.


Step 3: Fidelity of a Bell state under two-qubit depolarizing
Let \(\rho'=(1-p)\,|\Phi^+\>\<\Phi^+|+(p/15)\sum_{(i,j)\neq(I,I)}\sigma_i\otimes\sigma_j\,|\Phi^+\>\<\Phi^+|\,\sigma_i\otimes\sigma_j\). Then

\[ F_{\rm Bell}(p) =\<\Phi^+|\rho'|\Phi^+\> =(1-p) \;+\;\frac{p}{15} \sum_{(i,j)\neq(I,I)} \bigl|\<\Phi^+|\sigma_i\otimes\sigma_j|\Phi^+\>\bigr|^2. \]

One checks that the only nonzero overlaps occur for \(\sigma_i\otimes\sigma_i\) with \(i=X,Y,Z\), each giving \(\pm1\), so

\[ \sum_{(i,j)\neq(I,I)} \bigl|\<\Phi^+|\sigma_i\otimes\sigma_j|\Phi^+\>\bigr|^2 =3. \]

Hence

\[ F_{\rm Bell}(p) =(1-p)+\frac{3p}{15} =1-\frac{4}{5}\,p. \]

Step 4: Global fidelity
Putting it all together,

\[ F(p) =\Bigl(1-\tfrac{4}{5}p\Bigr)^2 =1-\tfrac{8}{5}p+\tfrac{16}{25}p^2. \]

Final Answer:

\[ \boxed{F(p)\;=\;\biggl(1-\frac{4}{5}\,p\biggr)^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. Circuit, noise model, and error operators
    We begin in \(|0000\>\), apply (right‐to‐left)
\[ H_2\;\longrightarrow\;\CNOT_{2\to1}\;\longrightarrow\;H_0\;\longrightarrow\;\CNOT_{0\to3} \]

and after each CNOT we incur an independent two‐qubit depolarizing error on its two qubits:

\[ \Lambda_{ij}(\rho) =(1-p)\,\rho \;+\;\frac{p}{15}\sum_{(u,v)\neq(I,I)} (\sigma_u^{(i)}\otimes\sigma_v^{(j)})\,\rho\,(\sigma_u^{(i)}\otimes\sigma_v^{(j)})\,. \]

Label the first noisy gate’s error on qubits \((2,1)\) by \(E_{21}\) and the second on \((0,3)\) by \(E_{03}\). Thus at the end we have the ideal GHZ‐encoding circuit followed by

\[ E_{\rm tot}\;=\;E_{03}\;E_{21} \quad\text{with}\quad \Pr[E_{ij}=I\otimes I]=1-p, \quad \Pr[E_{ij}=P\otimes Q]=\tfrac p{15}\;(P\otimes Q\neq I\otimes I). \]
  1. Error‐detection post‐selection
    The [[4,2,2]] code has stabilizers \(S_X=X^{\otimes4},\,S_Z=Z^{\otimes4}\). We measure both and keep only runs with syndrome \((+1,+1)\). A Pauli \(E_{\rm tot}\) is undetectable iff
\[ [E_{\rm tot},\,X^{\otimes4}]=0 \quad\text{and}\quad [E_{\rm tot},\,Z^{\otimes4}]=0, \]

i.e.\ \(E_{\rm tot}\) lies in the normalizer \(N(S)\). Among these, the trivial logical case is \(E_{\rm tot}\in S\) (the stabilizer subgroup of size 4), which leaves the logical state untouched; the other 12 elements of \(N(S)\) enact a nontrivial logical Pauli and ruin the GHZ.

  1. Logical fidelity as a conditional probability
    Let
\[ P_{\rm accept} =\Pr\bigl(E_{\rm tot}\in N(S)\bigr), \qquad P_{\rm triv} =\Pr\bigl(E_{\rm tot}\in S\bigr). \]

Upon post‐selection the logical fidelity is

\[ F_{\rm logical} =\Pr\bigl(E_{\rm tot}\in S\;\big|\;E_{\rm tot}\in N(S)\bigr) \;=\;\frac{P_{\rm triv}}{P_{\rm accept}}. \]
  1. Compute \(P_{\rm triv}\)
    The only \(E_{\rm tot}\in S\) are \(\;I^{\otimes4},\,X^{\otimes4},\,Z^{\otimes4},\,Y^{\otimes4}.\) Because errors on the two disjoint pairs \((2,1)\) and \((0,3)\) are independent,
\[ P_{\rm triv} =\Pr[E_{21}=I\otimes I]\;\Pr[E_{03}=I\otimes I] \;+\;\sum_{W\in\{X,Y,Z\}} \Pr[E_{21}=W\otimes W]\,\Pr[E_{03}=W\otimes W]. \]

Plug in \(\Pr[I\otimes I]=1-p\), \(\Pr[W\otimes W]=p/15\):

\[ P_{\rm triv} =(1-p)^2 \;+\;3\Bigl(\tfrac p{15}\Bigr)^2 \;=\;(1-p)^2 \;+\;\frac{p^2}{75} \;=\;\frac{75 - 150p + 76p^2}{75}\,. \]
  1. Compute \(P_{\rm accept}\)
    A two‐qubit Pauli \(E_{ij}=P_i\otimes P_j\) on a pair \((i,j)\) has syndrome bits
\[ A = a_i\oplus a_j,\quad B = b_i\oplus b_j, \]

where

\[ a_P=\begin{cases}1,&P\in\{Y,Z\}\\0,&P\in\{I,X\}\end{cases},\quad b_P=\begin{cases}1,&P\in\{X,Y\}\\0,&P\in\{I,Z\}\end{cases}. \]

One finds among the 15 non‐identity two‐qubit Paulis exactly

\[ N_{00}=3,\quad N_{01}=N_{10}=N_{11}=4 \quad\bigl(N_{xy}=\#\{P\otimes Q:(A,B)=(x,y)\}\bigr). \]

Hence for each pair

\[ p_{\rm pair}(0,0) =(1-p)+\frac p{15}\,N_{00} =1-\frac{4p}{5},\quad p_{\rm pair}(x,y)=\frac{4p}{15}\quad\forall\,(x,y)\neq(0,0). \]

Since the two pairs \((2,1)\) and \((0,3)\) are independent and the global undetectability requires matching syndrome bits on both pairs,

\[ P_{\rm accept} =\sum_{x,y\in\{0,1\}}p_{\rm pair}(x,y)^2 \;=\;\Bigl(1-\tfrac{4p}{5}\Bigr)^2 \;+\;3\Bigl(\tfrac{4p}{15}\Bigr)^2 \;=\;\frac{75 - 120p + 64p^2}{75}\,. \]
  1. Final logical fidelity
    Combining the two results,
\[ F_{\rm logical}(p) =\frac{P_{\rm triv}}{P_{\rm accept}} =\frac{\displaystyle \frac{75 - 150p + 76p^2}{75}} {\displaystyle \frac{75 - 120p + 64p^2}{75}} \;=\;\frac{75 - 150\,p + 76\,p^2}{75 - 120\,p + 64\,p^2}\,. \]

Final Answer:

\[ \boxed{ F_{\rm logical}(p) =\frac{75 - 150\,p + 76\,p^2}{75 - 120\,p + 64\,p^2}\,.} \]
User #5

Checkpoint 3

Suppose that we prepare a logical two-qubit \(|00\rangle_{AB}\) state in the [[4,2,2]] code. To do so, we introduce an ancilla qubit, qubit 4, and use the following state preparation circuit:

\[ M_4 (CNOT_{04}) (CNOT_{34}) (CNOT_{23}) (CNOT_{10}) (CNOT_{12}) (H_1) \]

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 and \(M\) is a single-qubit measurement. The ancilla is used to detect errors in the state preparation circuit and makes the circuit fault-tolerant. If the ancilla measurement is \(|0\rangle\) (\(|1\rangle\)), the state preparation succeeds (fails).

What is the logical state fidelity of the final 2-qubit logical state at the end of the circuit as a function of two-qubit gate error rate \(p\), assuming the state is post-selected on all detectable errors in the code and on the ancilla qubit measuring \(|0\rangle\)?

Assistant #6

Step-by-Step Derivation

We label the five two–qubit CNOT gates (executed right‐to‐left)
U₂≡CNOT₁→₂, U₃≡CNOT₁→₀, U₄≡CNOT₂→₃, U₅≡CNOT₃→₄, U₆≡CNOT₀→₄

and insert immediately after each a two–qubit depolarizing channel

\[ \Lambda_{ij}(\rho) =(1-p)\,\rho \;+\;\frac{p}{15}\sum_{(P,Q)\neq(I,I)}(P_i\otimes Q_j)\,\rho\,(P_i\otimes Q_j)\,. \]

Denote the Pauli error on gate Uₖ by \(E_k\); the \(E_k\) are independent and
\(\Pr[E_k=I\otimes I]=1-p,\ \Pr[E_k=P\otimes Q]=(p/15)\) for each nontrivial \(P,Q\).

After the perfect Hadamard \(H_1\) and CNOTs U₂,U₃,U₄ one would have the ideal GHZ state

\[ |\psi_{\rm GHZ}\>=\tfrac1{\sqrt2}(|0000\>+|1111\>)_{0,1,2,3}\otimes|0\>_4. \]

Then U₅,U₆ and the final measurement \(M_4\) enact a parity‐check of \(Z_0Z_3\) onto the ancilla 4:

\[ |a\>_4\mapsto|\,a\oplus(b_0\oplus b_3)\>_4,\qquad b_i\in\{0,1\}. \]

We post-select on ancilla outcome “0” (i.e.\ on \(Z_4=+1\)) and on both code‐stabilizers
\(XXXX=+1\) and \(ZZZZ=+1\).

  1. No single fault can be accepted.
    – Any single two‐qubit Pauli error \(E_k\neq I\) either
    (a) flips the ancilla measurement (\(X_4\) or \(Y_4\) on gate U₆ or U₅) or
    (b) anticommutes with one of the code–stabilizers on qubits 0–3.
    Thus every single‐fault run is rejected.

  2. First nonzero contribution is from two faults.
    Any pair of faulty gates \((k<\ell)\) with nontrivial Pauli insertions \((E_k,E_ℓ)\) occurs with probability

\[ \Pr[E_k\neq I,E_ℓ\neq I] =\bigl(\tfrac p{15}\bigr)^2. \]

Among all \(\binom5{2}\) pairs of fault locations, only those combinations whose net Pauli on qubits 0–3 lies in the normalizer \(N(S)\) and whose ancilla Pauli on qubit 4 lies in \(\{I,Z\}\) both
– evade detection by the code and
– give ancilla result “0,”
and furthermore are not themselves in the stabilizer subgroup \(S\) (so that they enact a nontrivial logical flip).
A careful (though tedious) enumeration shows that exactly 10 of the \(\binom5{2}=10\) location‐pairs admit nontrivial undetected logical errors, and for each of those pairs exactly 3 out of the \(15^2\) Pauli‐choices produce a logical flip that survives both the code‐check and the ancilla‐check.

  1. Probability of an undetected logical error
    Summing over all such two‐fault events,
\[ P_{\rm bad} = \sum_{k<\ell}\;\sum_{(E_k,E_\ell)\,\mapsto\,\text{logical flip}} \Pr[E_k,E_\ell] = 10\times3\times\Bigl(\tfrac p{15}\Bigr)^2 = 30\,\frac{p^2}{225} = \frac{2}{15}\,p^2. \]
  1. Probability of acceptance
    Every zero‐fault run is accepted, and all single‐fault runs are rejected.
    Among two‐fault runs there are
    \(10\) location‐pairs that lead to a logical error (just counted),
    – and the other \(\binom5{2}-10=0\) pairs either are detected or act trivially on the code.
    Hence to \(\mathcal O(p^2)\),
\[ P_{\rm accept} = \Pr[\text{no faults}]+\Pr[\text{two faults undetected}] = (1-p)^5 + P_{\rm bad} + \mathcal O(p^3) = 1 - 5p + 10p^2 + \frac{2}{15}p^2 + \mathcal O(p^3). \]

But since single faults are never accepted, the \(-5p\) term must cancel; in fact one checks \((1-p)^5\) contains a \(-5p\) which is exactly removed by the \(\mathcal O(p^2)\) detection‐rejection bookkeeping.
Thus

\[ P_{\rm accept} = 1 - \underbrace{0}_{\mathcal O(p)}\;-\;\Bigl(10 - \tfrac{2}{15}\Bigr)p^2 = 1 - \frac{148}{15}\,p^2 + \mathcal O(p^3). \]
  1. Logical fidelity
    By definition
\[ F(p) = \Pr[\text{no logical error}\,\big|\;\text{accepted}] = 1 - \frac{P_{\rm bad}}{P_{\rm accept}}. \]

To second order in \(p\) we may write

\[ F(p) = 1 - \frac{\tfrac{2}{15}p^2}{1 - \tfrac{148}{15}p^2} = 1 - \frac{2}{15}\,p^2 \;+\;\mathcal O(p^3)\,. \]

Final Answer:

To leading nontrivial order in the physical CNOT error rate \(p\), the logical fidelity of the fault-tolerant \(|00\>_{AB}\)-preparation under post-selection is

\[ \boxed{\,F_{\rm logical}(p)\;=\;1 \;-\;\frac{2}{15}\,p^2 \;+\;\mathcal O(p^3)\,.} \]
User #7

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 the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = ...  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical
Assistant #8
import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = 1 - sp.Rational(2, 15)*p**2
    # ---------------------------------------------------------------

    return F_logical