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: Now we want logical state fidelity. And we assume post-selection on all detectable errors. That means that if an error occurs that is detectable by the code, we discard the state. Only if no detectable error occurs, we keep the state. And then we compute the fidelity of the logical state conditioned on passing post-selection.
The [[4,2,2]] code has distance 2. It can detect any single-qubit error? Actually, [[4,2,2]] code: It encodes 2 logical qubits into 4 physical qubits with distance 2. That means it can detect any single-qubit error? Actually, distance 2 means it can detect any error on 1 qubit? But careful: The stabilizers are XXXX and ZZZZ. So any single-qubit Pauli error will anti-commute with at least one stabilizer? Check: A single-qubit X error on qubit 0: That will anti-commute with ZZZZ? Actually, ZZZZ commutes with X on one qubit? Because X and Z anticommute. So yes, it will be detected. So any single-qubit error is detectable. But wait: The errors we have are two-qubit errors from depolarizing channels on pairs. But these errors might be detectable or not. We want to post-select on all detectable errors. That means if the error is detectable, we discard the state. So only if the error is undetectable (i.e., it is a logical operator or stabilizer) then we keep the state. And then we compute the fidelity of the logical state.
From previous analysis: The final state after ideal circuit and then errors is:
Ο = (1-p)^2 |Ο><Ο| + … etc.
But now we post-select: We only keep states that are not detected as errors. Which errors are detectable? The code’s stabilizers are S1 = XXXX and S2 = ZZZZ. An error is detectable if it anti-commutes with at least one stabilizer. An error is undetectable if it commutes with both stabilizers. That means the error is in the normalizer of the stabilizer group. That includes the stabilizers themselves and the logical operators. But careful: The state |Ο> is a specific logical state. Even if an error is a logical operator, it might change the logical state. For example, a logical X on one logical qubit would change |00> to |10> etc. So we want the fidelity of the logical state. So we want that the error, if it is undetectable, should actually be such that it leaves the logical state invariant (up to a phase) or at least does not change the logical information? But wait: “logical state fidelity” means: We want the state to be the desired logical GHZ state. So if an error is a logical operator that changes the logical state, then even though it is undetectable (because it commutes with stabilizers), it will reduce the fidelity. So post-selection: We discard states that are detected as errors. So we only keep states that are in the code space? Actually, not exactly: If an error is undetectable, it means that when we measure the stabilizers, we get +1. But that error could be a logical operator. So if we post-select on getting +1 on both stabilizers, then the state is in the code space. But it might be a different logical state. So then the fidelity conditioned on passing post-selection is: The probability that the state is exactly |Ο> (the desired logical state) given that it is in the code space. But wait: The problem says: “assuming the state is post-selected on all detectable errors in the code”. That means we only keep runs where no error is detected. That is equivalent to saying that the error applied is such that it commutes with both stabilizers. So the set of errors that are not detected are those that are in the normalizer of the stabilizer group. That set includes:
- The stabilizers themselves: XXXX and ZZZZ (and their products? Actually, the stabilizer group is generated by XXXX and ZZZZ. So stabilizers are: I, XXXX, ZZZZ, XXXX ZZZZ? But careful: XXXX and ZZZZ commute? Actually, XXXX and ZZZZ commute? They act on different Pauli bases? Actually, XXXX and ZZZZ: X and Z anticommute on each qubit, so product of signs: For each qubit, X and Z anticommute, so overall, XXXX and ZZZZ: They commute if the number of qubits is even? Actually, check: XXXX * ZZZZ = (XβXβXβX)(ZβZβZβZ) = (XZ)β(XZ)β(XZ)β(XZ) = (-iY)β(-iY)β(-iY)β(-iY) = (-i)^4 (YβYβYβY) = YYYY. So they do not necessarily commute? Wait, we need to check: For two operators to commute, we need that for each qubit, the operators commute or anticommute? Actually, two Pauli operators commute if the number of qubits where they anticommute is even. Here, on each qubit, X and Z anticommute. So on all 4 qubits, they anticommute. So the number of anticommuting qubits is 4, which is even, so they commute. So indeed, XXXX and ZZZZ commute. So the stabilizer group is {I, XXXX, ZZZZ, XXXX ZZZZ}. But note: XXXX ZZZZ = ? That equals? On each qubit, X Z = -iY, so product gives (-i)^4 YYYY = YYYY. So the stabilizers are: I, XXXX, ZZZZ, YYYY. So these are the stabilizers. So if an error is a stabilizer, then it leaves the code space invariant and also leaves the logical state invariant? Actually, careful: The stabilizers act as identity on the code space. So if an error is a stabilizer, then it is actually equivalent to no error on the code space. So errors that are stabilizers are harmless. But wait: But our error channels are applied to the physical qubits. But if the error is a stabilizer, then when we measure the stabilizers, we get +1. So such errors are not detected. So they are kept. And they do not change the logical state. So that’s good.
Then there are logical operators. The logical operators given:
X_A = XIXI, X_B = XXII, Z_A = ZZII, Z_B = ZIZI.
And their products. These operators commute with the stabilizers? Check: X_A commutes with XXXX? X_A is on qubits: qubit0: X, qubit1: I, qubit2: X, qubit3: I. XXXX: on all qubits X. They commute because on qubits where both are X, they commute; on qubits where one is I and the other is X, they commute. So yes. So logical operators are undetectable. But they change the logical state. So if an error is a logical operator, then the state becomes a different logical state. So that would reduce the fidelity.
Also, there might be errors that are products of stabilizers and logical operators. Those are also undetectable.
So in post-selection, we only keep runs where the error is undetectable. That means the error must commute with both stabilizers. So we want to compute the conditional fidelity: Given that the error is undetectable (i.e., it is in the normalizer of the stabilizer group), what is the probability that the logical state is still the desired GHZ state? And then the overall fidelity after post-selection will be that probability.
But careful: The errors come from two independent channels: on {1,2} and on {0,3}. And we determined that the overall effect is that the error is a Pauli operator E that is a product of an error on {1,2} and an error on {0,3}. And we computed the overlap fidelity for each such error. But now we are not looking at overlap with the physical state, but rather: We post-select on the error being undetectable. That means that E must commute with both stabilizers S1=XXXX and S2=ZZZZ. And then, if it is undetectable, then the state is in the code space. But it might be a logical error. The logical fidelity is then 1 if E is a stabilizer (or identity) and 0 if E is a nontrivial logical operator? But wait: Could it be that some logical operators actually leave the GHZ state invariant? The GHZ state is (|00>+|11>)/β2. That state is not necessarily an eigenvector of all logical operators. For example, logical X on qubit A would flip it to |10>+|01> which is orthogonal to the GHZ state. So indeed, if an error is a logical operator that is not identity on the logical space, then the fidelity becomes 0. But wait: What about logical operators that are products? For instance, X_A X_B? That would flip both qubits: |00> -> |11>, |11> -> |00>, so that actually leaves the GHZ state invariant? Because (|00>+|11>) is invariant under swapping both? Actually, check: X_A X_B |00> = |11>, and X_A X_B |11> = |00>, so indeed, X_A X_B (|00>+|11>) = |11>+|00> = same. So there might be some logical operators that preserve the GHZ state. So we need to determine which undetectable errors (those that commute with stabilizers) actually preserve the logical GHZ state.
Let’s denote the logical GHZ state as |Ξ¨β©_L = (|00β©_L + |11β©_L)/β2. But careful: Our state is encoded. But we can work in the logical space. The undetectable errors are elements of the normalizer of the stabilizer group. They can be written as stabilizers times logical operators. So essentially, the effect on the logical state is given by a logical Pauli operator. So we want to know: For a logical Pauli operator L (which is a product of Paulis on the two logical qubits), when does L|Ξ¨β©_L = Β±|Ξ¨β©_L? That is, when is the GHZ state an eigenvector of L? The GHZ state for two qubits is: |Ξ¨β© = (|00β©+|11β©)/β2. Consider logical operators:
I_L: obviously identity.
X_A: XβI. Then X_A|Ξ¨β© = (|10β©+|01β©)/β2, which is orthogonal to |Ξ¨β©. So fidelity 0.
X_B: IβX? Actually, careful: The logical operators are defined: X_A = XIXI, X_B = XXII. But on the logical space, what are they? They act on the two logical qubits. We need to determine the action on the logical basis. The code [[4,2,2]] has logical operators:
X_A = XIXI,
X_B = XXII,
Z_A = ZZII,
Z_B = ZIZI.
So on the logical basis, these act as Pauli matrices on the two logical qubits. So then the logical GHZ state is |00β©_L + |11β©_L (up to normalization). Then:
X_A acts as Ο_x on first logical qubit: X_A|00β© = |10β©, X_A|11β© = |01β©, so X_A|Ξ¨β© = (|10β©+|01β©)/β2, which is orthogonal to |Ξ¨β©. So fidelity 0.
X_B acts as Ο_x on both? Actually, X_B = XXII means it applies X on qubit0 and qubit1? But careful: That is not necessarily a tensor product of logical operators? Actually, since the code encodes 2 qubits, the logical operators should be independent. Typically, we can choose a basis such that:
Logical qubit A:
X_A = XIXI,
Z_A = ZZII.
Logical qubit B:
X_B = IXIX? That might be different. But the problem gives: X_B = XXII. And Z_B = ZIZI. So then on the logical basis, what is the action? We can determine by commutation relations: X_A and Z_A anticommute, and X_B and Z_B anticommute, and they commute with the others. So indeed, these are valid logical operators. So then on logical qubit A, X_A acts as Ο_x, and on logical qubit B, X_B acts as? But careful: X_B is XXII. That means it acts on qubits 0 and 1 with X. That is not a single-qubit Pauli on logical qubit B? But it must be. Actually, in a 2-qubit code, the logical operators are not unique. They are defined up to stabilizers. So we can take:
X_A = XIXI,
Z_A = ZZII,
X_B = XXII,
Z_B = ZIZI.
Then check: X_B and Z_B: They anticommute? X_B Z_B = (XXII)(ZIZI) = (XZ on qubit0, XI on qubit1, IX on qubit2, II on qubit3?) Actually, compute: On qubit0: X and Z -> anticommute so gives -1 factor? Let’s do properly:
X_B = X_0 X_1 I_2 I_3.
Z_B = Z_0 I_1 Z_2 I_3.
Their product: X_B Z_B = (X_0 Z_0) β (X_1 I_1) β (I_2 Z_2) β (I_3 I_3) = ( -i Y_0) β (X_1) β (Z_2) β I_3. That is not simply a phase. They should anticommute. Actually, check commutator: [X_B, Z_B] = X_B Z_B - Z_B X_B. Since X and Z anticommute on each qubit where both are non-identity, here qubit0: X and Z anticommute, so that gives a sign flip. So indeed, X_B and Z_B anticommute. So it’s fine.
So then on the logical space, X_B acts as a Pauli on the second logical qubit. So we can denote:
Logical qubit A: operators: X_A, Z_A.
Logical qubit B: operators: X_B, Z_B.
Then the GHZ state is |00β©_L + |11β©_L.
Now, consider logical operator L = X_A X_B. Then L|00β© = |11β©, L|11β© = |00β©, so L|Ξ¨β© = |Ξ¨β©. So that preserves the state.
What about L = Z_A? Z_A|00β© = |00β©, Z_A|11β© = -|11β©, so Z_A|Ξ¨β© = (|00β© - |11β©)/β2, which is orthogonal to |Ξ¨β©. So fidelity 0.
What about L = Z_B? Similarly, Z_B|00β© = |00β©, Z_B|11β© = -|11β©? Actually, careful: Z_B acts on second logical qubit: Z_B|00β© = |00β©, Z_B|11β© = -|11β©, so again orthogonal.
What about L = Z_A Z_B? Then Z_A Z_B|00β© = |00β©, Z_A Z_B|11β© = (-1)(-1)|11β© = |11β©, so that preserves the state.
What about L = X_A Z_B? That would give: X_A Z_B|00β© = |10β©? Actually, X_A Z_B: on |00β©, Z_B gives no change? Actually, Z_B on second qubit: |0β© -> |0β©, so X_A flips first qubit: becomes |10β©. On |11β©, Z_B gives -|11β©? Actually, careful: Z_B|1β© = -|1β©, so |11β© -> -|11β©, then X_A flips first qubit: becomes -|01β©. So overall, X_A Z_B|Ξ¨β© = (|10β© - |01β©)/β2, which is orthogonal to |Ξ¨β©.
Soζ»η»: The logical operators that preserve the GHZ state are: I, X_A X_B, and Z_A Z_B? Check Z_A Z_B: we did: gives |00β© and |11β© unchanged? Actually, Z_A Z_B|00β© = |00β©, Z_A Z_B|11β© = (-1)(-1)|11β© = |11β©, so yes.
Also, what about Y_A Y_B? That would be i? Actually, Y_A Y_B = (i Z_A X_A)(i Z_B X_B) = - Z_A X_A Z_B X_B = - (Z_A Z_B)(X_A X_B) because they commute? Actually, careful: X_A and Z_B commute? Yes, they act on different qubits. So Y_A Y_B = - (Z_A Z_B)(X_A X_B). So if both X_A X_B and Z_A Z_B preserve the state, then their product will preserve the state? But then there is a minus sign? Let’s check: Y_A Y_B|00β© = Y_A Y_B|00β© = (iΟ_y β iΟ_y)|00β© = (-Ο_yβΟ_y)|00β© =? Actually, compute directly: Ο_y|0β© = i|1β©, so Ο_yβΟ_y|00β© = i|1β© β i|1β© = -|11β©. And Ο_yβΟ_y|11β© = (-i|0β©)β(-i|0β©) = -|00β©. So Y_A Y_B|Ξ¨β© = - (|11β©+|00β©) = -|Ξ¨β©. So indeed, Y_A Y_B also preserves the state (up to a phase). So actually, the set of logical operators that preserve the GHZ state are those that are either I, or flip both qubits in the same way? More systematically: The GHZ state |00β©+|11β© is stabilized by the group generated by XβX and ZβZ. So any logical operator that is in that group will preserve the state. So the stabilizer of the GHZ state in the logical space is {I, X_A X_B, Z_A Z_B, Y_A Y_B} (note that (X_A X_B)(Z_A Z_B) = -i Y_A Y_B? Actually, careful: X_A X_B * Z_A Z_B = (X_A Z_A) β (X_B Z_B) = (-i Y_A) β (-i Y_B) = - Y_A Y_B. So indeed, the group is of order 4. So if an undetectable error acts as a logical operator that is in this group, then the logical state is correct (fidelity 1). If it acts as any other logical operator, then the logical state is orthogonal to the desired state, so fidelity 0.
But wait: There is also the possibility that the error is a stabilizer. Stabilizers act as identity on the code space. So they are fine.
So, in post-selection, we only keep runs where the error E is undetectable. That means E must commute with both XXXX and ZZZZ. And then the logical fidelity is 1 if the logical part of E (mod stabilizers) is in the group that stabilizes the GHZ state, and 0 otherwise.
Now, we need to compute: Given that an error occurs from our two channels, what is the probability that it is undetectable? And among those, what fraction have the property that the logical effect is trivial (i.e., in the stabilizer of the GHZ state)?
But careful: The errors come from two independent channels: one on {1,2} and one on {0,3}. And we determined that the overall error is a Pauli operator E = E_{03} * E_{21}, where E_{03} acts on qubits {0,3} and E_{21} acts on qubits {1,2}. And these are chosen independently from the set of 15 non-identity Paulis each with probability p/15, and identity with probability 1-p.
So let’s denote:
A = error on {0,3} (can be I or one of 15 Paulis)
B = error on {1,2} (similarly)
And the overall error is E = A * B.
We want to know: When is E undetectable? That is, E commutes with S1 = XXXX and S2 = ZZZZ.
Since A and B act on disjoint sets, E commutes with S if and only if A commutes with S and B commutes with S? Actually, careful: S acts on all qubits. But since A and B act on different qubits, we have: [E, S] = A B S - S A B = A S B - S A B? Not exactly because S commutes with B? Actually, S = XXXX. Write S = S_0 S_1 S_2 S_3. A acts on qubits 0 and 3. B acts on qubits 1 and 2. So S = (S_0 S_3) (S_1 S_2). And A commutes with S_1 S_2 because they act on different qubits. So [E, S] = A B S - S A B = A S B - S A B = (A S_0 S_3 - S_0 S_3 A) B S_1 S_2? Actually, let’s do it properly:
E = A β B (since they act on disjoint sets).
S = (S_0 β S_3) β (S_1 β S_2) but careful: Actually, S = XXXX means: X on qubit0, X on qubit1, X on qubit2, X on qubit3. So we can write S = (X_0 X_3) β (X_1 X_2) because these commute? Actually, X_0 X_3 and X_1 X_2 commute because they act on different qubits. So S = (X_0 X_3) (X_1 X_2). Similarly, ZZZZ = (Z_0 Z_3)(Z_1 Z_2).
Then E commutes with S if and only if A commutes with X_0 X_3 and B commutes with X_1 X_2? Not exactly: E and S are both products of operators on disjoint sets. Actually, since A and B act on different sets, we have: E S = (A (X_0 X_3)) (B (X_1 X_2)) and S E = ((X_0 X_3) A) ((X_1 X_2) B). So E commutes with S if and only if A commutes with X_0 X_3 and B commutes with X_1 X_2. But wait: Is that sufficient? Check: If A commutes with X_0 X_3, then A (X_0 X_3) = (X_0 X_3) A. And if B commutes with X_1 X_2, then similarly. So yes, E commutes with S if and only if A commutes with X_0 X_3 and B commutes with X_1 X_2.
Similarly, E commutes with ZZZZ if and only if A commutes with Z_0 Z_3 and B commutes with Z_1 Z_2.
So, for E to be undetectable, we need:
A must commute with both X_0 X_3 and Z_0 Z_3.
B must commute with both X_1 X_2 and Z_1 Z_2.
Now, what are the Pauli operators on two qubits that commute with both XβX and ZβZ? Let’s analyze for two qubits. Consider a Pauli operator on two qubits, say on qubits i and j. We want P such that [P, X_i X_j] = 0 and [P, Z_i Z_j] = 0.
Write P = Ο_a β Ο_b, where Ο_a, Ο_b β {I, X, Y, Z} but not both I? Actually, we consider all Paulis including identity.
We want: P (XβX) = (XβX) P.
Since P is a Pauli, this commutation condition is that the number of qubits where P and XβX anticommute is even. Actually, easier: The operators that commute with XβX are those that are either both I or both X? Actually, let’s list: For two qubits, the Pauli group has 16 elements. Which ones commute with XβX?
XβX itself commutes.
IβI commutes.
What about XβI? Check: (XβI)(XβX) = X^2 β X = IβX. (XβX)(XβI) = X^2 β X = IβX. So actually, XβI commutes with XβX? Wait, careful: They act on different qubits? Actually, XβI and XβX: On the first qubit, both are X, so they commute. On the second qubit, I and X commute. So yes, XβI commutes with XβX. But does XβI commute with ZβZ? Check: (XβI)(ZβZ) = (XZ)β(Z) = -i YβZ. (ZβZ)(XβI) = (ZX)β(Z) = i YβZ. So they anticommute. So for undetectability, we need commutation with both XβX and ZβZ.
So let’s determine: On two qubits, the condition that a Pauli P commutes with both XβX and ZβZ.
Write P = Β± (Ο1 β Ο2) where Ο1,Ο2 β {I,X,Y,Z}. The phase doesn’t affect commutation. So we need:
[Ο1βΟ2, XβX] = 0 and [Ο1βΟ2, ZβZ] = 0.
The commutator [Ο1βΟ2, XβX] = 0 if and only if Ο1 and X commute and Ο2 and X commute, OR Ο1 and X anticommute and Ο2 and X anticommute? Actually, because (Ο1βΟ2)(XβX) = (Ο1 X)β(Ο2 X) and (XβX)(Ο1βΟ2) = (X Ο1)β(X Ο2). So these are equal if and only if Ο1 X = Β± X Ο1 and Ο2 X = Β± X Ο2, and the signs must be the same? Actually, if Ο1 anticommutes with X, then Ο1 X = - X Ο1. So then (Ο1βΟ2)(XβX) = (-1) (X Ο1)β(Ο2 X). And (XβX)(Ο1βΟ2) = (X Ο1)β(X Ο2). For these to be equal, we need that Ο2 also anticommutes with X so that then (Ο1βΟ2)(XβX) = (-1)*(-1) (X Ο1)β(X Ο2) = (X Ο1)β(X Ο2). So indeed, [P, XβX]=0 if either both Ο1 and Ο2 commute with X, or both anticommute with X.
Similarly, [P, ZβZ]=0 if either both Ο1 and Ο2 commute with Z, or both anticommute with Z.
So let’s list Paulis on two qubits (ignoring phase) that satisfy these conditions:
We need: For X: either (Ο1 commutes with X and Ο2 commutes with X) OR (Ο1 anticommutes with X and Ο2 anticommutes with X).
For Z: either (Ο1 commutes with Z and Ο2 commutes with Z) OR (Ο1 anticommutes with Z and Ο2 anticommutes with Z).
Now, what Paulis commute with X? I and X commute with X. Y and Z anticommute with X.
What Paulis commute with Z? I and Z commute with Z. X and Y anticommute with Z.
So, condition for X:
Case 1: Both Ο1 and Ο2 commute with X. That means Ο1, Ο2 β {I, X}.
Case 2: Both Ο1 and Ο2 anticommute with X. That means Ο1, Ο2 β {Y, Z}.
Condition for Z:
Case A: Both Ο1 and Ο2 commute with Z. That means Ο1, Ο2 β {I, Z}.
Case B: Both Ο1 and Ο2 anticommute with Z. That means Ο1, Ο2 β {X, Y}.
So for P to commute with both XβX and ZβZ, we need that the pair (Ο1, Ο2) satisfies either (Case 1 and Case A) or (Case 1 and Case B) or (Case 2 and Case A) or (Case 2 and Case B).
Let’s check:
Case 1 & Case A: Ο1,Ο2 β {I,X} β© {I,Z} = {I} only. So that gives: IβI. But IβI is identity. But wait, what about XβX? That is in Case 1? Actually, XβX: Ο1=X, Ο2=X. That is in Case 1? But then for Z: X anticommutes with Z, so XβX would fall into Case 1 & Case B? Because Case 1 requires commute with X, so X is okay. Case B requires anticommute with Z, and X anticommutes with Z. So XβX is in (Case 1 & Case B). So let’s do systematically:
We want pairs (Ο1, Ο2) such that:
(Ο1, Ο2) must be either both in {I,X} or both in {Y,Z} from X condition.
And from Z condition, they must be either both in {I,Z} or both in {X,Y}.
So combine:
If both in {I,X} from X condition, then from Z condition, they could be both in {I,Z} or both in {X,Y}.
- Both in {I,X} and both in {I,Z} gives: only I,I. So that gives IβI.
- Both in {I,X} and both in {X,Y} gives: intersection of {I,X} and {X,Y} is {X} only. So that gives XβX.
So from the (I,X) branch, we get: IβI and XβX.
Now if both in {Y,Z} from X condition, then from Z condition, they could be both in {I,Z} or both in {X,Y}.
- Both in {Y,Z} and both in {I,Z} gives: intersection is {Z} so that gives ZβZ.
- Both in {Y,Z} and both in {X,Y} gives: intersection is {Y} so that gives YβY.
So from the (Y,Z) branch, we get: ZβZ and YβY.
So the Pauli operators on two qubits that commute with both XβX and ZβZ are exactly: IβI, XβX, YβY, ZβZ.
But wait: What about IβX? That does not work because from X condition: I and X: I commutes with X, X commutes with X, so that satisfies X condition. But from Z condition: I commutes with Z, but X anticommutes with Z, so that fails.
So indeed, on two qubits, the operators that commute with both XβX and ZβZ are only those that are the same Pauli on both qubits (including identity). So that means:
For the error on {0,3} to be undetectable, A must be such that A commutes with X_0 X_3 and Z_0 Z_3. That means A must be one of: I, X_0 X_3, Y_0 Y_3, Z_0 Z_3. But wait: Is that sufficient? Check: If A = X_0 X_3, then it commutes with X_0 X_3 obviously, and with Z_0 Z_3? We already checked: X_0 X_3 and Z_0 Z_3: On each qubit, X and Z anticommute, so overall they commute because even number? Actually, check: (X_0 X_3)(Z_0 Z_3) = (X_0 Z_0)(X_3 Z_3) = (-iY_0)(-iY_3) = -Y_0 Y_3. And (Z_0 Z_3)(X_0 X_3) = (Z_0 X_0)(Z_3 X_3) = (iY_0)(iY_3) = -Y_0 Y_3. So they commute. So yes.
Similarly, for the error on {1,2}, B must be one of: I, X_1 X_2, Y_1 Y_2, Z_1 Z_2.
But wait: There is also the possibility that A and B individually are not undetectable, but their product might be undetectable? Because undetectability condition is on the overall E = A B. But since A and B act on disjoint sets, we have: E commutes with S if and only if A commutes with (X_0 X_3) and B commutes with (X_1 X_2) as argued. Because S = (X_0 X_3)(X_1 X_2) and A commutes with (X_1 X_2) automatically since they act on different qubits. So indeed, E commutes with S if and only if A commutes with X_0 X_3 and B commutes with X_1 X_2. Similarly for Z. So actually, for E to be undetectable, we need A to commute with X_0 X_3 and Z_0 Z_3, and B to commute with X_1 X_2 and Z_1 Z_2. So that means A must be in the set U_{03} = {I, X_0 X_3, Y_0 Y_3, Z_0 Z_3} and B must be in the set U_{12} = {I, X_1 X_2, Y_1 Y_2, Z_1 Z_2}.
But wait: Is that necessary? Could it be that A does not commute with X_0 X_3 but B does something such that overall it commutes? Let’s check: Suppose A = X_0 I_3. Then A does not commute with X_0 X_3? Actually, check: X_0 I_3 and X_0 X_3: They commute? X_0 I_3 and X_0 X_3: On qubit0, both are X, so commute; on qubit3, I and X commute. So actually, X_0 I_3 commutes with X_0 X_3? But wait, we need commutation with both X_0 X_3 and Z_0 Z_3. Check with Z_0 Z_3: X_0 I_3 and Z_0 Z_3: On qubit0, X and Z anticommute; on qubit3, I and Z commute. So overall, they anticommute. So A = X_0 I_3 does not commute with Z_0 Z_3. So indeed, for A to commute with both, it must be that on qubit0 and qubit3, the pattern is such that either both commute with X and Z? Actually, our derivation above shows that on two qubits, the only operators that commute with both XβX and ZβZ are those that are the same Pauli on both qubits. So that is correct. So indeed, for undetectability, we require that A β U_{03} and B β U_{12}.
So, the probability that the error is undetectable is:
P(undetectable) = P(A β U_{03}) * P(B β U_{12}) because they are independent.
Now, what is P(A β U_{03})? A is from the error channel on {0,3}. That channel: With probability 1-p, A = I. With probability p, A is uniformly distributed among the 15 non-identity Paulis on {0,3}. Among these 15, how many are in U_{03}? U_{03} contains besides I: X_0 X_3, Y_0 Y_3, Z_0 Z_3. So there are 3 non-identity Paulis that are undetectable. So P(A β U_{03}) = (1-p) + p*(3/15) = 1-p + p/5 = 1 - (4/5)p.
Similarly, P(B β U_{12}) = 1 - (4/5)p.
So the probability that the overall error is undetectable is:
P(undetectable) = (1 - 4p/5)^2.
But wait: That is exactly the fidelity we computed earlier for the physical state fidelity? That was (1 - 4p/5)^2. And indeed, that makes sense: The physical fidelity was the probability that the error does not change the state. And that required that the error is actually in the set that preserves the state. And we found that set was: For {0,3} errors, the preserving ones were exactly X_0 X_3, Y_0 Y_3, Z_0 Z_3? But wait, earlier we found that for {0,3} errors, the ones that give overlap 1 were exactly these three. And for {1,2} errors, the ones that give overlap 1 were X_1 X_2, Y_1 Y_2, Z_1 Z_2. And then combined, if both are from these sets, then the product gives overlap 1. So indeed, the physical fidelity is exactly the probability that the error is undetectable? But careful: Is that true? Physical fidelity F_physical = (1 - 4p/5)^2. And P(undetectable) = (1 - 4p/5)^2 as well. So that means that if an error is undetectable, then it actually preserves the physical state? But wait, that is not necessarily true: An error could be undetectable but still change the logical state. For example, consider A = X_0 X_3 and B = I. That is undetectable? Check: A = X_0 X_3 is in U_{03} so yes. But does that preserve the physical state? We computed earlier: For an error on {0,3} only, the ones that preserve the state are exactly those three? Actually, we computed that for an error on {0,3} only, the overlap is 1 only if the error is one of X_0 X_3, Y_0 Y_3, Z_0 Z_3. So yes, that works. So indeed, it seems that if an error is undetectable, then it actually leaves the physical state invariant? But wait, consider an error that is a logical operator. For example, what is a logical operator? The logical operators are given. For instance, X_A = XIXI. Is that undetectable? Check: XIXI acts on qubits 0 and 2? Actually, X_A = XIXI means: qubit0: X, qubit1: I, qubit2: X, qubit3: I. That is not of the form that commutes with XXXX? Let’s check: XIXI and XXXX: On qubit0: X and X commute; qubit1: I and X commute; qubit2: X and X commute; qubit3: I and X commute. So it commutes with XXXX. With ZZZZ: On qubit0: X and Z anticommute; qubit1: I and Z commute; qubit2: X and Z anticommute; qubit3: I and Z commute. So overall, anticommute? Actually, number of anticommuting qubits: qubit0 and qubit2 anticommute, so that’s 2, which is even, so they commute? Wait, careful: For two Pauli operators to commute, the number of qubits where they anticommute must be even. Here, on qubit0: X and Z anticommute, so count 1; on qubit2: X and Z anticommute, so count 2; so even, so they commute. So XIXI commutes with ZZZZ as well? Check explicitly: (XIXI)(ZZZZ) = (XZ on qubit0, IZ on qubit1, XZ on qubit2, IZ on qubit3) = (-iY)(Z)(-iY)(Z) = (-i)(-i) (Y Z)(Y Z)? Actually, better: On qubit0: XZ = -iY; on qubit1: IZ = Z; on qubit2: XZ = -iY; on qubit3: IZ = Z. So product = (-iY)(Z)(-iY)(Z) = (-i)(-i) (Y Z Y Z) = (-1) (Y Y)(Z Z) because Y and Z anticommute? Let’s do step: Y Z = -Z Y, so Y Z Y Z = Y (-Z Y) Z = -Y Z Y Z? I’m getting confused. Let’s do it qubit by qubit: The operators act on different qubits so they commute across qubits. So we want to check if (XIXI) and (ZZZZ) commute. They will commute if the number of qubits where they anticommute is even. On qubit0: X and Z anticommute -> so that gives a sign of -1 if we swap? Actually, the rule: Two Pauli operators P and Q commute if and only if for each qubit, either they commute or anticommute, and the total number of anticommuting qubits is even. Here, on qubit0: anticommute -> contributes a factor of -1 when swapping? Actually, the condition is: P Q = (-1)^(number of qubits where they anticommute) Q P. So if number is even, they commute. On qubit0: anticommute -> count=1; qubit1: commute -> count=1; qubit2: anticommute -> count=2; qubit3: commute -> count=2. So even, so they commute. So XIXI is undetectable. But does XIXI preserve the physical state? We computed earlier that for an error on {0,3} only, the preserving ones were those that are like X_0 X_3, etc. But XIXI is not of that form because it acts on qubits 0 and 2, not 0 and 3. But wait, our error channels are only on {0,3} and {1,2}. So an error like XIXI cannot occur from our channels because our channels only apply errors on the pairs that were involved in the CNOT gates. So indeed, the errors we get are always products of an operator on {0,3} and an operator on {1,2}. So they are of the form: (something on qubits 0 and 3) β (something on qubits 1 and 2). So that means that any error from our channels will have the property that it acts trivially on qubits? Actually, it will act on qubits 0 and 3 together and on qubits 1 and 2 together. So such an error will commute with X_0 X_3 and X_1 X_2 automatically? Not automatically, but as we derived, for it to commute with XXXX, we need that the part on {0,3} commutes with X_0 X_3 and the part on {1,2} commutes with X_1 X_2. And that forces them to be in U_{03} and U_{12} respectively. So indeed, from our error model, the only undetectable errors are those where A β {I, X_0 X_3, Y_0 Y_3, Z_0 Z_3} and B β {I, X_1 X_2, Y_1 Y_2, Z_1 Z_2}. And we already computed that if A is in that set and B is in that set, then the overall error actually preserves the physical state? Let’s check: If A = X_0 X_3 and B = I, then we already computed that gives fidelity 1. If A = X_0 X_3 and B = X_1 X_2, then that gives fidelity 1. If A = X_0 X_3 and B = Y_1 Y_2, then we computed that gives fidelity? We computed for combined: X_0 X_3 and Y_1 Y_2 gave: overall operator = X_0 X_3 Y_1 Y_2. Does that preserve the physical state? We computed earlier for an error on {1,2} only, the preserving ones were X_1 X_2, Y_1 Y_2, Z_1 Z_2. So if B = Y_1 Y_2, then that alone would preserve the state? But wait, we computed for an error on {1,2} only: We determined that the ones that give overlap 1 are exactly X_1 X_2, Y_1 Y_2, Z_1 Z_2. So yes, if B = Y_1 Y_2, then that error alone would preserve the state. And since A and B act on disjoint sets, if each preserves the state, then their product preserves the state. So indeed, if A β U_{03} and B β U_{12}, then the overall error E preserves the physical state. So that means that for our error model, the condition for undetectability is exactly the same as the condition for the error to not change the physical state. And we computed that probability as (1 - 4p/5)^2. So then if we post-select on undetectable errors, we are keeping exactly those runs where the physical state is perfect. So then the logical state fidelity after post-selection would be 1? That seems too trivial. But wait, the problem asks: “What is the logical state fidelity … assuming the state is post-selected on all detectable errors?” That would then be 1? But that is not interesting. Perhaps I misinterpreted: “post-selected on all detectable errors” might mean that we discard any run where an error is detected. But that does not guarantee that the state is correct because there could be undetectable errors that are logical errors. But as argued, from our error model, any undetectable error actually preserves the state. But is that always true? Let’s check: Could there be an undetectable error that is a logical operator? For example, consider an error that is X_A = XIXI. But can that occur from our error channels? Our error channels only apply errors on the pairs {0,3} and {1,2}. So an error like XIXI would require that on qubits 0 and 3, we have X on qubit0 and I on qubit3, and on qubits 1 and 2, we have I on qubit1 and X on qubit2. But is that product in the form A * B? That would be: A = X_0 I_3 and B = I_1 X_2. But are these in U_{03} and U_{12}? Check A = X_0 I_3: Does it commute with X_0 X_3? X_0 I_3 and X_0 X_3: On qubit0, both X commute; on qubit3, I and X commute. So it commutes with X_0 X_3. But does it commute with Z_0 Z_3? X_0 I_3 and Z_0 Z_3: On qubit0, X and Z anticommute; on qubit3, I and Z commute. So overall, they anticommute. So A = X_0 I_3 is not in U_{03} because it does not commute with Z_0 Z_3. So indeed, from our error model, the errors are restricted to products of operators on the specific pairs that are acted upon by the CNOT gates. And because of that, the only undetectable errors are those that are actually stabilizers of the physical state? That seems to be the case from our analysis: For an error on {0,3} to be undetectable, it must be in {I, X_0X_3, Y_0Y_3, Z_0Z_3}. And these actually we found give physical fidelity 1. Similarly for {1,2}. So then if we post-select on no detection, we are only keeping runs where the error is such that A β U_{03} and B β U_{12}. And then the state is exactly the ideal state. So then the logical fidelity after post-selection would be 1.
But wait, the problem likely expects an answer that is not 1. Perhaps I misinterpreted: “post-selected on all detectable errors” might mean that we detect errors using the code’s error detection capability. The code can detect any error that is not in the normalizer. So if an error is detected, we discard the state. So the only states we keep are those for which the error is undetectable. But as argued, from our error model, the undetectable errors are exactly those that do not change the state. So then the fidelity would be 1. But that seems too perfect.
Maybe there is another interpretation: The circuit itself might introduce errors that are not correctable by the code? Or perhaps the post-selection is on errors that are detected by the code’s stabilizer measurements. But then if no error is detected, the state is in the code space. However, it could be that the state is in the code space but is a different logical state. For example, consider an error that is a logical operator. But as argued, such an error would require that the error on {0,3} is not in U_{03} because logical operators typically act on single qubits across these pairs. But wait, could there be an error that is undetectable but still changes the logical state? For that, the error would have to be something like: A = X_0 I_3 and B = I_1 X_2. But is that undetectable? Check: A = X_0 I_3. Does it commute with X_0 X_3? Yes, as checked. Does it commute with Z_0 Z_3? No, because on qubit0, X and Z anticommute. So it is detectable. So indeed, any error that is not of the form same Pauli on both qubits in a pair will be detected because it will anticommute with either XβX or ZβZ on that pair. So therefore, with this error model (errors only on the pairs that are involved in CNOT gates), the only undetectable errors are those that actually leave the state invariant. So then the logical fidelity after post-selection is 1.
But wait, the problem might be asking for the logical state fidelity without post-selection? But that would be the physical fidelity? But that was subproblem 1. Subproblem 2 says: “What is the logical state fidelity … assuming the state is post-selected on all detectable errors?” That suggests that after post-selection, the state is guaranteed to be in the code space. But then its fidelity could be less than 1 if there are undetectable logical errors. But as argued, due to the structure of the errors coming from CNOT gates, any undetectable error actually is harmless.
I will re-read the problem statement:
“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?”
Maybe “post-selected on all detectable errors” means that we measure the stabilizers and if we detect an error, we discard the state. So we only keep states that yield no error syndrome. That means the error must be in the set of operators that commute with the stabilizers. That set is larger than what I considered? Actually, the set of operators that commute with the stabilizers is the normalizer of the stabilizer group. That includes operators that act on single qubits? But wait, consider an operator that acts on only one qubit, say X on qubit0. Does that commute with XXXX? X on qubit0 commutes with XXXX because on qubit0, X and X commute; on other qubits, identity and X commute. So X on qubit0 commutes with XXXX. But does it commute with ZZZZ? X on qubit0 and ZZZZ: On qubit0, X and Z anticommute; on others, identity and Z commute. So overall, they anticommute. So X on qubit0 is detectable because it anticommutes with ZZZZ. So indeed, any single-qubit error will anticommute with at least one stabilizer? Check: X on qubit0: anticommutes with ZZZZ. Z on qubit0: anticommutes with XXXX. Y on qubit0: anticommutes with both? Actually, Y anticommutes with X and Z? So yes, single-qubit errors are detectable. What about two-qubit errors that are not on the pairs that are acted upon by CNOT? For example, an error on qubits 0 and 1. Consider X on qubit0 and X on qubit1. That is XβXβIβI. Does it commute with XXXX? On qubits 0 and 1, X and X commute; on qubits 2 and 3, I and X commute. So it commutes with XXXX. With ZZZZ: On qubit0, X and Z anticommute; on qubit1, X and Z anticommute; on qubits 2 and 3, I and Z commute. So overall, anticommute? Actually, two anticommutes give commute because (-1)*(-1)=1. So XβXβIβI commutes with ZZZZ as well? Check carefully:
XXXX = X_0 X_1 X_2 X_3.
ZZZZ = Z_0 Z_1 Z_2 Z_3.
Consider E = X_0 X_1 I_2 I_3.
Compute commutator with XXXX:
E XXXX = X_0 X_1 I_2 I_3 * X_0 X_1 X_2 X_3 = (X_0 X_0)(X_1 X_1)(I X_2)(I X_3) = I I X_2 X_3 = X_2 X_3.
XXXX E = X_0 X_1 X_2 X_3 * X_0 X_1 I_2 I_3 = (X_0 X_0)(X_1 X_1)(X_2 I)(X_3 I) = I I X_2 X_3 = X_2 X_3.
So they commute.
With ZZZZ:
E ZZZZ = X_0 X_1 I_2 I_3 * Z_0 Z_1 Z_2 Z_3 = (X_0 Z_0)(X_1 Z_1)(I Z_2)(I Z_3) = (-iY_0)(-iY_1) Z_2 Z_3 = (-1) Y_0 Y_1 Z_2 Z_3.
ZZZZ E = Z_0 Z_1 Z_2 Z_3 * X_0 X_1 I_2 I_3 = (Z_0 X_0)(Z_1 X_1)(Z_2 I)(Z_3 I) = (iY_0)(iY_1) Z_2 Z_3 = (-1) Y_0 Y_1 Z_2 Z_3.
So they commute actually. So E = X_0 X_1 I_2 I_3 commutes with both stabilizers. So that error is undetectable. And is it possible from our error model? Our error model only applies errors on the pairs {0,3} and {1,2} because they come from CNOT gates. So an error like X_0 X_1 cannot occur because it involves qubits 0 and 1 together, but our errors are only on {0,3} and {1,2}. So indeed, the errors we get are always products of an operator on {0,3} and an operator on {1,2}. So that restricts the form of errors to be of the type: (Pauli on qubits 0 and 3) β (Pauli on qubits 1 and 2). And as we determined, for such an error to commute with XXXX, we need that the part on {0,3} commutes with X_0 X_3 and the part on {1,2} commutes with X_1 X_2. And that forces them to be in {I, X_0X_3, Y_0Y_3, Z_0Z_3} and similarly for {1,2}. So indeed, with this error model, any undetectable error actually leaves the state invariant. So then the logical fidelity after post-selection is 1.
But wait, the problem might be asking for the probability of success of post-selection? That is (1-4p/5)^2. But that is the physical fidelity without post-selection.
I will re-read the problem:
“Subproblem 1: … What is the physical state fidelity …
Subproblem 2: … What is the logical state fidelity … assuming the state is post-selected on all detectable errors in the code?”
So Subproblem 1 is about the physical state fidelity without any post-selection. Subproblem 2 is about the logical state fidelity after post-selection. That would be the fidelity of the logical state conditioned on that no error was detected. And since any undetectable error actually gives the correct state, the logical fidelity should be 1.
However, that seems too trivial. Perhaps there is a catch: The circuit itself might introduce errors that are not correctable even after post-selection? Or maybe the post-selection is done by measuring the stabilizers. But if an error is undetectable, it means it is in the normalizer. But wait, could it be that some undetectable errors actually change the logical state? For that, we would need an error that is of the form something like: On {0,3}, could we have an error that is undetectable but not identity on the logical space? For example, consider A = X_0 X_3 is undetectable. What is its logical action? X_0 X_3. Is that a logical operator? Let’s check: The logical operators are given as X_A = XIXI and X_B = XXII. Can X_0 X_3 be written as a product of these? X_0 X_3 = (X_0 I_1 I_2 I_3) * (I_0 I_1 I_2 X_3). But are these logical operators? XIXI is X_A. But I_0 I_1 I_2 X_3 is not one of the given logical operators. However, it might be equivalent to a logical operator times a stabilizer? For instance, I_0 I_1 I_2 X_3. commute with stabilizers? Check with ZZZZ: I_0 I_1 I_2 X_3 and ZZZZ: On qubit3, X and Z anticommute, so that would anticommute? So actually, I_0 I_1 I_2 X_3 is not undetectable because it doesn’t commute with ZZZZ. So indeed, any error that is undetectable must be such that on each pair, it is the same Pauli on both qubits. So that means it is of the form: (Ο_0 Ο_3) and (Ο_1 Ο_2). Now, what is the logical effect of such an error? Let’s compute the action on the logical operators. The logical operators are:
X_A = XIXI.
Z_A = ZZII.
X_B = XXII.
Z_B = ZIZI.
Consider an error E = (Ο_0 Ο_3) β (Ο_1 Ο_2). We want to see if this error acts as a logical operator on the code space. Actually, any operator that commutes with the stabilizers will act on the code space as a logical operator. So let’s determine the logical action of E. Take basis states for the code. The code [[4,2,2]] has stabilizers S1=XXXX, S2=ZZZZ. The logical states can be taken as:
|00β©L = |0000β© + |1111β©? Not sure.
Actually, our desired state is |Οβ© = (|0000β©+|0110β©+|1001β©+|1111β©)/2. That state is actually not a basis state of the logical qubits? It is an entangled state between the two logical qubits.
Maybe we can determine the logical effect by seeing how E changes the logical operators. If E is undetectable, then it commutes with stabilizers, so it will map the code space to itself. Its action on the logical operators can be determined by conjugation. For example, if E = X_0 X_3, then what is its action on X_A? X_A = XIXI. Compute E X_A E^\dagger = (X_0 X_3)(X_0 I_2? Actually, careful: X_A = X_0 I_1 X_2 I_3. Then E X_A E = (X_0 X_3)(X_0 I_1 X_2 I_3)(X_0 X_3) because Paulis are involutory. = X_0 X_3 X_0 I_1 X_2 I_3 X_0 X_3 = (X_0 X_0 X_0) actually, let’s do qubit by qubit:
On qubit0: X_0 * X_0 * X_0 = X_0 because X_0^2=I actually careful: E = X_0 X_3, so on qubit0, we have X_0. Then X_A has X_0 on qubit0. So product: X_0 * X_0 * X_0 = X_0? Actually, better: E X_A E = (X_0 X_3) (X_0 I_1 X_2 I_3) (X_0 X_3) = on qubit0: X_0 X_0 X_0 = X_0 (since X_0^2=I, so actually X_0 X_0 = I, so it becomes I * X_0 = X_0) wait, let’s do properly:
For any Pauli, P Q P = Β± Q depending on commutation. So we can use that.
E = X_0 X_3.
X_A = X_0 I_1 X_2 I_3.
Do they commute? Check between E and X_A:
E and X_A: On qubit0, both X -> commute; qubit1: I and I -> commute; qubit2: I and X -> commute; qubit3: X and I -> commute. So actually, E and X_A commute. So then E X_A E = X_A. So that means that E acts trivially on X_A.
What about Z_A = ZZII. E and Z_A: On qubit0: X and Z anticommute; qubit1: I and Z commute; qubit2: I and I commute; qubit3: X and I commute. So overall, they anticommute? Actually, careful: E and Z_A: The anticommutation comes only from qubit0. So they anticommute. So then E Z_A E = - Z_A. So that means that E acts as a logical operator that flips the sign of Z_A. That would be like a logical Pauli on qubit A? Actually, if something commutes with X_A and anticommutes with Z_A, then it is proportional to Z_A itself? Actually, wait: If an operator L satisfies L X_A L = X_A and L Z_A L = - Z_A, then L could be Z_A itself because Z_A X_A Z_A = - X_A actually? Let’s check: Z_A X_A Z_A = - X_A because Z and X anticommute. So that’s not it. What operator would give that? If L = something that commutes with X and anticommutes with Z, then L must be like Y? Because Y X Y = -X? No.
Actually, let’s determine: We want an operator L such that L X_A L = X_A and L Z_A L = -Z_A. Consider L = I? That gives both positive. Consider L = X_A? Then X_A X_A X_A = X_A, and X_A Z_A X_A = -Z_A. So actually, X_A works? But wait, X_A anticommutes with Z_A? Yes, because X and Z anticommute. So X_A gives: X_A X_A X_A = X_A, and X_A Z_A X_A = -Z_A. So that means that E acts as X_A on the logical space? But then that would change the logical state. But wait, we earlier argued that if E = X_0 X_3 alone, then it should preserve the physical state. There is a contradiction. Let’s check directly with state: E = X_0 X_3. Apply that to |Οβ© = (|0000β©+|0110β©+|1001β©+|1111β©)/2.
X_0 X_3|0000β© = |1001β© because flip qubit0 and qubit3: 0000 -> 1001.
X_0 X_3|0110β© = |1111β©? Actually, 0110 -> flip qubit0 and qubit3: becomes 1111.
X_0 X_3|1001β© = |0000β©.
X_0 X_3|1111β© = |0110β©.
So indeed, X_0 X_3|Οβ© = |Οβ©. So physically, it leaves the state invariant. So why does the conjugation suggest that it acts as X_A? Because X_A would send |00β©_L to |10β©_L, which would change the state. So there is an inconsistency. Let’s determine the logical action carefully. The code [[4,2,2]] has logical operators. We need to know how they act on the code space. Our state |Οβ© is not necessarily a logical basis state. It is an entangled state between the two logical qubits. So maybe the logical action of an operator is determined by its effect on the logical operators. But careful: The logical operators are defined up to stabilizers. So X_A is given as XIXI. But note that XIXI and X_0 X_3 might be related by a stabilizer? because X_0 X_3 * (I? actually, X_0 X_3 * something might equal XIXI? Consider: X_0 X_3 * X_1 X_2? That would give X_0 X_1 X_2 X_3 = XXXX, which is a stabilizer. So indeed, X_0 X_3 is actually equal to XIXI times XXXX up to phase? Because XIXI * XXXX = X_0 X_1 X_2 X_3 * X_0 I_1 X_2 I_3? That gives? Let’s do: XIXI = X_0 I_1 X_2 I_3.
XXXX = X_0 X_1 X_2 X_3.
Their product is: (X_0 X_0) (I_1 X_1) (X_2 X_2) (I_3 X_3) = I_0 * X_1 * I_2 * X_3 = X_1 X_3. That is not X_0 X_3.
Maybe: X_0 X_3 * X_1 X_2 = X_0 X_1 X_2 X_3 = XXXX. So X_0 X_3 = XXXX * (X_1 X_2)^{-1} = XXXX * X_1 X_2 because Pauli are involutory. So X_0 X_3 = XXXX * X_1 X_2. But XXXX is a stabilizer, so on the code space, X_0 X_3 acts as X_1 X2. And what is X_1 X2 logically? That would be? likely related to X_B maybe? Because X_B = XXII acts on qubits 0 and 1. So X_1 X2 is not that either.
I think I need to determine the logical action of errors that are in U{03} and U_{12} on the state |Οβ©. But we already computed that physically, if A is in U_{03} and B is in U_{12}, then the state is unchanged. So that means that for any E that is a product of an element from U_{03} and an element from U_{12}, we have E|Οβ© = |Οβ©. So that means that these errors actually stabilize |Οβ©. So they are in the stabilizer of |Οβ© within the code space. So then their logical action on |Οβ© is trivial. So then the logical fidelity after post-selection is 1.
Given that Subproblem 1 gave an answer that is not 1, Subproblem 2 likely gives a different answer. wait, Subproblem 1: physical state fidelity = (1-4p/5)^2. Subproblem 2: logical state fidelity after post-selection. If post-selection keeps only those states that are in the code space, then the probability of that is P(undetectable) = (1-4p/5)^2. And within that, the state is perfect. So then the logical fidelity would be 1. But that is too simple.
Maybe post-selection means that we detect errors and then discard those runs. So the resulting state is then that conditional state. Its fidelity would be [ probability that state is correct ] / [ probability that state is kept ]. That is (1-4p/5)^2 / (1-4p/5)^2 = 1. So that suggests that if we post-select, we get fidelity 1.
I recall that in error detection, often the fidelity after post-selection is 1 because any error that is detected is thrown out. So that makes sense: post-selection ensures that the state is error-free. So then the logical state fidelity would be 1.
But wait, could there be undetectable errors that are not correctable? But with distance 2, any error that is undetectable must be that it acts as a logical operator. But as argued, due to the structure of the errors coming from the CNOT gates, any undetectable error actually acts trivially on the state. Is that always true? What if an error occurs on both CNOT gates such that A is not identity but in U_{03} and B is not identity but in U_{12}? Then physically, we computed that still gives fidelity 1. So indeed, it seems that for this specific circuit, any error that is undetectable actually does not change the state. So then the logical fidelity after post-selection is 1.
I will check one more example: Suppose an error happens on the first CNOT: A = Y_0 Y_3 (undetectable) and on the second CNOT: B = Z_1 Z_2 (undetectable). Then the overall error is Y_0 Y_3 Z_1 Z_2. Apply this to |Οβ©.
|Οβ© = (|0000β©+|0110β©+|1001β©+|1111β©)/2.
Y_0 Y_3 Z_1 Z_2|0000β©:
Y_0|0β© = i|1β©, Y_3|0β© = i|1β©, so Y_0 Y_3 gives ii |1β©|1β© on qubits 0 and 3 -> -|11β© on those qubits. wait, careful: Y_0 Y_3|0000β© = acting on qubit0 and qubit3: |0β©-> i|1β©, |0β©-> i|1β©, so product phase = ii = -1, so becomes -|1β©_0|0β©_1|0β©_2|1β©_3 = -|1001β©? But then Z_1 Z_2 acts on qubits 1 and 2: |0β© -> |0β©, |0β© -> |0β©, so overall gives -|1001β©.
Next, Y_0 Y_3 Z_1 Z_2|0110β©:
|0110β©: qubit0=0,1=1,2=1,3=0.
Y_0|0β© = i|1β©, Y_3|0β© = i|1β©, so that gives phase ii = -1, so becomes -|1β©_0|1β©_1|1β©_2|1β©_3 = -|1111β©. Then Z_1 Z_2: Z|1β© = -|1β©, so on qubits 1 and 2, that gives (-1)(-1)=1, so overall -|1111β©.
Next, |1001β©:
Y_0|1β© = -i|0β©, Y_3|1β© = -i|0β©, so product phase = (-i)(-i)= -1, so becomes -|0β©_0|0β©_1|0β©_2|0β©_3 = -|0000β©. Z_1 Z_2 acts trivially on |0β© so overall -|0000β©.
Next, |1111β©:
Y_0|1β© = -i|0β©, Y_3|1β© = -i|0β©, so phase = (-i)(-i)= -1, so becomes -|0β©_0|1β©_1|1β©_2|0β©_3 = -|0110β©. Z_1 Z_2 on |1β© gives (-1)*(-1)=1, so overall -|0110β©.
So total: Y_0 Y_3 Z_1 Z_2|Οβ© = (-1/2)(|1001β©+|1111β©+|0000β©+|0110β©) = -|Οβ©. So indeed, it preserves the state up to a phase. So fidelity 1.
Thus, it appears that if an error is undetectable, then it actually leaves the state invariant. So then after post-selection, the state is always the ideal state. So the logical fidelity is 1.
But wait, then what is the point of Subproblem 2? It might be that the logical state fidelity is actually the probability that the state is kept times 1? That would be (1-4p/5)^2. But that is the physical fidelity, not the logical fidelity after post-selection. The phrase “logical state fidelity” might mean the fidelity of the logical state relative to the ideal logical state, conditioned on that no error was detected. That conditional fidelity would be 1 because any undetectable error gives the correct state.
I will check the official answer from the user: “The correct answer is: \(F_{\rm{physical}}=(1-\frac{12}{15}p)^2\)”. That is actually (1 - 4p/5)^2 because 12/15 = 4/5. So that is the physical fidelity. So that is Subproblem 1. Then Subproblem 2 might be something else.
Maybe Subproblem 2 is: “What is the logical state fidelity?” could be that without post-selection, the logical state fidelity is also (1-4p/5)^2? But that would be the same as physical because the state is encoded.
I think I’ll go with:
Subproblem 1: physical fidelity = (1 - 4p/5)^2.
Subproblem 2: logical fidelity after post-selection = 1.
But wait, the user said: “Now let’s solve the next Checkpoint.” So maybe Subproblem 2 is separate.
Given that the user gave an answer for Subproblem 1 as that, I will assume that Subproblem 2’s answer is 1.
I’ll answer:
Final Answer for Subproblem 2:
\[
F_{\text{logical}} = 1
\]
after post-selection.
I’ll put that in a box.
I’ll now produce the step-by-step derivation for Subproblem 2.