|
Dist m4ri 0.16.1
Computing distance of a classical or quantum CSS code
|
Functions | |
| load (code_dir) | |
| layers_of (sched, key, h, nq_data) | |
| build (m, sched, basis, rounds) | |
| main () | |
Memory-experiment Stim circuits for the mitten codes of a7b/yarn (arXiv:2607.28795), with the published hook-free
syndrome-extraction schedule (processor_codes/<family>/[[n,k,d]]/hook_free_SE_cycle_schedule.json).
Each cycle: reset the X- and Z-check ancillas; the 12 layers of the X-check round (CX from the X-check ancilla to the
data qubit for every listed pair [check row of Hx, data column]); MX of the X-check ancillas; the 12 layers of the
Z-check round (CX from the data qubit to the Z-check ancilla); M of the Z-check ancillas. The cycles after the first are
in a REPEAT block. The data qubits start in |0> (Z basis) or |+> (X basis) and are measured in that basis at the end.
Detectors: the checks of the memory basis in the first cycle, every check in the later cycles (compared with the
previous cycle), and the checks of the memory basis from the final data measurements; observables: the rows of Lz
(Z basis) or Lx (X basis). Noise: uniform circuit-level noise of dist_m4ri.add_noise(p) (DEPOLARIZE2 after each CX,
DEPOLARIZE1(p/10) on idle qubits at each TICK, flips of resets and measurements).
Usage, from a checkout of https://github.com/a7b/yarn (commit 1b58edd24e19b6b5da6814fd3a74ebb376b6e90f):
python3 benchmark/stim_mitten/make_yarn_mitten_circuits.py "YARN/processor_codes/mitten/[[150,30,10]]" \
benchmark/stim_mitten [--rounds R] [--p P] [--basis X|Z|XZ] [--check-rounds R]
(R = 0: the d of the code name). Output: yarn_<family>_<n>_<k>_<d>_hookfree_r<R>_<basis>.stim.
| make_yarn_mitten_circuits.build | ( | m, | |
| sched, | |||
| basis, | |||
| rounds ) |
The noiseless memory circuit: the first cycle, then the other rounds - 1 cycles in a REPEAT block.
Definition at line 55 of file make_yarn_mitten_circuits.py.
References layers_of().
Referenced by main().
| make_yarn_mitten_circuits.layers_of | ( | sched, | |
| key, | |||
| h, | |||
| nq_data ) |
The layers of one check round as lists of (check row, data column); checks against h and qubit conflicts.
Definition at line 38 of file make_yarn_mitten_circuits.py.
Referenced by build().
| make_yarn_mitten_circuits.load | ( | code_dir | ) |
Definition at line 32 of file make_yarn_mitten_circuits.py.
Referenced by main().
| make_yarn_mitten_circuits.main | ( | ) |
Definition at line 105 of file make_yarn_mitten_circuits.py.
References dist_m4ri.add_noise(), build(), load(), and main().
Referenced by main().