Checkpoint-1

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
Reasoning (model)

We are given: “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: 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\)?”

Interpretation: We have a circuit that prepares a logical state. But then we are adding errors: Each CNOT gate is followed by a two-qubit depolarizing error channel that produces one of the 15 non-identity two-qubit Paulis with equal probability p/15. So there are two CNOT gates: CNOT_{21} and CNOT_{03}. Also there are Hadamard gates: H_0 and H_2. But note: The problem says: “each CNOT_{ij} gate in the circuit has a two qubit depolarizing error channel following it”. So only CNOT gates get errors? Possibly the Hadamard gates are error-free? The problem statement: “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.” So only CNOT gates have errors. So H gates are perfect.

So circuit: The operations in order (from right to left as per note: “the quantum operations in the circuit occur in the reverse order (from right-to-left in the above equation)”. So the circuit order is: Step 1: H_2 Step 2: CNOT_{21} Step 3: H_0 Step 4: CNOT_{03}

But careful: The equation is: (CNOT_{03}) (H_0) (CNOT_{21}) (H_2). That is matrix multiplication order. So the actual circuit order: first apply H_2, then CNOT_{21}, then H_0, then CNOT_{03}. So that is the order.

We want: “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?” That means: The ideal final state (without errors) is some state. But due to errors on CNOT gates, the actual state becomes a mixture. The fidelity is the overlap between the ideal state and the actual state. But careful: “physical state fidelity” likely means the fidelity of the output state relative to the ideal state. But the output state is a density matrix due to errors. And we want the average fidelity? Possibly: The circuit is applied to initial state? Usually initial state is |0000>? But not explicitly stated. But likely: The initial state is |0000>? Because we are preparing a state. So initial state: |0> on all qubits? Typically yes. So initial state: |0\rangle^{\otimes 4}.

Then ideal circuit: H_2 on qubit 2: becomes: |0\rangle on qubits 0,1,3 and on qubit 2: H|0> = |+> = (|0>+|1>)/√2. So state: |0>0 |0>_1 (|0>+|1>)_2/√2 |0>_3. Then CNOT{21}: control qubit 2, target qubit 1. So then state: If qubit2 is 0, then qubit1 remains 0; if qubit2 is 1, then qubit1 flips. So state becomes: |0>0 (|00>+|11>)_21/√2 |0>_3? But careful: Actually: State: |0>_0 βŠ— (|0>_1|0>_2 + |0>_1|1>_2? Actually: Initially: |0>_1 and |+>_2 = (|0>+|1>)/√2. So state = |0>_0 βŠ— |0>_1 βŠ— (|0>_2+|1>_2)/√2 βŠ— |0>_3. After CNOT{21} (control=2, target=1): When qubit2=0, then qubit1 remains 0; when qubit2=1, then qubit1 becomes 1. So state becomes: |0>0 βŠ— (|0>_1|0>_2 + |1>_1|1>_2)/√2 βŠ— |0>_3. So state: (|0000> + |0110>)? Actually careful: qubits: 0,1,2,3. So: |0>_0, then qubit1 and qubit2: |00> and |11>, and qubit3: |0>. So state = (|0>_0|00>_12|0>_3 + |0>_0|11>_12|0>_3)/√2 = (|0000> + |0110>)/√2? But wait: labeling: qubit0, qubit1, qubit2, qubit3. So |0000> means qubit0=0, qubit1=0, qubit2=0, qubit3=0. And |0110> means qubit0=0, qubit1=1, qubit2=1, qubit3=0. So that is state. Then H_0: Hadamard on qubit0. So H|0> = |+> = (|0>+|1>)/√2. So state becomes: H_0 applied: State = (1/√2) * [ (|0>_0+|1>_0)/√2 |00>_12|0>_3 + (|0>_0+|1>_0)/√2 |11>_12|0>_3 ]? Actually careful: H_0 acts on qubit0. So: Before: |ψ> = (|0>_0|00>_12|0>_3 + |0>_0|11>_12|0>_3)/√2. After H_0: becomes: (H|0>_0|00>_12|0>_3 + H|0>_0|11>_12|0>_3)/√2 = (|+>_0|00>_12|0>_3 + |+>_0|11>_12|0>_3)/√2 = (1/√2)[ (|0>+|1>)_0/√2 (|00>_12|0>_3 + |11>_12|0>_3) ] = (1/2)[ |0>_0(|00>_12+|11>_12)|0>_3 + |1>_0(|00>_12+|11>_12)|0>_3 ]. So state = (|0>_0 + |1>_0)/2 * (|00>_12+|11>_12)|0>_3? Actually careful: It is: = 1/2 [ |0>_0|00>_12|0>_3 + |0>_0|11>_12|0>_3 + |1>_0|00>_12|0>_3 + |1>_0|11>_12|0>_3 ]. So state = (|0000> + |0110> + |1000> + |1110>)/2. Then CNOT{03}: control qubit 0, target qubit 3. So apply CNOT_{03}: For terms: |0000>: control=0 so target qubit3 flips? Actually control: if qubit0=1 then flip qubit3. So: |0000> -> |0000> because qubit0=0. |0110> -> |0110> because qubit0=0. |1000> -> qubit0=1 so flip qubit3: becomes |1001>. |1110> -> becomes |1111>. So final ideal state: |ψ_ideal> = (|0000> + |0110> + |1001> + |1111>)/2. But wait: Is that the logical GHZ state? The logical GHZ state for two qubits A and B is (|00>_AB + |11>_AB)/√2. But here we have 4 physical qubits. And the code is [[4,2,2]]. And the logical operators are given: X_A = XIXI, X_B=XXII, Z_A=ZZII, Z_B=ZIZI. So what are the logical basis states? They are encoded such that they are stabilized by XXXX and ZZZZ. So the code space is the subspace of 4 qubits that are +1 eigenvectors of XXXX and ZZZZ. Our state: |ψ_ideal> = (|0000>+|0110>+|1001>+|1111>)/2. Check: Apply XXXX: XXXX|0000> = |1111>? Actually XXXX on |0000> gives |1111> because flip all bits. So that is not an eigenvector unless coefficients match. But here: XXXX|ψ> = (|1111>+|1001>+|0110>+|0000>)/2 = same as |ψ>? Actually order: |ψ> = (|0000> + |0110> + |1001> + |1111>)/2. XXXX|ψ> = (XXXX|0000> + XXXX|0110> + XXXX|1001> + XXXX|1111>)/2 = (|1111> + |1001> + |0110> + |0000>)/2 = same. So it is symmetric. And ZZZZ: ZZZZ|ψ> = (1 +? Actually ZZZZ on each basis: |0000>: all zeros, so eigenvalue +1. |0110>: qubits: 0,1,1,0. Z on each: gives phases: qubit0: +1, qubit1: -1, qubit2: -1, qubit3: +1, product = +1. |1001>: qubits: 1,0,0,1: phases: -1, +1, +1, -1 = +1. |1111>: all ones: product of -1’s: (-1)^4 = +1. So indeed it is in the code space. And then what are the logical states? The logical operators: X_A = XIXI. Apply X_A to |ψ>: X_A|0000> = |0100>? That is not in the basis. But maybe we don’t need to check. But the problem says: “logical two-qubit GHZ state (|00>_AB+|11>_AB)/√2”. So that state is indeed an entangled state between the two logical qubits. So it’s fine.

So ideal state: |ψ_ideal> = (|0000>+|0110>+|1001>+|1111>)/2.

Now, we have errors on CNOT gates. There are two CNOT gates: CNOT_{21} and CNOT_{03}. Each CNOT gate is followed by a depolarizing error channel on the two qubits involved. That error channel: With probability 1-p, no error. With probability p, an error occurs. And if an error occurs, it is uniformly distributed among the 15 non-identity two-qubit Pauli operators on those two qubits. So each CNOT gate’s error channel: After applying CNOT, then apply with probability p/15 each of the 15 Paulis on the two qubits (the ones that are involved in the CNOT). But careful: The error channel is applied after the CNOT gate. So the overall circuit with errors: Start with |0000>. Apply H_2 (perfect). Then apply CNOT_{21} (perfect) followed by error channel on qubits 2 and 1. That error channel: It applies a Pauli error E from the set {I, X, Y, Z} βŠ— {I, X, Y, Z} minus identity? Actually: “produces one of the 15 non-identity two-qubit Paulis with equal probability p/15.” So actually it is: With probability 1-p, no error (IβŠ—I). With probability p, an error from the set of 15 Paulis (all Pauli strings on two qubits except IβŠ—I) each with probability p/15. Then apply H_0 (perfect). Then apply CNOT_{03} (perfect) followed by error channel on qubits 0 and 3.

So the final state is a mixture. We want the physical state fidelity. That is: F = ⟨ψ_ideal| ρ_final |ψ_ideal⟩, where ρ_final is the density matrix after the circuit with errors. Since errors are independent on the two CNOT gates, we can compute the effect of each error channel on the ideal state preparation. But careful: The errors occur in the middle of the circuit. So the final state is not simply the ideal state with some Pauli errors applied? But we can compute the entire process as a quantum channel. Alternatively, we can compute the fidelity as: The probability that no error occurs that takes the state out of the ideal state? But careful: Some errors might be correctable? But here we are not correcting errors; we are just computing the fidelity of the output state relative to the ideal state. And the errors are Pauli errors. And the circuit is Clifford? Actually, the circuit consists of Hadamard and CNOT. So it is a Clifford circuit. And the initial state is |0>^4. So the entire process is a Clifford circuit. And the errors are Pauli errors. So the final state is a mixture of states that are Pauli errors applied to the ideal state? But careful: The errors occur at different times. But because the circuit is Clifford, the effect of a Pauli error at some point can be propagated through the subsequent gates. That is a common technique: Instead of applying errors on the state, we can push them to the end as Pauli errors on the initial state? But here the errors are applied after gates. But we can use the fact that if we have a Clifford circuit U, and an error E occurs after some gate, then U E = (U E U^\dagger) U. So the overall effect is that the error becomes a Pauli error at the beginning? But careful: The errors are applied in between gates. So let’s denote the circuit as: U = U4 * U3 * U2 * U1, where: U1 = H_2 U2 = CNOT_{21} U3 = H_0 U4 = CNOT_{03} But then errors: After U2, we have error channel on qubits {2,1}. After U4, we have error channel on qubits {0,3}. So the actual operation is: ρ = E_{03} ∘ U4 ∘ E_{21} ∘ U2 ∘ U1 (|0><0|) but careful: There is also U3 = H_0 in between. Actually order: Step 1: U1 = H_2 Step 2: U2 = CNOT_{21} Step 3: Error channel on qubits {2,1} (call it E_{21}) Step 4: U3 = H_0 Step 5: U4 = CNOT_{03} Step 6: Error channel on qubits {0,3} (call it E_{03}) So overall: ρ = (E_{03} ∘ U4 ∘ U3 ∘ E_{21} ∘ U2 ∘ U1)(|0><0|) but careful: The error channel E_{21} is applied after U2, so it is: U2 then E_{21} then U3 then U4 then E_{03}. So overall unitary part: U = U4 U3 U2 U1. And then errors: They are not necessarily at the end because they are conjugated by subsequent gates. But we can push them to the end. Specifically, if we have an error E acting on some qubits after a unitary V, then the overall effect is: V E = (V E V^\dagger) V. So if we have a sequence: … V, then error E, then W, then we can write: W (V E) = W V E = (W V E V^\dagger W^\dagger) W V. So indeed, we can push errors to the end. So let’s do that. We have: U_total = U4 U3 U2 U1. But errors: After U2, we have error E (on qubits 1,2). Then U3 and U4 follow. So that error becomes: U4 U3 E U3^\dagger U4^\dagger? Actually careful: The circuit is: U4 * U3 * (error E on qubits {1,2}) * U2 * U1. So that is equivalent to: (U4 U3 E U3^\dagger U4^\dagger) * (U4 U3 U2 U1) = E’ * U_total, where E’ = U4 U3 E U3^\dagger U4^\dagger. And then after U4, we have error F on qubits {0,3}. That is already at the end? Actually: The circuit: U4, then error F on {0,3}. So that is: F * U4. But then combined with the previous part: Actually careful: The full circuit with errors: ρ = (F ∘ U4) ∘ (U3) ∘ (E ∘ U2) ∘ (U1) (|0><0|). But note: U3 is a unitary that does not have an error after it? Actually, the error after U2 is applied before U3. So it is: U4 * (error F on {0,3})? Actually, wait: The order is: Start: |ψ0> = |0000>. Apply U1 = H_2. Apply U2 = CNOT_{21}. Then apply error channel on qubits {2,1} (call it E_{21}). Then apply U3 = H_0. Then apply U4 = CNOT_{03}. Then apply error channel on qubits {0,3} (call it E_{03}). So if we denote the perfect unitary as U = U4 U3 U2 U1, then the actual operation is: ρ = E_{03} ( U4 ( U3 ( E_{21} ( U2 ( U1 (|0><0|) U1^\dagger ) U2^\dagger ) U3^\dagger ) U4^\dagger ) ) But we can push the error E_{21} through U3 and U4. As said: U4 U3 E_{21} = (U4 U3 E_{21} U3^\dagger U4^\dagger) U4 U3. So then the overall becomes: ρ = E_{03} ( (U4 U3 E_{21} U3^\dagger U4^\dagger) U4 U3 U2 U1 (|0><0|) … ) but careful with order: Actually, let’s do it step by step: We have: ρ = E_{03} ∘ (U4) ∘ (U3) ∘ (E_{21}) ∘ (U2) ∘ (U1) (ρ0). Define V = U3 U2 U1. Then ρ = E_{03} ∘ (U4) ∘ (E_{21}) ∘ (V) (ρ0)? Not exactly because U3 is after E_{21}? Actually: The order is: U1, then U2, then E_{21}, then U3, then U4, then E_{03}. So if we combine U3 U2 U1 = V, then careful: That would be if E_{21} was after U3? Actually, no: It is: U1, U2, E_{21}, U3, U4, E_{03}. So if I define V = U3 U2 U1, then the order is: U1, U2, then E_{21}, then U3, then U4, then E_{03} = (U4 U3) (E_{21}) (U2 U1) but then that is not simply V because V = U3 U2 U1, so U4 U3 = U4 * U3, and U2 U1 is part of V but then U3 is separate. Actually, it’s easier: Push E_{21} through U3 and U4. Write the entire unitary part as U = U4 U3 U2 U1. Then note that: U4 U3 E_{21} U2 U1 = U4 U3 E_{21} (U3^\dagger U4^\dagger) (U4 U3 U2 U1) = (U4 U3 E_{21} U3^\dagger U4^\dagger) U. So indeed, the effect of the error E_{21} (which acts on qubits 1,2) becomes, after pushing through U3 and U4, an error E’ = U4 U3 E_{21} U3^\dagger U4^\dagger that acts on the state at the end (after U). But careful: There is also the error E_{03} at the very end. So overall, the actual state is: ρ = (E_{03} ∘ (E’))( U ρ0 U^\dagger ) where E’ is the channel that applies the error E (from the set of Paulis on qubits {1,2}) transformed by U4 U3. But wait: But then note: E_{21} is a probabilistic application of Paulis on qubits 1 and 2. And then E’ will be some Pauli on some qubits? Since U4 and U3 are Clifford gates, they map Paulis to Paulis. So E’ will be a Pauli operator on some set of qubits. Let’s compute that transformation. We have: U3 = H_0. U4 = CNOT_{03}. And E is a Pauli on qubits {1,2}? Actually, careful: E_{21} acts on qubits 2 and 1. But note: qubits are labeled: 0,1,2,3. So E_{21} acts on qubit2 and qubit1. Under U3 = H_0, that does nothing to qubits 1,2 because H_0 only acts on qubit0. So U3 E_{21} U3^\dagger = E_{21} because E_{21} commutes with H_0? Actually, check: H_0 acts on qubit0. E_{21} acts on qubits 1 and 2. They act on different qubits, so they commute. So then U4 U3 E_{21} U3^\dagger U4^\dagger = U4 E_{21} U4^\dagger. And U4 = CNOT_{03}. That acts on qubits 0 and 3. So it will commute with operators on qubits 1 and 2? Actually, careful: CNOT_{03} acts on qubit0 and qubit3. Operators on qubits 1 and 2 commute with CNOT_{03} if they are Paulis? Actually, Pauli operators on qubits 1 and 2 commute with CNOT_{03} because they act on different qubits. So indeed, U4 E_{21} U4^\dagger = E_{21} because E_{21} acts on qubits 1 and 2, and CNOT_{03} acts on qubits 0 and 3, so they commute. Wait, check: For example, if E_{21} = X_2, then CNOT_{03} X_2 = X_2 CNOT_{03} because CNOT_{03} only involves qubits 0 and 3. So yes, they commute. So actually, E’ = E_{21} itself. That is interesting: The error on the first CNOT (on qubits 1,2), when pushed through the subsequent gates (H_0 and CNOT_{03}), remains as the same Pauli error on qubits 1 and 2. So then the overall effect is: The actual state is as if we applied the perfect unitary U, and then we apply two independent error channels: one on qubits {1,2} from the first CNOT error, and one on qubits {0,3} from the second CNOT error. But wait: Is that correct? Let’s check manually: The circuit: H_2, then CNOT_{21}, then error on {1,2}, then H_0, then CNOT_{03}, then error on {0,3}. If we push the error on {1,2} through H_0 and CNOT_{03}, since these gates act on qubits 0 and 3, they commute with any operator on qubits 1 and 2. So indeed, we can move that error to after the CNOT_{03} gate. So then the circuit becomes: H_2, CNOT_{21}, H_0, CNOT_{03}, then error on {1,2} (from first CNOT error) and then error on {0,3} (from second CNOT error). And note that the order of these two errors doesn’t matter because they act on disjoint sets of qubits. So indeed, the overall process is: Ideal unitary U (which prepares the ideal state |ψ_ideal>) and then two independent error channels: one on qubits {1,2} and one on qubits {0,3}. And these error channels are: For qubits {1,2}: With probability 1-p, identity; with probability p, a random non-identity Pauli on qubits 1 and 2 (each of the 15 equally likely). For qubits {0,3}: Similarly.

So then the final state ρ is: ρ = (E_{03} βŠ— E_{21}) ( |ψ_ideal><ψ_ideal| ) where E_{03} and E_{21} are the depolarizing channels on those pairs. But careful: The error channels are applied independently. So the overall channel is: ρ = (1-p)^2 |ψ_ideal><ψ_ideal| + (1-p)p/15 * (sum over non-identity Paulis on {0,3}) applied to |ψ_ideal><ψ_ideal| + p(1-p)/15 * (sum over non-identity Paulis on {1,2}) + (p/15)^2 * (sum over pairs of non-identity Paulis on both sets) applied.

But wait: There is also possibility that both errors occur? But that is included: probability p^2 that both errors occur, but then each error is one of 15, so total probability for a specific pair is p^2/225.

So then the fidelity F = <ψ_ideal| ρ |ψ_ideal>. That equals: F = (1-p)^2 * 1 + (1-p)*p/15 * (sum over E on {0,3} non-identity: <ψ_ideal| E |ψ_ideal>? But careful: The channel: For a given Pauli error E (on a specific set), the state becomes: with probability (p/15), we get E |ψ_ideal><ψ_ideal| E^\dagger. So then the overlap with |ψ_ideal> is |<ψ_ideal| E |ψ_ideal>|^2. But note: |ψ_ideal> is a state. And E is a Pauli operator. So <ψ_ideal| E |ψ_ideal> is either 0 or 1? Actually, Pauli operators are Hermitian and unitary. And |ψ_ideal> is a specific state. It might be an eigenvector of some Paulis? Let’s check: |ψ_ideal> = (|0000>+|0110>+|1001>+|1111>)/2. We want to compute for a Pauli operator acting on qubits {0,3} (say) what is <ψ_ideal| P |ψ_ideal>? And similarly for Paulis on {1,2}.

So we need to compute: For each non-identity Pauli on qubits {0,3}, what is the expectation value? And for each non-identity Pauli on qubits {1,2}, what is the expectation value? And then also for products from both sets? But careful: The errors are independent. But note: The errors on {0,3} and on {1,2} act on disjoint qubits. So if we have an error E on {0,3} and F on {1,2}, then the overall error is EβŠ—F. And then the fidelity contribution is |<ψ_ideal| (EβŠ—F) |ψ_ideal>|^2. And then we sum over all such errors weighted by their probabilities.

So let’s compute these overlaps.

Let |ψ> = (|0000> + |0110> + |1001> + |1111>)/2. We want to compute for a Pauli operator P (which is a tensor product of Paulis on the four qubits, but restricted to act nontrivially only on a subset? Actually, careful: The errors are on specific sets: For the error from the first CNOT, it acts on qubits 1 and 2. So those Paulis are of the form: I βŠ— (something on qubit1) βŠ— (something on qubit2) βŠ— I. But wait: Actually, the error channel on the first CNOT is on qubits 2 and 1. But order: qubits: 0,1,2,3. So on qubits 1 and 2, the Pauli operators are: I_0 βŠ— A_1 βŠ— B_2 βŠ— I_3, where A,B ∈ {I, X, Y, Z} but not both I? Actually, the error set is all Paulis on qubits {1,2} except the identity. So there are 15 such operators. Similarly, the error from the second CNOT is on qubits {0,3}. So those are: C_0 βŠ— I_1 βŠ— I_2 βŠ— D_3, with C,D ∈ {I,X,Y,Z} and not both I.

And then also there is possibility of both errors simultaneously: That gives operators: (C_0 βŠ— I_1 βŠ— I_2 βŠ— D_3) * (I_0 βŠ— A_1 βŠ— B_2 βŠ— I_3) = C_0 βŠ— A_1 βŠ— B_2 βŠ— D_3. But note: These are not all Paulis on all 4 qubits? They are a subset of the 4-qubit Paulis that act nontrivially only on these pairs. But careful: There is also possibility that the errors from the two channels are applied? But they are independent. So indeed, the overall error channel is: With probability (1-p)^2: no error. With probability p(1-p): error only on {0,3} (15 possibilities, each probability p(1-p)/15) With probability (1-p)p: error only on {1,2} (15 possibilities, each probability p(1-p)/15) With probability p^2: error on both sets (225 possibilities, each probability p^2/225)

But wait: There is also possibility that the error from one channel is identity? But that is already included: The error channel on each CNOT gives identity with probability 1-p. So indeed.

So then fidelity F = <ψ| ρ |ψ> = (1-p)^2 * 1 + (1-p)p/15 * [ sum_{E in Paulis on {0,3} non-identity } |<ψ| E |ψ>|^2 ] + p(1-p)/15 * [ sum_{F in Paulis on {1,2} non-identity } |<ψ| F |ψ>|^2 ] + p^2/225 * [ sum_{E on {0,3} non-identity, F on {1,2} non-identity } |<ψ| E F |ψ>|^2 ]

And note: |<ψ| P |ψ>|^2 is either 0 or 1? Actually, careful: For a Pauli operator P, if |ψ> is an eigenvector of P, then <ψ|P|ψ> = Β±1, so squared is 1. If not, then it could be 0? But wait: For a Pauli operator, it要么 commutes with the state’s projector? Actually, if |ψ> is a stabilizer state, then it is an eigenvector of some Paulis. But here |ψ> is not necessarily a stabilizer state of the full Pauli group? But it is a state in the code space. Actually, |ψ> is a specific state. Let’s compute these overlaps explicitly.

We have |ψ> = (|0000> + |0110> + |1001> + |1111>)/2. Let’s denote basis states by |a b c d> where a=qubit0, b=qubit1, c=qubit2, d=qubit3. So |ψ> = (|0000> + |0110> + |1001> + |1111>)/2.

Now, consider an operator on {0,3}: That is of the form P = P_0 βŠ— I_1 βŠ— I_2 βŠ— P_3, where P_0 and P_3 are Paulis (X, Y, Z) but not both I? Actually, non-identity means that (P_0, P_3) is not (I,I). So there are 15 such operators. We want to compute <ψ| P |ψ>. P acts on qubits 0 and 3. So it will map each basis state to another basis state up to a phase. Let’s list the basis states in |ψ>: 1: |0000> 2: |0110> 3: |1001> 4: |1111> Under P, what happens? For a given P = (Οƒ, Ο„) on qubits 0 and 3, where Οƒ, Ο„ ∈ {X, Y, Z} (and not both identity, but we include all combinations? But careful: The set is: Οƒ and Ο„ can be I? But then it would be identity? Actually, the error set on {0,3} is non-identity Paulis. So Οƒ and Ο„ are such that they are not both I. But we can compute for each possibility separately.

Let’s compute for each type: We want <ψ| P |ψ> = (1/4)[ <0000| P |0000> + <0110| P |0110> + <1001| P |1001> + <1111| P |1111> ] plus cross terms? Actually careful: <ψ| P |ψ> = sum_{i,j} (1/4) where i,j are the four basis states. But since P is a Pauli operator, it will map each computational basis state to another computational basis state (possibly with a phase). So the matrix elements are diagonal only if P maps the state to itself. So we need to check: For each basis state in the support of |ψ>, what is P|state>? For state |0000>: P|0000> = (Οƒ|0>_0) βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|0>_3). Οƒ|0>: If Οƒ = I, then |0>. If Οƒ = X, then |1>. If Οƒ = Y, then i? Actually Y|0> = i|1>? But careful: Pauli Y is usually defined as iΟƒ_y, so Y = [[0, -i],[i, 0]]? Actually, there are conventions. But Pauli matrices are Hermitian. Typically, Pauli Y is defined as: Y = (0 -i; i 0). So then Y|0> = i|1>. But then the phase matters. But when we compute <ψ| P |ψ>, we are taking expectation value. That will be a complex number. But then we square it to get fidelity contribution? Actually, careful: The fidelity is <ψ| ρ |ψ>. And ρ is a mixture of states that are P|ψ> with some probabilities. But then <ψ| (P|ψ><ψ|P^\dagger) |ψ> = |<ψ|P|ψ>|^2. So we need the magnitude squared. So we want |<ψ|P|ψ>|^2. So we can compute the phase factors. But maybe we can determine which Paulis leave |ψ> invariant (up to a phase) and which do not. Because if P|ψ> is orthogonal to |ψ>, then <ψ|P|ψ> = 0. And if P|ψ> is proportional to |ψ>, then |<ψ|P|ψ>|^2 = 1. So we want to know: For a given Pauli P on {0,3} (non-identity), does it stabilize |ψ>? That is, is |ψ> an eigenvector of P? Similarly for Paulis on {1,2}.

Let’s check for Paulis on {0,3}: P = Οƒ_0 βŠ— I_1 βŠ— I_2 βŠ— Ο„_3. We want to see if P|ψ> = Ξ»|ψ> for some Ξ». |ψ> = (|0000> + |0110> + |1001> + |1111>)/2. Apply P: P|0000> = (Οƒ|0>)_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|0>)_3. P|0110> = (Οƒ|0>)_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|0>)_3? Actually careful: |0110> means: qubit0=0, qubit1=1, qubit2=1, qubit3=0. So P|0110> = (Οƒ|0>)_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|0>)_3. P|1001> = (Οƒ|1>)_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|1>)_3. P|1111> = (Οƒ|1>)_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|1>)_3. For P to map |ψ> to a scalar multiple of itself, the images of these basis states must be exactly the four basis states that appear in |ψ> (which are: |0000>, |0110>, |1001>, |1111>). So we need that: For each basis state, P maps it to one of these four, and the phases must be consistent. Let’s consider different cases:

