The open H-cat simulation SDK
An open-source Python SDK for the H-cat architecture: build cat states, breed them, model realistic heralding, run hybrid fusion, and study loss and fault tolerance. Every result is converged, cross-checked, and regression-tested.
Install
conda create -n dyber python=3.11 -y
conda activate dyber
pip install qutip numpy scipy matplotlib stim pymatching
pip install dyberforge # physics SDK, 0.1.0, Apache-2.0
Quickstart
import dyberforge as df
# Generate a cat at 6 dB squeezing, single photon subtraction
res = df.generate_cat(s_db=6.0, k=1, N=40)
print(res["fidelity"], res["parity"]) # 0.997, -1.0
# Loss budget with parity stabilization at the 3.2 dB chain
rows = df.loss_curves(alpha0=2.0, etas=[10**-0.32])
print(rows[0]["F_unc"], rows[0]["F_cor_shrunk"]) # 0.35, 0.995
# Resource estimate: target -> device spec
# v2, June 2026 circuit-level calibration; 0.5% per-cycle loss spec.
# At 1% loss, above the 0.79% circuit-level threshold, estimate()
# honestly returns distance None: no fault-tolerant distance exists.
est = df.estimate(gamma=0.005, target_logical_err=1e-9)
print(est["distance"], est["cats_per_logical"]) # 53, 5617
Dyber SDK: run circuits on the H-cat
The dyber package is the user-facing SDK for the H-cat quantum computer. Write a gate-model circuit, build it, and run it on the local simulator today. The hcat_qpu hardware backend is not yet available (hardware in development), so circuits run on the simulator only. The simulator is physics-informed: it applies the validated loss and resource models, including a genuine Monte Carlo quantum-trajectory noise model, to produce realistic, noise-aware results.
pip install dyber # product SDK, 0.1.0, Apache-2.0
from dyber import Dyber, Circuit
dy = Dyber()
c = Circuit(2, "bell")
c.h(0); c.cx(0, 1); c.measure_all()
job = dy.backend("local_simulator").run(c, shots=1000)
print(job.result().counts()) # {'00': 502, '11': 498}
print(job.result().resources) # distance, cats_per_logical, regime, ...
Supported gates: h, x, y, z, s, t, cx, cz, swap, rx, ry, rz, p, measure. Backends: local_simulator (statevector with trajectory noise), hcat_qpu (not yet available, hardware in development). Try it in your browser.
What is inside
Quantum optics
Squeezed vacuum, photon subtraction (ideal and realistic beamsplitter-tap with PNR), cat breeding, hybrid fusion, the pure-loss channel, parity readout, Wigner functions, and a time-domain master-equation check.
Fault tolerance
Surface-code thresholds with stim and pymatching, the loss-to-erasure mapping, an erasure-aware decoder, and the full circuit-level syndrome-extraction noise model (circuit-level loss threshold 0.79 to 0.9 percent per cycle). Numbers reflect full circuit-level noise (June 2026 campaign), superseding earlier phenomenological figures.
Devices
SiN microring resonances and free spectral range (Meep), waveguide modes and dispersion (MPB), and a ring quality-factor budget.
System
The end-to-end resource model and the requirements engine that powers the Resource Analyzer.
Reproducibility: a regression test suite asserts the headline numbers and runs on demand. The validation report documents every cross-check.