Preparing the catalog and filters…Katalog ve filtreler hazırlanıyor…
Starter code
module noisy_bell;
@seed(42);
@noise("depolarizing", 0.05);
fn main() {
let q: QReg<2> = qreg[2];
sample 512 {
H(q[0]);
CNOT(q[0], q[1]);
let parity: Bit = syndrome Z(q[0]) Z(q[1]);
let a: Bit = measure(q[0]);
let b: Bit = measure(q[1]);
return (parity, a, b);
}
}Expected output
Seed makes the sampled run reproducible
The Z⊗Z syndrome reports whether the Bell pair parity is even
The Histogram tab still favors 00 and 11
01 and 10 now appear because of depolarizing noise
Output reports the effective error percentage
Debugging checklist
Run the starter code and open the Histogram tab
Find the syndrome parity line in Output
Raise the noise probability to 0.2 and re-run
Set the probability to 0 and confirm a clean Bell histogram
Explain why more gates increase the effective error
Extension challenge
Remove @seed and re-run a few times to see how sampling varies without a fixed seed.