Case: Οƒ = I, Ο„ is non-identity? But then P is on {0,3} but if Οƒ=I and Ο„ is non-identity, then that is a valid error? Yes, because it’s non-identity on the pair? Actually, careful: The error set on {0,3} is all Paulis on qubits 0 and 3 that are not IβŠ—I. So if Οƒ=I and Ο„ is X, Y, or Z, that is included. So subcase: Οƒ = I. Then P = I_0 βŠ— I_1 βŠ— I_2 βŠ— Ο„_3. Then: P|0000> = |0>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|0>)_3. P|0110> = |0>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|0>)_3. P|1001> = |1>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|1>)_3. P|1111> = |1>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|1>)_3. For these to be among {|0000>, |0110>, |1001>, |1111>}, we need that Ο„|0> is either |0> or |1>? Actually, if Ο„|0> = |0> then that’s fine. If Ο„|0> = |1> then that would give states: |0001>, |0111>, which are not in our set. So we require that Ο„|0> is proportional to |0>. That means that |0> is an eigenvector of Ο„. For Pauli operators: I: but Ο„ is not I because we are in non-identity? Actually, here Οƒ=I, so Ο„ must be non-identity. So for Ο„ = X: X|0> = |1>, so that gives states like |0001> etc. So then the images would be: P|0000> = |0001> (if Ο„=X, then X|0>=|1>) P|0110> = |0111> P|1001> = |1000>? Because Ο„|1> = X|1> = |0>, so |1001> -> |1000> P|1111> = |1110> None of these are in the support of |ψ>. So then <ψ|P|ψ> would be 0. So for Οƒ=I and Ο„ non-identity, we get |<ψ|P|ψ>|^2 = 0. What about Ο„ = Y? Y|0> = i|1>, so similar: gives states like |0001> etc. So again 0. What about Ο„ = Z? Z|0> = |0>, and Z|1> = -|1>. So then: P|0000> = |0000> P|0110> = |0110> P|1001> = |1001> but with a phase? Actually, careful: Z|1> = -|1>, so: P|1001> = |1>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Z|1>)_3 = |1001> * (-1) because qubit3 becomes -|1>. P|1111> = |1111> * (-1) because qubit3: Z|1> = -|1>. So then P|ψ> = (1/2)[ |0000> + |0110> + (-1)|1001> + (-1)|1111> ] = (1/2)[ (|0000>+|0110>) - (|1001>+|1111>) ]. That is not a scalar multiple of |ψ> because |ψ> = (|0000>+|0110>+|1001>+|1111>)/2. So then <ψ|P|ψ> = (1/4)[1+1 + (-1)+(-1)] = 0. So actually, for Οƒ=I, Ο„=Z, we get <ψ|P|ψ> = 0. But wait, check: <ψ|P|ψ> = (1/4)[<0000|P|0000> + <0110|P|0110> + <1001|P|1001> + <1111|P|1111>] because cross terms? Actually, careful: Since P is diagonal in the computational basis? But here P is not diagonal because it acts on qubit3. But the states are computational basis states. Actually, because P maps each computational basis state to another computational basis state (up to phase), the matrix elements are zero if iβ‰ j. So indeed, <ψ|P|ψ> = (1/4)[<0000|P|0000> + <0110|P|0110> + <1001|P|1001> + <1111|P|1111>]. And for Οƒ=I, Ο„=Z, we computed: <0000|P|0000> = 1 (since P|0000>=|0000>) <0110|P|0110> = 1 <1001|P|1001> = -1 <1111|P|1111> = -1 So sum = 0. So indeed, |<ψ|P|ψ>|^2 = 0. So for Paulis on {0,3} with Οƒ=I, all non-identity Ο„ give 0.

