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).
\]
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?”
Interpretation: We have the same circuit as before. But now we are post-selecting on detectable errors. That means we measure the stabilizers (XXXX and ZZZZ) and only keep outcomes that are +1? But careful: The [[4,2,2]] code has distance 2, so it can detect any single-qubit error? Actually, it’s a detection code. The stabilizers are XXXX and ZZZZ. The detectable errors are those that anti-commute with at least one stabilizer. But note: The code can detect any error that is not in the normalizer of the stabilizer group? Actually, the code detects errors that are not in the stabilizer group? Actually, if an error commutes with all stabilizers, it is undetectable. So detectable errors are those that anti-commute with at least one stabilizer.
We want: “logical state fidelity” after post-selection on all detectable errors. That means we discard any outcome where an error is detected. So we only consider cases where no error is detected. But careful: There might be errors that are not detected? They are undetectable errors. Those will affect the logical state fidelity.
So we need to compute: Given the error model (each CNOT gate followed by a depolarizing error on the two qubits involved, with probability p/15 for each non-identity Pauli on that pair), what is the fidelity of the logical state after we post-select on measurements that yield no error detection? That is, we assume we measure the stabilizers XXXX and ZZZZ. If we get -1 on either, we discard. So we only keep runs where both stabilizers give +1. In those runs, the state is in the code space. But it might be a logical error. So we want the fidelity of the logical state relative to the ideal logical state.
So we need to analyze which errors from the error channels are detectable and which are undetectable. And then compute the probability that no error occurs (which gives fidelity 1) and the probability that an undetectable error occurs (which might reduce fidelity). And then normalize by the total probability of success (post-selection probability).
Let’s denote the error channels as before: They act on pairs: first error on qubits {2,1} and second on qubits {0,3}. And we already moved them to the end. So the overall effect is: The ideal state |ψ> is subjected to two independent depolarizing channels on disjoint pairs: E_{21} and E_{03}. So the final state (before post-selection) is:
ρ = E_{03} ∘ E_{21} (|ψ><ψ|) with |ψ> = |Φ^+>{03} ⊗ |Φ^+>{12}.
Now, we want to post-select on the state being in the code space. The code space of the [[4,2,2]] code is the space stabilized by S1 = XXXX and S2 = ZZZZ. So we measure these stabilizers. If the state is not in the +1 eigenspace, we discard.
So we want to compute the conditional state given that both stabilizers measure +1. And then compute the fidelity of that state to the ideal logical state |ψ_logical> = (|00>_AB + |11>_AB)/√2. But careful: The ideal state |ψ> is exactly that logical state? Actually, yes: |ψ> is the encoded GHZ state. So we want the overlap with |ψ>.
So we need to determine which Pauli errors (from the error channels) leave the state in the code space? That is, which Pauli errors E such that E|ψ> is still in the code space? But careful: The error channels apply Pauli operators on the pairs. So the errors are of the form: P on qubits {2,1} and Q on qubits {0,3}. So overall error operator: R = Q_{03} ⊗ P_{12}. And we want to know: For which R does R|ψ> lie in the code space? That is equivalent to: R commutes with the stabilizers? Actually, if R is a logical operator (including stabilizers), then R|ψ> is in the code space. But if R anti-commutes with a stabilizer, then R|ψ> is orthogonal to the code space? Actually, if |ψ> is in the code space, then S|ψ> = |ψ>. Then if R anti-commutes with S, then S R|ψ> = - R S|ψ> = - R|ψ>, so R|ψ> is in the -1 eigenspace of S. So it will be detected. So post-selection means we only keep errors that commute with both stabilizers. So we need to find all Pauli operators on the 4 qubits that commute with XXXX and ZZZZ. That is the normalizer of the stabilizer group. The stabilizer group is generated by XXXX and ZZZZ. The normalizer (within Pauli group) consists of Pauli operators that commute with both. What are these? They are exactly the logical operators and the stabilizers themselves. But careful: The code is [[4,2,2]], so there are 2 logical qubits. The logical operators are given: X_A = XIXI, X_B = XXII, Z_A = ZZII, Z_B = ZIZI. And also products. So the normalizer group (modulo phases) has size? Actually, the full normalizer of the stabilizer group in the Pauli group on 4 qubits: The stabilizer group has 4 elements? Actually, generated by XXXX and ZZZZ, so there are 4 stabilizers: I, XXXX, ZZZZ, and XXXX ZZZZ = -YYYY? But careful: XXXX * ZZZZ = (XZ)(XZ)(XZ)(XZ) = (-iY)^4? Actually, compute: X Z = -i Y, so (X Z)^4 = (-i)^4 Y^4 = 1? Actually, careful: For each qubit, X_i Z_i = -i Y_i. So product over i: (X1 Z1)(X2 Z2)(X3 Z3)(X4 Z4) = (-i)^4 Y1 Y2 Y3 Y4 = YYYY. So XXXX * ZZZZ = YYYY. But wait, check signs: XXXX and ZZZZ commute? They commute because they act on different Paulis? Actually, X and Z anticommute on the same qubit, but here they are on all qubits. Actually, XXXX and ZZZZ: For each qubit, X and Z anticommute. So product of signs: There are 4 qubits, so overall they commute if even number? Actually, check: XXXX * ZZZZ = (X1X2X3X4)(Z1Z2Z3Z4) = (-1)^4 (Z1Z2Z3Z4)(X1X2X3X4) = they commute. So the stabilizer group is {I, XXXX, ZZZZ, XXXX ZZZZ} but note: XXXX ZZZZ = YYYY? But careful: XXXX ZZZZ = (X1Z1)(X2Z2)(X3Z3)(X4Z4) = (-iY1)(-iY2)(-iY3)(-iY4) = (-i)^4 Y1Y2Y3Y4 = YYYY. So yes.
So the stabilizer group has 4 elements. The normalizer of this group in the Pauli group on 4 qubits: The Pauli group on 4 qubits has 4^4 * center? Actually, the Pauli group modulo phases has size 4^4 = 256. The normalizer of the stabilizer group will be those Paulis that commute with XXXX and ZZZZ. Let’s determine conditions. A Pauli operator is of the form i^c * X^a Z^b, where a,b are binary vectors of length 4. Commutation with XXXX: XXXX is X⊗X⊗X⊗X. A Pauli operator P = ± X^a Z^b commutes with XXXX if and only if the number of qubits where both have X and Z? Actually, simpler: XXXX commutes with a Pauli if and only if the product of the signs from each qubit is 1. For each qubit, if the Pauli has either I, X, Y, Z? Actually, XXXX is all X. So for a single qubit, X commutes with I and X, but anticommutes with Z and Y. So overall, XXXX commutes with a Pauli if and only if the number of qubits where the Pauli is Z or Y is even. Similarly, ZZZZ commutes with a Pauli if and only if the number of qubits where the Pauli is X or Y is even.
So the condition for a Pauli (ignoring phase) to be in the normalizer is: The number of qubits with Pauli in {Z, Y} is even, and the number of qubits with Pauli in {X, Y} is even.
Now, our errors come from two independent channels on pairs: {0,3} and {2,1}. So we want to list all Pauli errors on these pairs that commute with both stabilizers. But careful: The errors are applied as: R = Q on {0,3} and P on {2,1}. So overall, the Pauli is on qubits: qubit0: from Q, qubit3: from Q, qubit2: from P, qubit1: from P.
Let’s label qubits: 0,1,2,3. But careful: Our pairs: The first error acts on qubits {2,1}? Actually, the circuit: CNOT_{21} so that acts on qubits 2 and 1. So the error channel after that acts on qubits 2 and 1. And the second error acts on qubits 0 and 3.
So let’s denote:
For qubits 0 and 3: error operator Q. Q can be any of the 16 Paulis on two qubits (including identity). But we are interested in non-identity? Actually, we want to compute the probability of success and the fidelity conditional on success.
For qubits 1 and 2: error operator P.
Now, the condition for the overall Pauli R = Q ⊗ P (tensor product on qubits: qubit0 from Q, qubit3 from Q, qubit1 from P, qubit2 from P) to be in the normalizer (i.e., undetectable) is:
Condition from XXXX: The number of qubits where the Pauli is Z or Y must be even.
Condition from ZZZZ: The number of qubits where the Pauli is X or Y must be even.
Let’s denote the Pauli on each qubit as:
Q on qubits 0 and 3: Let Q = A ⊗ B, where A acts on qubit0, B acts on qubit3.
P on qubits 1 and 2: Let P = C ⊗ D, where C acts on qubit1, D acts on qubit2.
But careful: The ordering: qubits: 0,1,2,3. So:
Q gives: qubit0: type from A, qubit3: type from B.
P gives: qubit1: type from C, qubit2: type from D.
Now, condition from XXXX: The Pauli on each qubit:
Qubit0: if A is Z or Y, then count 1.
Qubit1: if C is Z or Y, count 1.
Qubit2: if D is Z or Y, count 1.
Qubit3: if B is Z or Y, count 1.
Total must be even.
Condition from ZZZZ:
Qubit0: if A is X or Y, count 1.
Qubit1: if C is X or Y, count 1.
Qubit2: if D is X or Y, count 1.
Qubit3: if B is X or Y, count 1.
Total must be even.
Now, note that our ideal state |ψ> is a product of two Bell states on pairs (0,3) and (1,2). And we are applying errors that are products on these pairs. So it might be easier to analyze each pair separately? But careful: The conditions for being undetectable are global conditions across all four qubits. However, because the errors are independent on the two pairs, we can compute the probability that an error on a given pair is “allowed” (i.e., when combined with some error on the other pair, the overall is undetectable)? But actually, post-selection: We measure stabilizers. That means we only keep if both stabilizers give +1. That condition depends on both errors. So we need to consider joint errors.
Maybe we can compute: The total probability of success (no detection) is sum over all error patterns R that commute with stabilizers of the probability that R occurs. And then among those, the fidelity is: <ψ| R |ψ>? But careful: If R is a logical operator that is not the identity, then R|ψ> might be a different logical state. So we need to compute the overlap with |ψ>. For a Pauli R that is in the normalizer, R|ψ> will be some logical state. The fidelity contribution from that error pattern is |<ψ| R |ψ>|^2. And if R is a stabilizer, then R|ψ> = |ψ> because |ψ> is in the code space? Actually, check: If R is a stabilizer, then R|ψ> = |ψ> if the stabilizer is +1. But careful: The stabilizers are XXXX and ZZZZ. But our state |ψ> is a logical state. Is it stabilized by these? Yes, because it’s in the code space. So if R is in the stabilizer group, then R|ψ> = |ψ>. So fidelity = 1.
If R is a logical operator that is not the identity on the logical qubits, then it might flip the logical state. For example, if R = X_A, then X_A|ψ> = ? |ψ> is (|00>+|11>)/√2. X_A acts on logical qubit A. That would give (|10>+|01>)/√2, which is orthogonal to |ψ> if |ψ> is GHZ? Actually, careful: The logical GHZ state is (|00>AB + |11>_AB)/√2. If we apply X on qubit A, we get (|10>+|01>)/√2, which has overlap 0 with the original. So fidelity = 0.
But wait: There might be logical operators that are not identity but still leave |ψ> invariant? For example, if we apply X_A X_B, then that sends |00> to |11> and |11> to |00>? Actually, X_A X_B on |00> gives |11> and on |11> gives |00>, so it actually leaves the state invariant? Check: (|00>+|11>)/√2 under X_A X_B becomes (|11>+|00>)/√2 = same state. So operators that are logical operators that are products of X on both logical qubits might preserve the GHZ state? But careful: Our logical operators are given: X_A = XIXI, X_B = XXII. So X_A X_B = (XIXI)(XXII) = ? Actually, compute: X_A X_B: On qubit0: X from X_A and X from X_B gives X? Actually, careful: X_A = X on qubit0? Actually, given: X_A = XIXI. That means: qubit0: X, qubit1: I, qubit2: X, qubit3: I? Wait: The notation: X_A = XIXI. The qubits are labeled 0,1,2,3. So X_A acts on qubit0 and qubit2? But then X_B = XXII acts on qubits 0 and 1? That is interesting: They overlap on qubit0. So then X_A X_B = (X on qubit0 from both gives X^2=I?) Actually, careful: XIXI means: Pauli on qubit0: X, qubit1: I, qubit2: X, qubit3: I. And XXII means: qubit0: X, qubit1: X, qubit2: I, qubit3: I. So their product: qubit0: X * X = I, qubit1: I * X = X, qubit2: X * I = X, qubit3: I * I = I. So X_A X_B = I X X I? That is not necessarily a stabilizer? Check commutation with stabilizers: XXXX would require? Actually, it might be a logical operator. But then does it preserve the GHZ state? The GHZ state is (|00>_AB+|11>_AB)/√2. Under X_A X_B, logical state: |00> goes to? X_A X_B on logical qubits: Actually, we need to know the action on logical states. The logical operators are defined. But maybe we can compute the overlap <ψ| R |ψ> directly from the fact that |ψ> factors as Bell states on (0,3) and (1,2). And R is a product of errors on these pairs. So we can compute <ψ| R |ψ> = <Φ^+|{03} Q |Φ^+>{03} * <Φ^+|{12} P |Φ^+>{12}. And we already computed that for a two-qubit Pauli on a Bell state, the overlap is nonzero only if the Pauli is of the form A⊗A (symmetric) and then it is ±1. So actually, for an error pattern R = Q ⊗ P (on pairs (0,3) and (1,2)), the fidelity contribution is:
F(R) = |<ψ|R|ψ>|^2 = (|<Φ^+|Q|Φ^+>|^2) * (|<Φ^+|P|Φ^+>|^2). And we know that for a two-qubit Pauli on a Bell state, if it is of the form I⊗I, X⊗X, Y⊗Y, Z⊗Z, then the squared overlap is 1. For any other Pauli, it is 0.
So that means that even if R is an undetectable error (commutes with stabilizers), if it does not have the form that gives overlap 1 on each pair, then the fidelity will be 0. But wait: Could there be an error that is undetectable but still gives overlap 0? For example, consider a stabilizer itself: XXXX. But XXXX on the whole state: That acts on qubits 0,1,2,3. But our errors are on pairs separately. But note: Our errors are products: Q on {0,3} and P on {1,2}. So can XXXX be written as a product of a Pauli on {0,3} and a Pauli on {1,2}? XXXX = (X on qubit0)(X on qubit3) * (X on qubit1)(X on qubit2) = (X⊗X){03} ⊗ (X⊗X){12}. So that is of the form Q = X⊗X and P = X⊗X. And then <Φ^+|X⊗X|Φ^+> = 1. So that gives fidelity 1.
What about ZZZZ? That is (Z⊗Z){03} ⊗ (Z⊗Z){12}. That gives fidelity 1.
What about XXXX ZZZZ = YYYY? That is (Y⊗Y){03} ⊗ (Y⊗Y){12}. But careful: <Φ^+|Y⊗Y|Φ^+> = -1, so squared is 1.
So stabilizers give fidelity 1.
What about a logical operator like X_A? X_A = XIXI. That means on qubits: qubit0: X, qubit1: I, qubit2: X, qubit3: I. But can that be factored as a product on pairs (0,3) and (1,2)? That would require: On pair (0,3): we need something that gives X on qubit0 and I on qubit3. That is X⊗I. On pair (1,2): we need I on qubit1 and X on qubit2. That is I⊗X. So X_A = (X⊗I){03} ⊗ (I⊗X){12}. But then <Φ^+|X⊗I|Φ^+> = 0 because it’s not symmetric. So fidelity = 0.
Similarly, X_B = XXII = (X on qubit0 and qubit1) but careful: XXII: qubit0: X, qubit1: X, qubit2: I, qubit3: I. That factors as (X⊗I){03}? Actually, on pair (0,3): qubit0: X, qubit3: I so that is X⊗I. On pair (1,2): qubit1: X, qubit2: I so that is X⊗I? But wait: That would be (X⊗I) ⊗ (X⊗I) but then overall: qubit0: X, qubit1: X, qubit2: I, qubit3: I. But that is not XXII? Actually, XXII means: qubit0: X, qubit1: X, qubit2: I, qubit3: I. So yes, X_B = (X⊗I){03} ⊗ (X⊗I){12}. But then <Φ^+|X⊗I|Φ^+> = 0. So fidelity = 0.
What about Z_A = ZZII = (Z on qubit0 and qubit1)? That factors as (Z⊗I){03} ⊗ (Z⊗I){12} so fidelity = 0.
Z_B = ZIZI = (Z on qubit0 and qubit2)? That factors as (Z⊗I){03}? Actually, careful: ZIZI: qubit0: Z, qubit1: I, qubit2: Z, qubit3: I. So on pair (0,3): (Z⊗I), on pair (1,2): (I⊗Z) so fidelity = 0.
What about products like X_A X_B? That we computed: X_A X_B = (I X X I) actually? Let’s compute properly:
X_A = XIXI: so on qubits: 0:X, 1:I, 2:X, 3:I.
X_B = XXII: so on qubits: 0:X, 1:X, 2:I, 3:I.
Product: qubit0: XX = I, qubit1: IX = X, qubit2: XI = X, qubit3: II = I.
So X_A X_B = I, X, X, I. That factors as: on pair (0,3): (I⊗I) and on pair (1,2): (X⊗X). So then fidelity = 1 * 1 = 1. So indeed, X_A X_B preserves the state.
Similarly, Z_A Z_B? Z_A = ZZII: qubit0:Z, qubit1:Z, qubit2:I, qubit3:I.
Z_B = ZIZI: qubit0:Z, qubit1:I, qubit2:Z, qubit3:I.
Product: qubit0: ZZ = I, qubit1: ZI = Z, qubit2: IZ = Z, qubit3: II = I.
So that is (I⊗I){03} and (Z⊗Z){12} so fidelity = 1.
What about X_A Z_A? That would be? But likely the pattern is: An error pattern R = Q ⊗ P will have nonzero fidelity if and only if Q is one of {I⊗I, X⊗X, Y⊗Y, Z⊗Z} and P is one of {I⊗I, X⊗X, Y⊗Y, Z⊗Z}. But wait: Is that sufficient for R to be undetectable? Let’s check: If Q is, say, X⊗X and P is I⊗I, then overall R = (X⊗X){03} ⊗ (I⊗I){12}. That is actually XXXX on qubits 0 and 3? But careful: That gives: qubit0: X, qubit1: I, qubit2: I, qubit3: X. That is not necessarily a stabilizer? Check commutation with XXXX: For qubit0: X -> count for Z? Actually, use conditions: For R = (X⊗X){03} and (I⊗I){12}. Then qubit0: X -> for XXXX: X is not Z or Y so count 0? Actually, condition: XXXX: count qubits with Pauli in {Z,Y}. Here qubit0: X -> 0; qubit1: I -> 0; qubit2: I -> 0; qubit3: X -> 0. So it commutes. For ZZZZ: count qubits with Pauli in {X,Y}. qubit0: X -> 1; qubit1: I -> 0; qubit2: I -> 0; qubit3: X -> 1; total 2, even. So it commutes. So it is undetectable. And indeed fidelity = 1.
What if Q = X⊗X and P = X⊗I? That would give fidelity 0 because <Φ^+|X⊗I|Φ^+>=0. But would that be undetectable? Check: R = (X⊗X){03} ⊗ (X⊗I){12}. Then qubits: 0: X, 1: X, 2: I, 3: X. For XXXX: count qubits with Z or Y: qubit0: X -> 0; qubit1: X -> 0; qubit2: I -> 0; qubit3: X -> 0; so okay. For ZZZZ: count qubits with X or Y: qubit0: X -> 1; qubit1: X -> 1; qubit2: I -> 0; qubit3: X -> 1; total 3, odd. So it would be detected. So indeed, for an error to be undetectable, it must that on each pair, the Pauli is either identity or one of the symmetric ones? But is that necessary? Let’s check: Suppose Q = X⊗I and P = I⊗X? That gives overall: qubit0: X, qubit1: I, qubit2: X, qubit3: I. That is X_A? Actually, X_A = XIXI. That we already determined: For XXXX: qubit0: X -> 0; qubit1: I -> 0; qubit2: X -> 0; qubit3: I -> 0; so okay. For ZZZZ: qubit0: X -> 1; qubit1: I -> 0; qubit2: X -> 1; qubit3: I -> 0; total 2, even. So that is undetectable. But fidelity: <Φ^+|X⊗I|Φ^+> = 0, and <Φ^+|I⊗X|Φ^+> = 0, so fidelity = 0. So indeed, even if undetectable, fidelity can be 0.
So pattern: For an error pattern R = Q ⊗ P to yield nonzero fidelity, we need that Q is in the set S = {I⊗I, X⊗X, Y⊗Y, Z⊗Z} and P is in S. And then fidelity = 1.
What about errors that are products of stabilizers? Those are in S as well because stabilizers are: XXXX = (X⊗X){03} (X⊗X){12} so that is both in S. ZZZZ = (Z⊗Z){03} (Z⊗Z){12}. And XXXX ZZZZ = (Y⊗Y){03} (Y⊗Y)_{12}. So indeed, the errors that preserve the state (fidelity=1) are exactly those where on each pair, the error is either identity or a Pauli that is the same on both qubits (X⊗X, Y⊗Y, Z⊗Z). But wait: Is that sufficient for the error to be undetectable? Check: If Q = X⊗X and P = I⊗I, then as above, it is undetectable. So yes.
So then, the successful post-selection events are those error patterns R that commute with both stabilizers. But note: Not all such patterns give fidelity 1. They give fidelity 1 only if additionally, on each pair, the error is symmetric. But wait: Could there be an error pattern that is undetectable but not of that form yet still gives fidelity 1? Consider: Q = X⊗I and P = X⊗I? That gives overall: qubit0: X, qubit1: X, qubit2: I, qubit3: I. That is X_B? Actually, X_B = XXII. Check: For XXXX: qubit0: X -> 0; qubit1: X -> 0; qubit2: I -> 0; qubit3: I -> 0; so okay. For ZZZZ: qubit0: X -> 1; qubit1: X -> 1; qubit2: I -> 0; qubit3: I -> 0; total 2, even. So it is undetectable. But fidelity: <Φ^+|X⊗I|Φ^+> = 0, so fidelity = 0. So no.
What about Q = X⊗I and P = I⊗X? That is X_A, fidelity 0.
What about Q = X⊗I and P = X⊗X? That gives: qubit0: X, qubit1: X, qubit2: X, qubit3: X? Actually, careful: Q = X⊗I means on pair (0,3): qubit0: X, qubit3: I. P = X⊗X means on pair (1,2): qubit1: X, qubit2: X. So overall: qubit0: X, qubit1: X, qubit2: X, qubit3: I. That pattern: For XXXX: qubit0: X -> 0; qubit1: X -> 0; qubit2: X -> 0; qubit3: I -> 0; so okay. For ZZZZ: qubit0: X -> 1; qubit1: X -> 1; qubit2: X -> 1; qubit3: I -> 0; total 3, odd. So actually, that would be detected. So it’s not undetectable.
So indeed, the condition for undetectability (commuting with stabilizers) actually forces that on each pair, the error must be either both identity or both non-identity? Let’s check: Suppose on pair (0,3), we have an error that is not symmetric, say X⊗I. For it to be undetectable, the condition from ZZZZ: The number of qubits with X or Y from pair (0,3) is 1 (from qubit0). So then from pair (1,2), we need an odd number of qubits with X or Y to make total even? That would be 1 or 3. But on two qubits, the only possibility to have an odd number is if exactly one qubit has X or Y and the other has I or Z? But then check XXXX condition: On pair (0,3), X⊗I: qubit0: X -> 0; qubit3: I -> 0 so that’s 0. So then pair (1,2) must have an even number of qubits with Z or Y. If we take on pair (1,2) an error like I⊗X, then that gives: qubit1: I -> 0; qubit2: X -> 0 so that’s 0. So overall, X⊗I on (0,3) and I⊗X on (1,2) gives undetectable? That is X_A. And we already computed that gives fidelity 0. So such errors are undetectable but yield fidelity 0.
So then, for the logical fidelity after post-selection, we only care about error patterns that are undetectable and that yield fidelity 1. And these are exactly the patterns where on each pair, the error is in the set S = {I, X⊗X, Y⊗Y, Z⊗Z}? But wait: Is it necessary that both pairs are in S? Consider: What if one pair is I and the other is something that is not in S but still gives overlap? But as we computed, for a Bell state, the only Paulis that give nonzero overlap are those in S. So indeed, for fidelity to be 1, we need that on each pair, the error is in S.
But wait: Could there be an error pattern that is not a product of errors on the pairs? But our errors come as independent on the pairs. So we only consider products.
So then, the successful events (post-selection) are those where the overall error R is such that it commutes with both stabilizers. But note: Even if R is in the normalizer, if it is not of the form with both pairs in S, then the fidelity is 0. But wait: Is it possible that an error pattern that is not in S on both pairs still gives fidelity 1? For example, if the error on one pair is something that gives phase -1? But then squared overlap is still 1. So indeed, we require that on each pair, the Pauli is either I, X⊗X, Y⊗Y, or Z⊗Z. But careful: For Y⊗Y, the overlap is -1, but squared is 1. So yes.
So then, the conditional logical fidelity will be:
F_logical = (Probability that error pattern is in the set that gives fidelity 1) / (Probability that error pattern is undetectable)
because if undetectable but not fidelity 1, then the state is orthogonal to the ideal state, so fidelity = 0.
So we need to compute:
P_success = probability that the overall error R (from both channels) is undetectable (i.e., commutes with both stabilizers).
And within that, P_good = probability that R is such that on pair (0,3), Q is in S, and on pair (1,2), P is in S. But careful: Is it true that if Q is in S and P is in S, then R is undetectable? Check: If Q is in S, then Q is either I, X⊗X, Y⊗Y, Z⊗Z. For any of these, what are the conditions? For Q = X⊗X: On qubits 0 and 3, for XXXX: none are Z or Y? Actually, X is not Z or Y, so count=0. For ZZZZ: both are X, so count=2 (even). So okay. For Y⊗Y: then each qubit is Y, so for XXXX: Y counts as 1 each, total 2 even; for ZZZZ: Y counts as 1 each, total 2 even. For Z⊗Z: then for XXXX: Z counts as 1 each, total 2 even; for ZZZZ: Z does not count? Actually, Z is not X or Y, so count=0. So yes. So indeed, if both pairs are in S, then R is undetectable. So the good events are a subset of the undetectable events.
But are there undetectable events that are not in S? Yes, as we saw: X_A = (X⊗I on (0,3)) and (I⊗X on (1,2)) is undetectable but not in S because X⊗I is not in S (since its overlap with Bell state is 0). So such events will be post-selected (they are undetectable) but they yield fidelity 0.
So then the logical fidelity after post-selection is:
F = (Probability of good events) / (Probability of undetectable events).
Now, we need to compute these probabilities from the error model.
The error channels are independent on the two pairs.
On each pair, the error channel is: With probability 1-p, no error (identity). With probability p, a random non-identity Pauli is applied uniformly among 15 possibilities.
So on a given pair (say pair (0,3)), the probability distribution over Paulis is:
P(Q = I) = 1-p.
For any non-identity Pauli, P(Q = specific Pauli) = p/15.
Similarly for pair (1,2).
Now, we want to compute:
P(undetectable) = Sum over Q and P such that R = Q⊗P commutes with stabilizers.
And P(good) = Sum over Q in S and P in S.
But careful: “undetectable” means that R is in the normalizer of the stabilizer group. But note: The normalizer includes also the stabilizers themselves. But that’s fine.
Let’s compute for one pair first: The set of Paulis on two qubits. There are 16. They can be categorized by their effect on the Bell state? But we need to know which ones, when combined with something on the other pair, yield undetectability. But since the conditions are global, we need to compute joint probabilities. But maybe we can compute the probability that a given error pattern on a pair is “compatible” with undetectability? But it depends on the other pair. So we need to sum over both pairs.
Let’s denote:
For pair (0,3): Let Q be a Pauli. For pair (1,2): Let P be a Pauli.
The condition for undetectability is:
Condition from XXXX: (number of qubits in {0,3} with Pauli in {Z,Y}) + (number from {1,2} with Pauli in {Z,Y}) is even.
Condition from ZZZZ: (number from {0,3} with Pauli in {X,Y}) + (number from {1,2} with Pauli in {X,Y}) is even.
Let’s define for a two-qubit Pauli on a pair (say on qubits i and j). Actually, careful: The pairs are (0,3) and (1,2). But note: The conditions are symmetric? Actually, they are symmetric if we swap the pairs? But careful: The conditions are on the total over all four qubits. So we can compute: For a given Pauli on two qubits, we can compute two parity bits:
a = parity of the number of qubits in that pair that have Pauli in {Z,Y}? Actually, we need the sum mod 2. So define for a Pauli Q on two qubits:
f_X(Q) = (number of qubits in that pair with Pauli in {X,Y}) mod 2.
f_Z(Q) = (number of qubits in that pair with Pauli in {Z,Y}) mod 2.
Then the conditions for undetectability for R = Q⊗P are:
f_X(Q) + f_X(P) ≡ 0 mod 2,
f_Z(Q) + f_Z(P) ≡ 0 mod 2.
So if we know the distribution of f_X and f_Z for Paulis on a pair, we can compute the probability that two independent Paulis (from the error channels) satisfy these conditions.
Also, what is the set S (good events)? S is the set of Paulis on two qubits that have nonzero overlap with the Bell state. As we determined, that is exactly the Paulis that are of the form: I, X⊗X, Y⊗Y, Z⊗Z. But wait: Is that all? Check: What about X⊗Y? That gives overlap 0. So yes.
So for a Pauli in S, what are f_X and f_Z?
For I: f_X(I)=0, f_Z(I)=0.
For X⊗X: On both qubits, Pauli is X. So f_X: X is in {X,Y} so each gives 1, so total 2 mod 2 = 0. f_Z: X is not in {Z,Y} so 0 mod 2 = 0.
For Y⊗Y: Each gives: Y is in both {X,Y} and {Z,Y}, so each gives 1, so total 2 mod 2 = 0 for both.
For Z⊗Z: f_X: Z is not in {X,Y} so 0; f_Z: Z is in {Z,Y} so each gives 1, so total 2 mod 2 = 0.
So indeed, for any Q in S, we have f_X(Q)=0 and f_Z(Q)=0.
What about other Paulis? They can have f_X and f_Z values of 0 or 1. Let’s compute for all two-qubit Paulis. There are 16. They are products of Paulis on each qubit. Let’s list by type? Actually, we can compute based on the number of qubits that are not I. But careful: f_X and f_Z are mod2 sums. For a single qubit Pauli:
I: f_X=0, f_Z=0.
X: f_X=1, f_Z=0.
Y: f_X=1, f_Z=1.
Z: f_X=0, f_Z=1.
So for a two-qubit Pauli Q = A ⊗ B, we have:
f_X(Q) = (f_X(A) + f_X(B)) mod 2.
f_Z(Q) = (f_Z(A) + f_Z(B)) mod 2.
So then the possible (f_X, f_Z) pairs for a two-qubit Pauli:
If Q = I⊗I: (0,0).
If Q = I⊗X: (1,0)
I⊗Y: (1,1)
I⊗Z: (0,1)
X⊗I: (1,0)
X⊗X: (0,0) because 1+1=2 mod2=0.
X⊗Y: (1+1=0 mod2? Actually, careful: X⊗Y: f_X(X)=1, f_X(Y)=1, so sum=0 mod2; f_Z(X)=0, f_Z(Y)=1, so sum=1 mod2) so (0,1)
X⊗Z: (1+0=1 mod2; 0+1=1 mod2) so (1,1)
Y⊗I: (1,1)
Y⊗X: (1+1=0, 1+0=1) so (0,1)
Y⊗Y: (1+1=0, 1+1=0) so (0,0)
Y⊗Z: (1+0=1, 1+1=0 mod2? Actually, f_Z(Y)=1, f_Z(Z)=1, so sum=0 mod2) so (1,0)
Z⊗I: (0,1)
Z⊗X: (0+1=1, 1+0=1) so (1,1)
Z⊗Y: (0+1=1, 1+1=0) so (1,0)
Z⊗Z: (0,0)
So summarizing: The 16 Paulis on two qubits have the following (f_X, f_Z) values:
(0,0): Which ones? I⊗I, X⊗X, Y⊗Y, Z⊗Z. That is 4.
(1,0): I⊗X, X⊗I, Y⊗Z, Z⊗Y. That is 4.
(0,1): I⊗Z, Z⊗I, X⊗Y, Y⊗X. That is 4.
(1,1): I⊗Y, Y⊗I, X⊗Z, Z⊗X. That is 4.
So indeed, evenly distributed: 4 each.
Now, the error channel on a pair: Probability that the Pauli is I: 1-p.
For each non-identity Pauli, probability = p/15.
So if we want to compute the probability that a given pair has a Pauli with a certain (f_X, f_Z) value, we can do:
For (0,0): That includes I and the other three non-identity ones that are in S? Actually, careful: (0,0) non-identity: X⊗X, Y⊗Y, Z⊗Z. So total probability for (0,0) on a pair = (1-p) + 3(p/15) = 1-p + p/5 = 1 - (4/5)p.
For (1,0): There are 4 non-identity Paulis with (1,0)? But wait: Is I included? No, I is (0,0). So for (1,0), probability = 4(p/15) = 4p/15.
Similarly, (0,1): probability = 4p/15.
(1,1): probability = 4p/15.
But careful: That sums to: 1-p + 3p/15 + 4p/15+4p/15+4p/15 = 1-p + 15p/15 = 1. Good.
Now, the condition for undetectability for two independent pairs is:
f_X(Q) + f_X(P) ≡ 0 mod 2, and f_Z(Q) + f_Z(P) ≡ 0 mod 2.
That means that (f_X(Q), f_Z(Q)) must equal (f_X(P), f_Z(P)). So the pairs must have the same parity pair.
So, the probability that the overall error R is undetectable is:
P(undetectable) = Sum over the four parity types of [Probability that pair1 has that type] * [Probability that pair2 has that type].
= [P(0,0)^2 + P(1,0)^2 + P(0,1)^2 + P(1,1)^2].
We computed: P(0,0) = 1 - 4p/5.
P(1,0) = 4p/15.
P(0,1) = 4p/15.
P(1,1) = 4p/15.
So then:
P(undetectable) = (1 - 4p/5)^2 + 3(4p/15)^2 = (1 - 4p/5)^2 + 3(16p^2/225) = (1 - 4p/5)^2 + (48p^2/225).
And (1 - 4p/5)^2 = 1 - 8p/5 + 16p^2/25 = 1 - 8p/5 + (16p^2/25). And 16/25 = (169)/(259)=144/225. So that becomes: 1 - 8p/5 + 144p^2/225.
So P(undetectable) = 1 - 8p/5 + 144p^2/225 + 48p^2/225 = 1 - 8p/5 + 192p^2/225.
Simplify 192/225 = divide by 3: 192/3=64, 225/3=75, so = 64p^2/75. So:
P(undetectable) = 1 - (8/5)p + (64/75)p^2.
Now, the good events are those where both pairs are in S. And S is exactly the set of Paulis with (0,0) parity. So:
P(good) = [P(0,0)]^2 = (1 - 4p/5)^2 = 1 - 8p/5 + 16p^2/25 = 1 - 8p/5 + (16/25)p^2. And 16/25 = (163)/(253)=48/75. So P(good) = 1 - 8p/5 + (48/75)p^2.
Then the logical fidelity after post-selection is:
F_logical = P(good) / P(undetectable) = [1 - 8p/5 + (48/75)p^2] / [1 - 8p/5 + (64/75)p^2].
We can simplify: Multiply numerator and denominator by 75:
F_logical = [75 - 120p + 48p^2] / [75 - 120p + 64p^2].
That is the logical fidelity.
But wait: Is that the final answer? It says: “What is the logical state fidelity … as a function of the two-qubit gate error rate p?” So answer:
F_logical = (75 - 120p + 48p^2) / (75 - 120p + 64p^2).
We can also simplify by dividing numerator and denominator by? 75,120,48 have common factor? 75,120,48: gcd(75,120)=15, but 48 is not divisible by 15. So maybe factor as?
= (3(25) - 3(40)p + 48p^2) not simpler.
Alternatively, write as: = 1 - (16p^2/75) / denominator? Actually,
F = 1 - (16p^2/75) / (1 - 8p/5 + 64p^2/75) = 1 - (16p^2)/(75 - 120p + 64p^2). So that is another form.
But maybe we keep as:
F_logical = \frac{75 - 120p + 48p^2}{75 - 120p + 64p^2}.
I’ll check: For small p, F_logical ≈ 1 - (16/75)p^2? That seems plausible.
Thus final answer for Subproblem 2.
I’ll now produce the final answer in the required format.