@coherent code, so you get structural safety certificates without having to implement the details yourself. You can use zoo components as drop-in building blocks inside your own @coherent, @parametric, or @adaptive programs, composing them the same way you would any other b01t function.
Available modules
grover
Phase oracle and diffusion operator for Grover’s search algorithm. Use
make_phase_oracle to target any basis state, or compose the pre-built phase_oracle and diffusion_operator directly.qft
Quantum Fourier Transform and its inverse. Used as a subroutine in QPE, Shor’s algorithm, and any algorithm that needs to read out a frequency from a quantum register.
qpe
Quantum Phase Estimation. Takes a controlled-unitary oracle and estimates its eigenvalue to
t bits of precision using the inverse QFT on a counting register.amplitude_amplification
Generalized Grover search. Accepts any
@coherent state-preparation function A and predicate oracle O_chi, and amplifies the amplitude of “good” states over repeated iterations.modular
Modular arithmetic primitives for Shor-class algorithms: controlled modular addition, inplace modular multiplication, and controlled modular exponentiation. All gates are permutation gates (
@coherent/@primitive).rank_select
Coherent legal-action indexing. Maps a superposition of selector indices to the corresponding empty cell in an occupancy register. Used in rollout oracles for sequential decision problems.
qae
Quantum Amplitude Estimation. Provides both iterative (measurement-based) and coherent (QPE-based) amplitude estimation, plus classical MLE post-processing utilities.
max_finding
Quantum maximum finding via the Dürr–Høyer algorithm. Composes coherent amplitude estimation with Grover search to identify the highest-payoff arm in O(√k/ε) oracle calls.
Importing from the zoo
Each module lives underb01t.zoo and exports its public API directly from its package:
Composing zoo modules
Zoo functions are ordinary b01t DSL functions — you call them inside@coherent, @parametric, or @adaptive bodies the same way you call any gate or kit utility. The following example builds a QPE circuit by combining the QFT module with a custom unitary oracle:
Zoo modules that use continuous rotation gates (QFT, QPE, QAE) are decorated
@parametric. Modules that use only permutation and diagonal gates (Grover oracle, diffusion, modular arithmetic) are @coherent. Check each module’s documentation for its decorator so you know which host context it can run in.