Now consider Οƒ non-identity. Let’s try Οƒ = X. So P = X_0 βŠ— I_1 βŠ— I_2 βŠ— Ο„_3. Then: P|0000> = (X|0>)_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|0>)_3 = |1>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|0>)_3. For this to be one of our basis states, we need Ο„|0> to be |0> or |1>? Actually, our basis states have qubit0 either 0 or 1. Here qubit0 becomes 1. So we want the resulting state to be either |1001> or |1111>? Actually, our basis states: They are: |0000>, |0110>, |1001>, |1111>. So if qubit0=1, then the state must be either |1001> or |1111>. That means that qubit1 and qubit2 should be 0 and 0 for |1001> or 1 and 1 for |1111>. But here from |0000>, qubit1 and qubit2 are 0,0. So we need the result to be |1001>. That requires that Ο„|0> gives |1>? Because then qubit3 becomes 1. But wait: |1001> has qubit3=1. So we need Ο„|0> = |1> (up to phase). But if Ο„|0> = |1>, then check next: P|0110> = (X|0>)_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|0>)_3 = |1>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|0>)_3. For this to be in our set, if qubit0=1, then we need qubit1,2 to be 1,1 so that gives |1111>. That requires Ο„|0> gives |1> as well? But |1111> has qubit3=1. So that works. Next: P|1001> = (X|1>)_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|1>)_3 = |0>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|1>)_3. For this to be in our set, if qubit0=0, then we need qubit1,2 to be 0,0 so that gives |0000>. That requires Ο„|1> gives |0>? Because |0000> has qubit3=0. Next: P|1111> = (X|1>)_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|1>)_3 = |0>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|1>)_3. That should become |0110> which has qubit3=0. So we need Ο„|1> gives |0>. So if we choose Ο„ such that Ο„|0> = |1> and Ο„|1> = |0>, then that is exactly the Pauli X on qubit3. So if Οƒ = X and Ο„ = X, then: P = X_0 βŠ— I_1 βŠ— I_2 βŠ— X_3. Then check phases: X|0> = |1> (no phase, real) X|1> = |0> (no phase) So then: P|0000> = |1001> P|0110> = |1111> P|1001> = |0000> P|1111> = |0110> So then P|ψ> = (1/2)[ |1001> + |1111> + |0000> + |0110> ] = |ψ>. So <ψ|P|ψ> = 1. So for P = X_0 X_3, we get |<ψ|P|ψ>|^2 = 1. What if Οƒ = X and Ο„ = Y? Then: Ο„|0> = Y|0> = i|1> Ο„|1> = Y|1> = -i|0> (since Y = [[0,-i],[i,0]] so Y|1> = -i|0>) Then: P|0000> = |1>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (i|1>)_3 = i |1001> P|0110> = |1>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (i|1>)_3 = i |1111> P|1001> = |0>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (-i|0>)_3 = -i |0000> P|1111> = |0>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (-i|0>)_3 = -i |0110> So then P|ψ> = (1/2)[ i(|1001>+|1111>) + (-i)(|0000>+|0110>) ] = -i (|0000>+|0110>) + i (|1001>+|1111>) all divided by 2? Actually careful: = (1/2)[ -i|0000> - i|0110> + i|1001> + i|1111> ] = (i/2)[ -|0000>-|0110>+|1001>+|1111> ]. That is not a scalar multiple of |ψ> because |ψ> = (|0000>+|0110>+|1001>+|1111>)/2. So then <ψ|P|ψ> = (1/4)[ -i - i + i + i] = 0. So for Οƒ=X, Ο„=Y, we get 0. What if Οƒ = X and Ο„ = Z? Then: Ο„|0> = Z|0> = |0> Ο„|1> = Z|1> = -|1> Then: P|0000> = |1>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (|0>)_3 = |1000> but that is not in our set because qubit1,2 are 0,0 but qubit3=0 gives |1000> but our set has |1001> for qubit0=1? Actually, wait: Our set: when qubit0=1, the only states are |1001> and |1111>. So |1000> is not in the support. So then automatically, the image of |0000> is not in the support, so <ψ|P|ψ> will be 0. So for Οƒ=X, Ο„=Z, we get 0. So from the pattern: For Paulis on {0,3}, it seems that the only one that might give nonzero overlap is if the Pauli is exactly X_0 X_3? But wait, what about Οƒ = Y? Let’s check Οƒ = Y. P = Y_0 βŠ— I_1 βŠ— I_2 βŠ— Ο„_3. Then: P|0000> = (Y|0>)_0 βŠ— … = (i|1>)_0 βŠ— … so that gives i|1>_0. For this to be in our set, we need the result to be either |1001> or |1111>. For |0000>, qubit1,2 are 0,0 so we need result to be |1001>. That requires Ο„|0> should give |1>? But then phase: Y|0> = i|1>, so then P|0000> = i |1001>. Next: P|0110> = Y|0> (but careful: |0110> has qubit0=0) so Y|0> = i|1> so gives i|1>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|0>)_3. For that to be |1111>, we need Ο„|0> gives |1> so then becomes i|1111>. Next: P|1001> = Y|1> = -i|0> so gives -i|0>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Ο„|1>)_3. For that to be |0000>, we need Ο„|1> gives |0> so becomes -i|0000>. Next: P|1111> = Y|1> = -i|0> so gives -i|0>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Ο„|1>)_3. For that to be |0110>, we need Ο„|1> gives |0> so becomes -i|0110>. So then if we choose Ο„ such that Ο„|0> = |1> and Ο„|1> = |0>, that is Ο„ = X. But then we get phases: P|0000> = i|1001> P|0110> = i|1111> P|1001> = -i|0000> P|1111> = -i|0110> So then P|ψ> = (1/2)[ i(|1001>+|1111>) + (-i)(|0000>+|0110>) ] = similar to before, which is not a scalar multiple of |ψ> because the phases on the two groups are opposite. Actually, wait: Could it be that P|ψ> = -i (|0000>+|0110>) + i (|1001>+|1111>) divided by 2? That is actually i times ( - (|0000>+|0110>) + (|1001>+|1111>) )/2. That is not proportional to (|0000>+|0110>+|1001>+|1111>) unless the coefficients are all the same. So then <ψ|P|ψ> = 0. So for Οƒ=Y, even if Ο„=X, we get 0. What if Οƒ=Y and Ο„=Y? Then: P|0000> = Y|0> βŠ— … βŠ— Y|0> = (i|1>) βŠ— … βŠ— (i|0>?) Actually, careful: Y|0> = i|1>, Y|0> = i|0>? Wait, careful: On qubit3, Ο„=Y, so Y|0> = i|1>? Actually, Y|0> = i|1>? Check: Y = [[0, -i],[i, 0]]. So Y|0> = i|1>. And Y|1> = -i|0>. So: P|0000> = (Y|0>)_0 βŠ— (Y|0>)_3? Actually, careful: P = Y_0 βŠ— I_1 βŠ— I_2 βŠ— Y_3. So: P|0000> = (Y|0>)_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Y|0>)_3 = (i|1>)_0 βŠ— … βŠ— (i|1>)_3 = ii |1>_0|0>_1|0>_2|1>_3 = -|1001>. P|0110> = (Y|0>)_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Y|0>)_3 = (i|1>)_0 βŠ— … βŠ— (i|1>)_3 = -|1111>. P|1001> = (Y|1>)_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— (Y|1>)_3 = (-i|0>)_0 βŠ— … βŠ— (-i|0>)_3 = (-i)(-i) |0>_0|0>_1|0>_2|0>_3 = -|0000>. P|1111> = (Y|1>)_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— (Y|1>)_3 = (-i|0>)_0 βŠ— … βŠ— (-i|0>)_3 = (-i)(-i) |0>_0|1>_1|1>_2|0>_3 = -|0110>. So then P|ψ> = (1/2)[ -|1001> - |1111> - |0000> - |0110> ] = -|ψ>. So then <ψ|P|ψ> = -1, so |<ψ|P|ψ>|^2 = 1. So for P = Y_0 Y_3, we get fidelity contribution 1. What if Οƒ=Y and Ο„=Z? Then: P|0000> = (Y|0>)_0 βŠ— (Z|0>)_3 = (i|1>)_0 βŠ— (|0>)_3 = i|1000> -> not in support. So that gives 0. So for Paulis on {0,3}, it appears that the only ones that yield nonzero overlap are those that are either X_0 X_3 or Y_0 Y_3? What about Οƒ=Z? Consider Οƒ=Z, Ο„ something? P = Z_0 βŠ— I_1 βŠ— I_2 βŠ— Ο„_3. Then: P|0000> = (Z|0>)_0 βŠ— (Ο„|0>)_3 = |0>_0 βŠ— (Ο„|0>)_3. For this to be in support, since qubit0=0, we need the state to be either |0000> or |0110>. So we need Ο„|0> to give |0>? That means Ο„ must have |0> as eigenvector. For non-identity, that is only Z? But then: If Ο„=Z, then: P|0000> = |0000> (since Z|0>=|0>) P|0110> = |0110> (Z|0>=|0>) P|1001> = (Z|1>)_0 βŠ— (Z|1>)_3 = (-|1>)_0 βŠ— (-|1>)_3 = |1001> (because (-1)(-1)=1) P|1111> = (Z|1>)_0 βŠ— (Z|1>)_3 = (-|1>)_0 βŠ— (-|1>)_3 = |1111> So then P|ψ> = |ψ>. So for P = Z_0 Z_3, we get <ψ|P|ψ> = 1. What if Ο„ is something else? If Ο„ = X, then: P|0000> = |0>_0 βŠ— (X|0>)_3 = |0001> -> not in support. So indeed, for Οƒ=Z, the only possibility is Ο„=Z. What about Οƒ=Z, Ο„=Y? Then: P|0000> = |0>_0 βŠ— (Y|0>)_3 = |0>_0 βŠ— (i|1>)_3 = i|0001> -> not in support. So for Paulis on {0,3}, the ones that give nonzero overlap are: X_0 X_3, Y_0 Y_3, Z_0 Z_3. Also what about? Check: Could there be something like X_0 I_3? That we already did: Οƒ=X, Ο„=I is not allowed because that is identity on the pair? Actually, wait: The error set on {0,3} is all Paulis that are not IβŠ—I. So XβŠ—I is allowed. But we already considered Οƒ=X, Ο„=I? That would be: P = X_0 I_3. Then: P|0000> = |1000> -> not in support. So indeed, the only ones that give nonzero are when the Pauli on qubit0 and qubit3 are the same type? Actually, we found: X_0 X_3 gives 1, Y_0 Y_3 gives 1, Z_0 Z_3 gives 1. What about X_0 Y_3? That gives 0 as we computed. So there are 3 Paulis on {0,3} that yield |<ψ|P|ψ>|^2 = 1. And the total number of non-identity Paulis on {0,3} is 15. So for the error channel on {0,3}, out of the 15 errors, 3 will have overlap 1, and the remaining 12 will have overlap 0.

