0
$\begingroup$

I'm learning Stim with the official tutorial and have a question. I made a small program:

for rounds in range(1, 20):
    p = 0.001
    circuit = stim.Circuit.generated(
        'surface_code:rotated_memory_z',
        rounds=rounds,
        distance=5,
        after_clifford_depolarization=p,
        before_round_data_depolarization=p,
        before_measure_flip_probability=p,
        after_reset_flip_probability=p)
    num_shots = 1_000_000
    num_logical_errors = count_logical_errors(circuit, num_shots)
    print("there were {} wrong predictions (logical errors) out of {} shots with {} rounds".format(num_logical_errors, num_shots, rounds))

I copied count_logical_errors from the tutorial. I expected that the number of logical errors with rounds=2 is less than that with rounds=1, but the execution result said otherwise:

there were 18 wrong predictions (logical errors) out of 1000000 shots with 1 rounds
there were 49 wrong predictions (logical errors) out of 1000000 shots with 2 rounds
there were 75 wrong predictions (logical errors) out of 1000000 shots with 3 rounds
there were 94 wrong predictions (logical errors) out of 1000000 shots with 4 rounds
there were 127 wrong predictions (logical errors) out of 1000000 shots with 5 rounds
there were 168 wrong predictions (logical errors) out of 1000000 shots with 6 rounds
there were 179 wrong predictions (logical errors) out of 1000000 shots with 7 rounds
there were 221 wrong predictions (logical errors) out of 1000000 shots with 8 rounds
there were 235 wrong predictions (logical errors) out of 1000000 shots with 9 rounds
there were 248 wrong predictions (logical errors) out of 1000000 shots with 10 rounds
there were 299 wrong predictions (logical errors) out of 1000000 shots with 11 rounds
there were 344 wrong predictions (logical errors) out of 1000000 shots with 12 rounds
there were 386 wrong predictions (logical errors) out of 1000000 shots with 13 rounds
there were 382 wrong predictions (logical errors) out of 1000000 shots with 14 rounds
there were 400 wrong predictions (logical errors) out of 1000000 shots with 15 rounds
there were 448 wrong predictions (logical errors) out of 1000000 shots with 16 rounds
there were 471 wrong predictions (logical errors) out of 1000000 shots with 17 rounds
there were 541 wrong predictions (logical errors) out of 1000000 shots with 18 rounds
there were 557 wrong predictions (logical errors) out of 1000000 shots with 19 rounds

Is my expectation wrong, or is there anything wrong with the above code?

Thanks,

$\endgroup$

1 Answer 1

0
$\begingroup$

More rounds is more time that the logical qubit has to survive the noise it is being subjected to. So, in a memory experiment, logical error rate goes up with rounds.

$\endgroup$
3
  • $\begingroup$ Thank you! Does that mean there is no point in increasing rounds passed to stim.Circuit.generated, given all the available codes have "memory" in the name? $\endgroup$ Commented Jul 11 at 11:15
  • $\begingroup$ @YutakaHirano In real computations each logical qubit will have to survive millions or billions of rounds. More rounds is more like real computations. So no I would not say there's no reason to increase it. $\endgroup$ Commented Jul 11 at 11:35
  • $\begingroup$ I see, thank you! $\endgroup$ Commented Jul 11 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.