| Crates.io | bicycle_numerics |
| lib.rs | bicycle_numerics |
| version | 0.1.0 |
| created_at | 2025-07-31 16:08:05.150456+00 |
| updated_at | 2025-07-31 16:08:05.150456+00 |
| description | Compute numerics for bicycle circuits |
| homepage | |
| repository | https://github.com/qiskit-community/bicycle-architecture-compiler |
| max_upload_size | |
| id | 1775261 |
| size | 40,831 |
bicycle_numericsThis package collects in circuits of bicycle ISA instructions and assigns logical error rates, $P_i$, for each bicycle instruction as well as timing information. Using this, it computes the execution time (in syndrome cycles) and circuit failure probability.
The input of the program is the output of bicycle_compiler.
The output of the program is of the form
code,p,i,qubits,idles,t_injs,automorphisms,measurements,joint_measurements,measurement_depth,end_time,total_error
gross,0.0001,1,121,113,92,16,123,1,21,19924,1.2673e-7
gross,0.0001,2,121,2068,92,14,114,1,42,38811,2.6381e-7
gross,0.0001,3,121,2068,92,14,114,1,63,57698,4.0089e-7
gross,0.0001,4,121,2068,92,14,114,1,84,76585,5.3797e-7
...
For example, consider we have a circuit saved in simulation_circuit_twogross.json,
then we can collect numerics for that circuit by running
cat simulation_circuit_twogross.json | cargo run --release -- 120 two-gross_1e-4
The help output is
Usage: bicycle_numerics [OPTIONS] <QUBITS> <MODEL>
Arguments:
<QUBITS>
<MODEL> [possible values: gross_1e-3, gross_1e-4, two-gross_1e-3, two-gross_1e-4]
Options:
-e, --max-error <MAX_ERROR> [default: 0.3333333333333333]
-i, --max-iter <MAX_ITER> [default: 1000000]
-h, --help Print help
max-error is the circuit failure probability to halt at. (TODO: Optionally enable max)max-iter is a maximum number of iterations to process and halt. (TODO: Optionally enable max)The output of the numerics includes the number of gates in each row of input circuit.
If you would like totals, then the cumulative_instructions.awk can compute those for you.
To use it, you need a recent awk with --csv support, such as GNU gawk.
Then run
shell> cat results.csv | gawk --csv -f cumulative_instruction.awk