But wait: Check: What about I_0 X_3? That we already did: gives 0. So summary for errors on {0,3}: Number of errors that commute with |ψ> (i.e., leave it invariant up to phase) = 3. So their contribution to fidelity: each gives |<ψ|P|ψ>|^2 = 1.

Now, similarly, consider errors on {1,2}. P on {1,2} is of the form: I_0 βŠ— A_1 βŠ— B_2 βŠ— I_3, where (A,B) is not (I,I). We want to compute <ψ| P |ψ> for such P. |ψ> = (|0000> + |0110> + |1001> + |1111>)/2. Let’s denote P = I_0 βŠ— A_1 βŠ— B_2 βŠ— I_3. Then: P|0000> = |0>_0 βŠ— (A|0>)_1 βŠ— (B|0>)_2 βŠ— |0>_3. For this to be in the support, since qubit0=0 and qubit3=0, we need the state to be either |0000> or |0110>. So if A|0> and B|0> are such that the resulting state is |00> on qubits 1,2 or |11>? Actually, careful: The support states: |0000>: qubits1,2 = 00. |0110>: qubits1,2 = 11. So for |0000>, we need A|0> and B|0> to be either both |0> or both |1>? But if they are both |1>, then that gives |0110>? Actually, |0000> becomes: if A|0>=|1> and B|0>=|1>, then we get |0>_0, |1>_1, |1>_2, |0>_3 = |0110>. So that is in the support. But then the phase: If A|0> = |0> and B|0> = |0>, then P|0000> = |0000>. If A|0> = |1> and B|0> = |1>, then P|0000> = |0110>. But careful: They are different basis states. For the expectation <ψ|P|ψ>, we need to compute the matrix elements. Actually, since P is a Pauli, it will map each computational basis state to another computational basis state. So we need to check for each basis state in the support, what is P|state> and then see if P|ψ> is proportional to |ψ>. Let’s do it systematically: We want to know for which Paulis on {1,2} does P|ψ> = Ξ»|ψ>. Write P = A_1 βŠ— B_2 (acting on qubits 1 and 2, with identity on 0 and 3). Then: P|0000> = |0>_0 βŠ— (A|0>)_1 βŠ— (B|0>)_2 βŠ— |0>_3. P|0110> = |0>_0 βŠ— (A|1>)_1 βŠ— (B|1>)_2 βŠ— |0>_3. P|1001> = |1>_0 βŠ— (A|0>)_1 βŠ— (B|0>)_2 βŠ— |1>_3. P|1111> = |1>_0 βŠ— (A|1>)_1 βŠ— (B|1>)_2 βŠ— |1>_3. For P|ψ> to be proportional to |ψ>, the images of these four states must be exactly the four states in the support (possibly with phases). Notice that the support states have the property that qubits 0 and 3 are the same: either both 0 or both 1. And qubits 1 and 2 are either both 0 or both 1. So we need that A|0> and B|0> are either both |0> or both |1>? Actually, if they are both |0>, then P|0000> = |0000>. If they are both |1>, then P|0000> = |0110>. Similarly, for P|0110>: A|1> and B|1> should be either both |0> or both |1>. But careful: For consistency, if P|0000> becomes |0110>, then we need that P|0110> becomes |0000>? Because then overall, P would swap the two terms? But then P|ψ> would be (|0110>+|0000>+…)? That could still be |ψ> if the phases work out. Let’s check: Suppose A and B are such that A|0> = |1>, B|0> = |1> and A|1> = |0>, B|1> = |0>. That is exactly the Pauli X on both qubits? Actually, if A = X and B = X, then: P|0000> = |0110> P|0110> = |0000> P|1001> = |1111>? Check: P|1001> = |1>_0 βŠ— (X|0>)_1 βŠ— (X|0>)_2 βŠ— |1>_3 = |1>_0 βŠ— |1>_1 βŠ— |1>_2 βŠ— |1>_3 = |1111> P|1111> = |1>_0 βŠ— (X|1>)_1 βŠ— (X|1>)_2 βŠ— |1>_3 = |1>_0 βŠ— |0>_1 βŠ— |0>_2 βŠ— |1>_3 = |1001> So then P|ψ> = (1/2)[ |0110> + |0000> + |1111> + |1001> ] = |ψ>. So that works. So for P = X_1 X_2, we get <ψ|P|ψ> = 1. What about if A and B are such that A|0> = |0>, B|0> = |0> and A|1> = |1>, B|1> = |1>? That is identity, but that’s not allowed because we are considering non-identity. So next: What if A = Z and B = Z? Then: P|0000> = Z|0>=|0>, so |0000> P|0110> = Z|1> = -|1>, so P|0110> = -|0110>? Actually careful: P|0110> = |0>_0 βŠ— (Z|1>)_1 βŠ— (Z|1>)_2 βŠ— |0>_3 = |0>_0 βŠ— (-|1>)_1 βŠ— (-|1>)_2 βŠ— |0>_3 = (-1)(-1)|0110> = |0110>. P|1001> = |1>_0 βŠ— (Z|0>)_1 βŠ— (Z|0>)_2 βŠ— |1>_3 = |1001> P|1111> = |1>_0 βŠ— (Z|1>)_1 βŠ— (Z|1>)_2 βŠ— |1>_3 = (-1)(-1)|1111> = |1111> So actually, Z_1 Z_2 gives P|ψ> = |ψ>. So that works. So P = Z_1 Z_2 gives overlap 1. What about A = Y and B = Y? Then: P|0000> = Y|0> = i|1>, so becomes i|1> on qubit1 and similarly on qubit2: i|1> so product ii = -1, so P|0000> = -|0110>? Actually careful: P|0000> = |0>_0 βŠ— (Y|0>)_1 βŠ— (Y|0>)_2 βŠ— |0>_3 = |0>_0 βŠ— (i|1>)_1 βŠ— (i|1>)_2 βŠ— |0>_3 = (ii) |0110> = -|0110>. P|0110> = |0>_0 βŠ— (Y|1>)_1 βŠ— (Y|1>)_2 βŠ— |0>_3 = |0>_0 βŠ— (-i|0>)_1 βŠ— (-i|0>)_2 βŠ— |0>_3 = (-i)(-i) |0000> = -|0000>. P|1001> = |1>_0 βŠ— (Y|0>)_1 βŠ— (Y|0>)_2 βŠ— |1>_3 = |1>_0 βŠ— (i|1>)_1 βŠ— (i|1>)_2 βŠ— |1>_3 = (ii) |1111> = -|1111>. P|1111> = |1>_0 βŠ— (Y|1>)_1 βŠ— (Y|1>)_2 βŠ— |1>_3 = |1>_0 βŠ— (-i|0>)_1 βŠ— (-i|0>)_2 βŠ— |1>_3 = (-i)*(-i) |1001> = -|1001>. So then P|ψ> = (1/2)[ -|0110> - |0000> - |1111> - |1001> ] = -|ψ>. So that gives <ψ|P|ψ> = -1, so squared is 1. So again, we get that for Paulis on {1,2}, the ones that yield nonzero are: X_1 X_2, Y_1 Y_2, Z_1 Z_2. But wait: What about Paulis like X_1 I_2? Check: P = X_1 I_2. Then: P|0000> = |0>_0 βŠ— (X|0>)_1 βŠ— |0>_2 βŠ— |0>_3 = |0100> which is not in support. So indeed, the pattern is: For errors on a pair of qubits that are either {0,3} or {1,2}, the only errors that do not destroy the state (i.e., yield overlap 1) are those that are the same Pauli on both qubits? But careful: For {0,3}, we found: X_0 X_3, Y_0 Y_3, Z_0 Z_3. For {1,2}, we found: X_1 X_2, Y_1 Y_2, Z_1 Z_2. But wait: Could there be something like X_0 Z_3? That we already checked: gives 0. So indeed, for each pair, out of 15 non-identity Paulis, exactly 3 give overlap 1, and the other 12 give overlap 0.

