1) Step-by-Step Derivation
Setup and noise model
- We run the 4‑qubit circuit (right-to-left)
(CNOT03)(H0)(CNOT21)(H2),
with ideal single-qubit H’s. Each CNOT is followed by an independent 2‑qubit depolarizing channel: with probability 1−p nothing happens and with probability p one of the 4^2−1=15 non-identity two‑qubit Pauli operators is applied uniformly (p/15 each). This is the standard n‑qubit depolarizing channel. [Cirq documentation spells this out; identical definition is used widely.] (quantumai.google)
-
The code is the [[4,2,2]] code with stabilizer generators S=⟨XXXX, ZZZZ⟩. Its codespace is the simultaneous +1 eigenspace of these two operators. (errorcorrectionzoo.org)
-
The target logical state is the logical Bell state |Φ+〉AB=(|00〉AB+|11〉AB)/√2, which (at the logical level) is stabilized by XAXB and ZAZB; equivalently the physical state prepared by the circuit is a 4‑qubit stabilizer state whose stabilizer contains {XXXX, ZZZZ} together with logical-Bell stabilizers mapped into the code. For the 2‑qubit Bell state itself, the (phase-free) stabilizer set is {II, XX, ZZ} (with −YY also in the full Pauli stabilizer group), so XX and ZZ generate it. (quantumcomputing.stackexchange.com)
Where the errors land
- No gate after CNOT21 touches qubits 2 or 1, and CNOT03 is last and only touches qubits 0 and 3. Hence the total Pauli error at the end factors as
E = P21 ⊗ Q03,
with P21 acting on qubits {2,1} and Q03 on {0,3}, independently drawn per the depolarizing model above.
Post-selection rule (detect-then-keep)
- “Post-select on all detectable errors” means we discard any run whose final stabilizer measurements report a nontrivial syndrome. For Pauli errors, an error is undetected exactly when it commutes with every stabilizer generator; i.e., E lies in the centralizer/normalizer N(S) of S in the 4‑qubit Pauli group. If E∉N(S), at least one generator anticommutes with E and yields a −1 outcome, so we reject the run. (en.wikipedia.org)
Commutation constraints in parity form
- Represent a Pauli string by binary “X- and Z-parity” indicators: for each qubit j, let xj=1 if the local Pauli is X or Y and zj=1 if it is Z or Y (else 0). A Pauli E commutes with XXXX iff the total parity of {Z,Y} across all four qubits is even, i.e., ∑j zj≡0 (mod 2). It commutes with ZZZZ iff ∑j xj≡0 (mod 2). This is the standard symplectic-commutation rule in the stabilizer formalism. (en.wikipedia.org)
Classify two-qubit Paulis on a given pair
- For any fixed pair, say (2,1), group the 16 Paulis (including II) by the two parities (a,b)≡(∑xj mod 2, ∑zj mod 2) on that pair:
• Class 00: {II, XX, YY, ZZ} (size 4; among these, the 3 non-identity are XX, YY, ZZ)
• Class 10: {XI, IX, YZ, ZY} (size 4)
• Class 01: {ZI, IZ, XY, YX} (size 4)
• Class 11: {XZ, ZX, IY, YI} (size 4)
Acceptance (probability that the run is kept)
- No error: accepted with probability (1−p)^2 (E=I∈N(S)).
- Exactly one gate errs (say on (2,1)): E lies in N(S) iff that pair error has even x-parity and even z-parity, i.e., it is in class 00 and non-identity ⇒ exactly 3 acceptable Paulis out of 15. The same holds if only (0,3) errs. Contribution: 2(1−p)p(3/15).
- Both gates err: E=P21⊗Q03 commutes with XXXX and ZZZZ iff the pairwise parities match between the two pairs (a,b)21=(a,b)03 (both constraints). Counting acceptable pairs among 15×15=225 possibilities:
class 00: 3×3=9
class 10: 4×4=16
class 01: 4×4=16
class 11: 4×4=16
Total 57. Contribution: p^2·(57/225)=p^2·(19/75).
Therefore the post-selection acceptance probability is
\[
P_{\rm acc}(p)
=(1-p)^2+2(1-p)p\frac{3}{15}+p^2\frac{57}{225}
=1-\frac{8}{5}p+\frac{64}{75}p^2.
\]
“Good” (logically correct) undetected errors
- Among accepted runs (E∈N(S)), the logical two-qubit state equals the intended |Φ+〉AB iff E acts on the codespace as an element of the logical-Bell stabilizer subgroup generated by XAXB and ZAZB (global phases ignored), i.e., E is in the state’s stabilizer. For our circuit this occurs exactly when:
• No error, or
• A single-pair error is one of {XX,YY,ZZ} on that pair, or
• Both pairs have errors from {XX,YY,ZZ} on each pair (9 combinations).
This is precisely the same counting that gave the physical 4‑qubit state fidelity in Subproblem 1:
\[
P_{\rm good}(p)=(1-p)^2+2(1-p)p\frac{3}{15}+9\left(\frac{p}{15}\right)^2
=1-\frac{8}{5}p+\frac{16}{25}p^2,
\]
since {XX,YY,ZZ} stabilize the Bell state up to phase. (quantumcomputing.stackexchange.com)
Logical fidelity conditioned on passing detection
- The desired quantity is the conditional fidelity of the logical 2‑qubit state given acceptance (syndrome +1), i.e.,
\[
F_{\rm logical}(p)=\frac{P_{\rm good}(p)}{P_{\rm acc}(p)}
=\frac{1-\frac{8}{5}p+\frac{16}{25}p^2}{1-\frac{8}{5}p+\frac{64}{75}p^2}
=\frac{75-120p+48p^2}{75-120p+64p^2}.
\]
Sanity checks
- Small‑p expansion: using (1+αp+βp^2)/(1+γp+δp^2)=1+(α−γ)p+[β−δ−γ(α−γ)]p^2+… and noting the linear terms cancel, we get
\[
F_{\rm logical}(p)=1-\frac{16}{75}p^2+O(p^3),
\]
showing first‑order errors are removed by post‑selection, as expected for a distance‑2 detection code. (en.wikipedia.org)
- At p=1: Flogical(1)=(1/25)/(19/75)=3/19≈0.1579.
2) Mathematical Typesetting
All key steps above are written in LaTeX.
3) Conventions and Units
4) Final Answer:
Flogical(p) = (75 − 120 p + 48 p^2) / (75 − 120 p + 64 p^2) = [1 − (8/5)p + (16/25)p^2] / [1 − (8/5)p + (64/75)p^2].
Equivalently, for small p: Flogical(p) = 1 − (16/75)p^2 + O(p^3).