1 unstable release

0.1.0 Jul 31, 2025

#234 in Science

Download history 132/week @ 2025-07-27 21/week @ 2025-08-03 3/week @ 2025-08-10 7/week @ 2025-08-17 14/week @ 2025-08-24 29/week @ 2025-08-31 16/week @ 2025-09-07 12/week @ 2025-09-14 18/week @ 2025-09-21 14/week @ 2025-09-28

63 downloads per month
Used in 5 crates

Apache-2.0

17KB
285 lines

bicycle_common

This crate implements common functionality of the Bicycle Architecture Compiler. Its main contribution are the logical instruction of bivariate bicycle codes. It supports instantiating instructions and some methods for manipulation, random sampling, etc.

Pauli is also defined in this crate.

Summary of the logical instructions

We list

type display name description

of the bicycle instructions used in Tour de Gross arXiv:2506.03094:

  • SyndromeCycle sc Idle operation. Not used explicitly by the compiler, only inferred with timing information in the numerics.
  • Automorphism aut(_,_) Perform a unitary automorphism gate, see Section 9.2 of arXiv:2308.07915.
  • Measure meas(_,_) Measure the first and/or seventh qubit.
  • JointMeasure jMeas(_,_) One half of a joint measurement between code modules. Measure the first and/or seventh qubit of each module.
  • TGate T(_,_,_) Apply $exp(i P\pi/8)$ for $P \in \set{X,Z,Y}$ on the first or seventh qubit.

Note that we also define other logical instructions of bivariate bicycle codes that are not used (explicitly) by the compiler:

  • CSSInitZero init0 Initialize all logical qubits in a code module to |0>.
  • CSSInitPlus init+ Initialize all logical qubits in a code module to |+>.
  • DestructiveZ measZ Measure all logical qubits in a code module in Z basis.
  • DestructiveX measX Measure all logical qubits in a code module in X basis.
  • ParallelMeasurepMeas(_) Measure the first and seventh qubit independently.
  • JointBellInit jBell One half of an instruction acting on two code modules. Initialize 12 Bell pairs using transversal CX.
  • JointTransversalCX jCnot One half of an instruction acting on two code modules. Perform 12 CX gates via transversal CX.
  • InitT initT Initialize all logical qubits in a code module to |T>, at physical noise rate.

Dependencies

~0.7–1.4MB
~29K SLoC