Now, what about errors that are products from both channels? That is, errors on both {0,3} and {1,2} simultaneously. Then the error is of the form: P = (Οƒ_0 βŠ— Ο„_3) * (Ξ±_1 βŠ— Ξ²_2) with Οƒ,Ο„ not both I? Actually, careful: They come from independent channels. So the error is: E on {0,3} and F on {1,2}. And we want |<ψ| (E F) |ψ>|^2. Since E and F act on disjoint sets, and we already determined that for E to give nonzero, E must be one of the 3 types: X_0 X_3, Y_0 Y_3, Z_0 Z_3. And for F to give nonzero, F must be one of: X_1 X_2, Y_1 Y_2, Z_1 Z_2. But then what is the combined effect? Let’s check: Suppose E = X_0 X_3 and F = X_1 X_2. Then overall, P = X_0 X_1 X_2 X_3. Then P|ψ> = ? |ψ> = (|0000>+|0110>+|1001>+|1111>)/2. Apply X on all qubits: That sends |0000> -> |1111>, |0110> -> |1001>, |1001> -> |0110>, |1111> -> |0000>. So indeed, P|ψ> = |ψ>. So overlap = 1. What if E = X_0 X_3 and F = Y_1 Y_2? Then P = X_0 Y_1 Y_2 X_3. Compute: P|0000> = X_0|0> = |1>_0, Y_1|0> = i|1>_1, Y_2|0> = i|1>_2, X_3|0> = |1>_3, so product phase: ii = -1, so P|0000> = -|1111>. P|0110> = X_0|0> = |1>_0, Y_1|1> = -i|0>_1, Y_2|1> = -i|0>_2, X_3|0> = |1>_3, product phase: (-i)(-i)= -1, so P|0110> = -|1001>? Actually careful: |0110> becomes: qubit0: becomes 1, qubit1: from 1 to 0, qubit2: from 1 to 0, qubit3: from 0 to 1, so that gives |1001> indeed. So P|0110> = -|1001>. P|1001> = X_0|1> = |0>_0, Y_1|0> = i|1>_1, Y_2|0> = i|1>_2, X_3|1> = |0>_3, product phase: ii = -1, so P|1001> = -|0110>. P|1111> = X_0|1> = |0>_0, Y_1|1> = -i|0>_1, Y_2|1> = -i|0>_2, X_3|1> = |0>_3, product phase: (-i)(-i)= -1, so P|1111> = -|0000>. So then P|ψ> = (1/2)[ -|1111> - |1001> - |0110> - |0000> ] = -|ψ>. So overlap = -1, so squared is 1. So it seems that if both E and F are among the ones that individually give overlap 1, then their product also gives overlap 1? But wait, check: What if E = X_0 X_3 and F = Z_1 Z_2? Then P = X_0 Z_1 Z_2 X_3. Compute: P|0000> = X_0|0> = |1>_0, Z_1|0> = |0>_1, Z_2|0> = |0>_2, X_3|0> = |1>_3, so P|0000> = |1001>. P|0110> = X_0|0> = |1>_0, Z_1|1> = -|1>_1, Z_2|1> = -|1>_2, X_3|0> = |1>_3, so product phase: (-1)(-1)=1, so P|0110> = |1111>. P|1001> = X_0|1> = |0>_0, Z_1|0> = |0>_1, Z_2|0> = |0>_2, X_3|1> = |0>_3? Actually, careful: X_3|1> = |0>_3, so P|1001> = |0000>. P|1111> = X_0|1> = |0>_0, Z_1|1> = -|1>_1, Z_2|1> = -|1>_2, X_3|1> = |0>_3, so product phase: (-1)(-1)=1, so P|1111> = |0110>. So then P|ψ> = |ψ>. So indeed, if E and F are both from the set of 3 that give overlap 1, then the combined error E F also gives overlap 1. But wait: Is that always true? Let’s check a potential counter: E = Y_0 Y_3 and F = Y_1 Y_2 we already did: that gave -|ψ> so squared is 1. So it appears that if an error on {0,3} is one of the 3 (which are: X_0X_3, Y_0Y_3, Z_0Z_3) and an error on {1,2} is one of the 3 (X_1X_2, Y_1Y_2, Z_1Z_2), then the combined error is a Pauli that acts as the same Pauli on all four qubits? Actually, note: The product of, say, X_0X_3 and X_1X_2 gives X on all qubits. And the product of X_0X_3 and Y_1Y_2 gives X_0 Y_1 Y_2 X_3. That is not necessarily a tensor product of the same Pauli on each qubit? But we computed it and it gave -|ψ>. So indeed, it seems that if both errors are from these sets, then the overall error is actually a stabilizer of |ψ>? But wait, is that true? Check: The stabilizers of the code are XXXX and ZZZZ. Our state |ψ> is in the code space. But is it stabilized by, say, X_0 Y_1 Y_2 X_3? That operator, if we multiply it by XXXX, we get? XXXX * (X_0 Y_1 Y_2 X_3) = (X_0X_0) (X_1Y_1) (X_2Y_2) (X_3X_3) = I * (iZ_1) * (iZ_2) * I = - Z_1 Z_2. That is not necessarily identity. So it’s not a stabilizer. But it might still leave |ψ> invariant? Actually, we computed explicitly that X_0 Y_1 Y_2 X_3 |ψ> = -|ψ>. So it is an eigenvector with eigenvalue -1. So it’s not a stabilizer (which would require eigenvalue +1), but it is still a logical operator? Actually, logical operators on the code space can have eigenvalues Β±1. So indeed, these errors are actually logical operators. And since our state is a specific logical state (the GHZ state), it might be an eigenvector of some logical operators. So it seems that if an error on {0,3} is from the set of 3 and an error on {1,2} is from the set of 3, then the combined error gives overlap 1. But wait: What if one error is from the set and the other is not? Then the overall error will have zero overlap because it will map some basis state outside the support. So indeed, for the combined errors, the only ones that yield nonzero fidelity are those where both the error on {0,3} is one of the 3 and the error on {1,2} is one of the 3. That gives 3*3 = 9 combinations out of 225. But careful: There is also the possibility that both errors are identity? But that’s already counted in the no-error case. So for the double error case (both CNOTs have an error), the contribution to fidelity is: probability p^2/225 * (number of pairs that yield overlap 1) = p^2/225 * 9 = p^2/25.

