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 circuit action

• Start from the computational vacuum

\[ |0000\rangle_{0123}. \]

• Apply the gates in the (right-to-left) order given in the problem

\[ (CNOT_{03})\; H_0\; (CNOT_{21})\; H_2 . \]

• After the first two operations

\[ H_2 :\; |0000\rangle \;\longrightarrow\; \frac{|0\rangle_2+|1\rangle_2}{\sqrt2}\otimes|000\rangle_{013}, \]
\[ CNOT_{21} :\; \frac{|0\rangle_2|0\rangle_1+|1\rangle_2|1\rangle_1}{\sqrt2}\otimes|00\rangle_{03} = |\Phi^{+}\rangle_{21}\otimes|00\rangle_{03}, \]

where \( |\Phi^{+}\rangle\equiv (|00\rangle+|11\rangle)/\sqrt2 \).

• After the last two operations

\[ H_0:\; |00\rangle_{03}\;\longrightarrow\; \frac{|0\rangle_0+|1\rangle_0}{\sqrt2}\otimes|0\rangle_3 , \]
\[ CNOT_{03}:\; \frac{|0\rangle_0|0\rangle_3 + |1\rangle_0|1\rangle_3}{\sqrt2} = |\Phi^{+}\rangle_{03}. \]

• Hence the ideal final 4-qubit state

\[ |\psi_{\text{ideal}}\rangle = |\Phi^{+}\rangle_{21}\;\otimes\;|\Phi^{+}\rangle_{03}. \]

It is a stabilizer state whose independent generators can be chosen as

\[ \bigl\{\,Z_2Z_1,\;X_2X_1,\;Z_0Z_3,\;X_0X_3\,\bigr\}. \]
  1. Error model

• After each CNOT gate a two-qubit depolarising channel acts on the same two qubits:

\[ \mathcal{D}_{ij}^{(p)}(\rho)= (1-p)\,\rho+\frac{p}{15}\sum_{P\neq I\otimes I}P_{ij}\,\rho\,P_{ij}. \]

• There are two such channels: – \(\mathcal{D}_{21}^{(p)}\) immediately after \(CNOT_{21}\)
\(\mathcal{D}_{03}^{(p)}\) immediately after \(CNOT_{03}\).

• Denote the Pauli error applied by the first channel by \(E_{21}\)
(acting only on qubits 2 and 1) and the second by \(E_{03}\)
(acting only on qubits 0 and 3).

• Because the gates following \(E_{21}\) touch only qubits 0 and 3, the two error operators act on disjoint pairs and therefore commute. The final physical state is

\[ \rho(p)= \sum_{E_{21},E_{03}} p(E_{21})\,p(E_{03})\; E_{03}\,E_{21}\; |\psi_{\text{ideal}}\rangle\langle\psi_{\text{ideal}}|\; E_{21}\,E_{03}, \]
 where
\[ p(E)= \begin{cases} 1-p, & E=I\otimes I,\\[4pt] p/15,& \text{any of the 15 non-identity Paulis.} \end{cases} \]
  1. When does a Pauli error leave the state invariant?

• For any stabilizer state \(|\psi\rangle\), a Pauli operator \(P\) satisfies
\(\langle\psi|P|\psi\rangle=\pm1\) if \(P\) is in the stabilizer group and \(0\) otherwise, hence

\[ F=\langle\psi_{\text{ideal}}|\rho(p)|\psi_{\text{ideal}}\rangle =\sum_{E_{21},E_{03}} p(E_{21})\,p(E_{03}) \,\delta\bigl(E_{21}E_{03}\in\mathcal{S}\bigr). \]

• Because the stabilizer factors into the two Bell-pair stabilizers, \(E_{21}E_{03}\in\mathcal{S}\)\(E_{21}\in\{I,X_2X_1,Z_2Z_1,Y_2Y_1\}\) and \(E_{03}\in\{I,X_0X_3,Z_0Z_3,Y_0Y_3\}\).

• For one depolarising channel

\[ P_{\text{pair}}(E\in\text{local stabilizer}) =(1-p)+\frac{3p}{15}=1-\frac{4p}{5}. \]
  1. Physical state fidelity

• The two error channels are independent, so the total fidelity is the product of the two probabilities:

\[ F(p)=\Bigl(1-\frac{4p}{5}\Bigr)^2. \]

2. Mathematical Typesetting

All equations above are typeset in LaTeX.

3. Conventions and Units

The error rate \(p\) is dimensionless. Fidelity is dimensionless and lies in [0\le F\le1.]

4. Final Answer

Final Answer:

\[ \boxed{\,F(p)=\Bigl(1-\dfrac{4p}{5}\Bigr)^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

1. Step–by–Step Derivation

  1. Ideal encoded state

Exactly as in the previous checkpoint, in the absence of faults the circuit

\[ (CNOT_{03})\;H_0\;(CNOT_{21})\;H_2 \]

prepares the four–qubit state

\[ |\psi_{\rm id}\rangle =|\Phi^{+}\rangle_{21}\otimes|\Phi^{+}\rangle_{03},\qquad |\Phi^{+}\rangle\equiv\frac{|00\rangle+|11\rangle}{\sqrt2}, \]

which is the logical Bell state

\[ |\Psi^{+}\rangle_{AB} =\frac{|00\rangle_{AB}+|11\rangle_{AB}}{\sqrt2}. \]

The code stabilisers are

\[ S_X= X_0X_1X_2X_3,\qquad S_Z= Z_0Z_1Z_2Z_3 . \]

The logical Pauli’s (up to stabilisers) are

\[ X_A=X_0X_2,\;X_B=X_0X_1,\quad Z_A=Z_0Z_1,\;Z_B=Z_0Z_2 . \]

Hence

\[ |\Psi^{+}\rangle_{AB} \text{ is stabilised by } \{\,S_X,\;S_Z,\;X_AX_B,\;Z_AZ_B\,\}. \]
  1. Noise on the two CNOT gates

Each CNOT is followed by an independent two-qubit depolariser on the same qubits:

\[ \mathcal D^{(p)}(\rho) =(1-p)\rho+\frac{p}{15}\!\!\sum_{P\neq I\!\otimes\! I}\! P\rho P,\qquad P\in\mathcal P_2 . \]

• After the first CNOT (\(21\)) an error \(E_{21}\) acts on qubits 2 and 1.
• After the second CNOT (\(03\)) an error \(E_{03}\) acts on qubits 0 and 3.

The final physical state before syndrome measurement is

\[ \rho(p)= \sum_{E_{21},E_{03}} p(E_{21})\,p(E_{03})\; E_{03}E_{21}\, |\psi_{\rm id}\rangle\langle\psi_{\rm id}|\, E_{21}E_{03}. \]
  1. Classifying the two-qubit Paulis

For a single qubit Pauli \(P\) set

\[ c_X(P)= \begin{cases} 1 & P\in\{Z,Y\}\\ 0 & P\in\{I,X\} \end{cases},\qquad c_Z(P)= \begin{cases} 1 & P\in\{X,Y\}\\ 0 & P\in\{I,Z\}. \end{cases} \]

\(c_X(P)\,[c_Z(P)]\) tells whether \(P\) anticommutes with the all-\(X\) \([\,\)all-\(Z]\) stabiliser. For a two-qubit operator \(P\otimes Q\) define the parity vector

\[ \mathbf b(P\!\otimes\!Q)= \bigl(c_X(P)\oplus c_X(Q),\; c_Z(P)\oplus c_Z(Q)\bigr) \in\{(0,0),(0,1),(1,0),(1,1)\}. \]

Enumerating the 16 two-qubit Paulis on any fixed pair gives

• category \(\mathcal C_0\;(0,0)\) : \(\{II,\,XX,\,YY,\,ZZ\}\)
• category \(\mathcal C_1\;(0,1)\) : \(\{XI,I X,\,YZ,\,ZY\}\)
• category \(\mathcal C_2\;(1,0)\) : \(\{ZI,I Z,\,YX,\,XY\}\)
• category \(\mathcal C_3\;(1,1)\) : \(\{YI,I Y,\,XZ,\,ZX\}\)

with probabilities

\[ p_0 = 1-\frac{4p}{5},\qquad p_1=p_2=p_3=\frac{4p}{15}. \]
  1. Syndrome measurement and post-selection****

Measuring \(S_X,S_Z\) and accepting only the \(+1,+1\) outcome projects onto the codespace.
The outcome is trivial iff the parity vectors of the two pairs coincide, i.e. both errors belong to the same category \(\mathcal C_k\). Hence the success probability

\[ P_{\rm succ}(p)=p_0^{\,2}+p_1^{\,2}+p_2^{\,2}+p_3^{\,2} =(1-\tfrac{4}{5}p)^2+3\Bigl(\tfrac{4}{15}p\Bigr)^{\!2} =(1-\tfrac{4}{5}p)^2+\tfrac{16}{75}p^{2}. \]
  1. Logical action of the undetected errors

• If both pairs are in \(\mathcal C_0\) the combined operator is one of

\[ \{\,I,\;S_X,\;S_Z,\;S_XS_Z,\; X_AX_B,\;Z_AZ_B,\;Y_AY_B,\; {\rm (those\;multiplied\;by\;}S_X\!,S_Z)\}, \]
  i.e. an element of the 16-element stabiliser of
  \(|\Psi^{+}\rangle_{AB}\).  
  **It leaves the logical state unchanged.**

• If the shared category is \(\mathcal C_1,\mathcal C_2\) or \(\mathcal C_3\) the resulting operator is respectively a logical
\(X_{A/B},\,Z_{A/B}\) or \(Y_{A/B}\) (up to \(S_X,S_Z\)), all of which map \(|\Psi^{+}\rangle_{AB}\) to an orthogonal Bell state. The logical fidelity is then zero.

Therefore

\[ F_{\rm logical}(p) =\Pr[\,\text{category } \mathcal C_0\mid\text{succ}\,] =\frac{p_0^{\,2}} {p_0^{\,2}+3p_1^{\,2}} =\frac{\bigl(1-\frac{4}{5}p\bigr)^{2}} {\bigl(1-\frac{4}{5}p\bigr)^{2}+\frac{16}{75}p^{2}} . \]
  1. Small-\(p\) expansion
\[ F_{\rm logical}(p)=1-\frac{16}{75}p^{2}+O(p^{3}), \]

i.e. all undetected faults are second-order in the physical error probability, as expected for a distance-2 detection code.

2. Mathematical Typesetting

All equations have been given in LaTeX.

3. Conventions and Units

The gate error rate \(p\) is dimensionless, as is the fidelity.

4. Final Answer

Final Answer:

\[ \boxed{\,F_{\text{logical}}(p)= \dfrac{\left(1-\dfrac{4}{5}p\right)^{2}} {\left(1-\dfrac{4}{5}p\right)^{2} +\dfrac{16}{75}\,p^{2}} }\, \approx 1-\dfrac{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 = ((1 - sp.Rational(4, 5) * p) ** 2) / (
        (1 - sp.Rational(4, 5) * p) ** 2 + sp.Rational(16, 75) * p ** 2
    )
    # ---------------------------------------------------------------

    return F_logical