But wait: Also consider the case where only one error occurs. For error on {0,3} only: That gives: probability: p(1-p)/15 * (number of errors that yield overlap 1) = p(1-p)/15 * 3 = p(1-p)/5. Similarly, for error on {1,2} only: p(1-p)/15 * 3 = p(1-p)/5. And no error: (1-p)^2.

So then the total fidelity F = (1-p)^2 + 2 * [p(1-p)/5] + [p^2/25] = (1-p)^2 + (2p(1-p))/5 + p^2/25. Let’s simplify: (1-p)^2 = 1 - 2p + p^2. So F = 1 - 2p + p^2 + (2p/5 - 2p^2/5) + p^2/25 = 1 - 2p + p^2 + 0.4p - 0.4p^2 + 0.04p^2 = 1 - (2 - 0.4)p + (1 - 0.4 + 0.04)p^2 = 1 - 1.6p + (0.64)p^2 = 1 - (8/5)p + (16/25)p^2? Because 1.6 = 8/5, and 0.64 = 16/25. And indeed, (1 - (4/5)p)^2 = 1 - (8/5)p + (16/25)p^2. So F = (1 - 4p/5)^2. So the physical state fidelity is F = (1 - 4p/5)^2.

But wait: Is that the final answer? The problem asks: “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?” That would be F = 1 - (8/5)p + (16/25)p^2, or equivalently (1 - 4p/5)^2. But wait: Could there be contributions from errors that are not Pauli? But we assumed that the error channel is depolarizing on the two qubits. And we computed the average fidelity. So yes.

But wait: There is also the possibility that the errors might occur on the Hadamard gates? The problem statement says: “each CNOT_{ij} gate in the circuit has a two qubit depolarizing error channel following it”. So only CNOT gates get errors. So our analysis is correct.

Thus the answer for Subproblem 1 is: F = (1 - 4p/5)^2.

But let’s double-check: The probability that no error occurs on either CNOT is (1-p)^2. That gives fidelity 1. The probability that exactly one CNOT has an error: 2p(1-p). Out of these, only 3/15 = 1/5 of the errors on that CNOT will actually not disturb the state? But wait: Is it exactly 1/5? That would give fidelity contribution: 2p(1-p)(1/5) = 2p(1-p)/5. The probability that both CNOTs have errors: p^2. And then the fraction of error pairs that leave the state invariant is: (3/15)(3/15) = 9/225 = 1/25. So then fidelity from that is p^2/25. So total fidelity = (1-p)^2 + 2p(1-p)/5 + p^2/25 = 1 - 2p + p^2 + 0.4p - 0.4p^2 + 0.04p^2 = 1 - 1.6p + 0.64p^2 = (1 - 0.8p)^2 = (1 - 4p/5)^2. Yes.

So answer: F = 1 - \frac{8}{5}p + \frac{16}{25}p^2, or simpler: \left(1 - \frac{4p}{5}\right)^2.

Thus final answer for Subproblem 1: Final Answer:

\[ F = \left(1 - \frac{4p}{5}\right)^2 \]

I’ll put that in a box.

But wait: The problem might expect an expression in terms of p. So I’ll give: \boxed{\left(1 - \frac{4p}{5}\right)^2}

I’ll now produce the step-by-step derivation.

Step 1. Understand the Circuit and Error Model

We wish to prepare the logical GHZ state

\[ |\psi_{\text{ideal}}\rangle = \frac{|00\rangle_{AB} + |11\rangle_{AB}}{\sqrt{2}} \]

in the \([[4,2,2]]\) code, using the circuit:

\[ (\text{CNOT}_{03}) (H_0) (\text{CNOT}_{21}) (H_2). \]

Operations are applied from right to left:

  1. \(H_2\)
  2. \(\text{CNOT}_{21}\)
  3. \(H_0\)
  4. \(\text{CNOT}_{03}\)

Each \(\text{CNOT}\) gate is followed by a two-qubit depolarizing error channel acting on its target and control qubits. The error channel applies one of the 15 non-identity two-qubit Pauli operators with probability \(p/15\), and identity with probability \(1 - p\). Hadamard gates are error-free.

The initial state is \(|0000\rangle\).


Step 2. Ideal State Preparation

Apply the circuit without errors:

  • Apply \(H_2\):
\[ H_2|0\rangle_2 = \frac{|0\rangle + |1\rangle}{\sqrt{2}} \Rightarrow |\psi_1\rangle = |0\rangle_0 |0\rangle_1 \left( \frac{|0\rangle + |1\rangle}{\sqrt{2}} \right)_2 |0\rangle_3 \]
  • Apply \(\text{CNOT}_{21}\):
    Control qubit 2, target qubit 1:
\[ |\psi_2\rangle = \frac{1}{\sqrt{2}} \left( |0\rangle_0 |00\rangle_{12} |0\rangle_3 + |0\rangle_0 |11\rangle_{12} |0\rangle_3 \right) \]
  • Apply \(H_0\):
\[ H_0|0\rangle_0 = \frac{|0\rangle + |1\rangle}{\sqrt{2}} \Rightarrow |\psi_3\rangle = \frac{1}{2} \left( |0000\rangle + |0110\rangle + |1000\rangle + |1110\rangle \right) \]
  • Apply \(\text{CNOT}_{03}\):
    Control qubit 0, target qubit 3:
\[ |\psi_{\text{ideal}}\rangle = \frac{1}{2} \left( |0000\rangle + |0110\rangle + |1001\rangle + |1111\rangle \right) \]

This is the desired logical GHZ state.


Step 3. Incorporating Errors

The actual circuit includes error channels after each \(\text{CNOT}\):

  • After \(\text{CNOT}_{21}\): error channel on qubits \(\{1,2\}\)
  • After \(\text{CNOT}_{03}\): error channel on qubits \(\{0,3\}\)

Since subsequent gates (\(H_0\) and \(\text{CNOT}_{03}\)) act on disjoint qubits, the errors commute with them. Thus, the errors can be pushed to the end of the circuit. The final state is equivalent to applying the ideal unitary \(U\), followed by independent error channels on qubit pairs \(\{0,3\}\) and \(\{1,2\}\).

Each error channel applies:

  • Identity with probability \(1 - p\)
  • One of the 15 non-identity two-qubit Pauli operators with probability \(p/15\)

Step 4. Computing the Fidelity

The fidelity is

\[ F = \langle \psi_{\text{ideal}} | \rho | \psi_{\text{ideal}} \rangle, \]

where \(\rho\) is the final density matrix.

Let \(P\) be a Pauli error. Then

\[ \langle \psi_{\text{ideal}} | P | \psi_{\text{ideal}} \rangle = \begin{cases} \pm1 & \text{if } P|\psi_{\text{ideal}}\rangle = \pm|\psi_{\text{ideal}}\rangle \\ 0 & \text{otherwise} \end{cases} \]

So, \(| \langle \psi_{\text{ideal}} | P | \psi_{\text{ideal}} \rangle |^2 = 1\) if \(P\) preserves the state (up to a phase), and 0 otherwise.

(a) Errors on \(\{0,3\}\)

There are 15 non-identity Pauli operators on qubits \(\{0,3\}\). Only the following 3 preserve the state:

  • \(X_0 X_3\)
  • \(Y_0 Y_3\)
  • \(Z_0 Z_3\)

Each gives \(| \langle \psi_{\text{ideal}} | P | \psi_{\text{ideal}} \rangle |^2 = 1\). The other 12 give 0.

(b) Errors on \(\{1,2\}\)

Similarly, only 3 operators preserve the state:

  • \(X_1 X_2\)
  • \(Y_1 Y_2\)
  • \(Z_1 Z_2\)

Each gives \(| \langle \psi_{\text{ideal}} | P | \psi_{\text{ideal}} \rangle |^2 = 1\). The other 12 give 0.

(c) Combined Errors

If errors occur on both pairs, the combined operator \(P = P_{\{0,3\}} \otimes P_{\{1,2\}}\) preserves the state only if both individual errors are among the 3 preserving ones. There are \(3 \times 3 = 9\) such combinations, each with \(| \langle \psi_{\text{ideal}} | P | \psi_{\text{ideal}} \rangle |^2 = 1\).


Step 5. Summing Contributions

Let \(F\) be the fidelity. Then:

  • No error: probability \((1 - p)^2\), fidelity = 1
    β†’ Contribution: \((1 - p)^2\)

  • Error on \(\{0,3\}\) only: probability \(p(1 - p)\), fraction preserving = \(3/15 = 1/5\)
    β†’ Contribution: \(p(1 - p) \cdot \frac{1}{5}\)

  • Error on \(\{1,2\}\) only: probability \(p(1 - p)\), fraction preserving = \(1/5\)
    β†’ Contribution: \(p(1 - p) \cdot \frac{1}{5}\)

  • Errors on both pairs: probability \(p^2\), fraction preserving = \(\frac{3}{15} \cdot \frac{3}{15} = \frac{1}{25}\)
    β†’ Contribution: \(p^2 \cdot \frac{1}{25}\)

Total fidelity:

\[ \begin{aligned} F &= (1 - p)^2 + 2 \cdot \frac{p(1 - p)}{5} + \frac{p^2}{25} \\ &= 1 - 2p + p^2 + \frac{2p}{5} - \frac{2p^2}{5} + \frac{p^2}{25} \\ &= 1 - \left(2 - \frac{2}{5}\right)p + \left(1 - \frac{2}{5} + \frac{1}{25}\right)p^2 \\ &= 1 - \frac{8}{5}p + \frac{16}{25}p^2 \\ &= \left(1 - \frac{4p}{5} \right)^2 \end{aligned} \]

Final Answer

\[ \boxed{\left(1 - \frac{4p}{5}\right)^2} \]
User #3

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 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$.

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

    Outputs
    ----------
    F_physical: sympy.Expr, the physical state fidelity of the final physical 4-qubit state
    """

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

    return F_physical
Assistant #4
Reasoning (model)

We are given that the fidelity is (1 - 4p/5)^2. We can write this as a SymPy expression. Note: We are to return a SymPy expression in terms of p.

import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of 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$.

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

    Outputs
    ----------
    F_physical: sympy.Expr, the physical state fidelity of the final physical 4-qubit state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_physical = (1 - 4*p/5)**2
    # ---------------------------------------------------------------

    return F_physical