Metadata-Version: 2.4
Name: dyberforge
Version: 0.1.1
Summary: Open H-cat component simulations (cat generation, single-mode loss) and an illustrative resource model (Dyber Forge Workbench)
Author: Dyber, Inc.
License: Apache-2.0
Project-URL: Homepage, https://quantaforge.dyber.org
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: qutip>=5
Requires-Dist: matplotlib
Requires-Dist: stim>=1.13
Requires-Dist: pymatching>=2
Provides-Extra: devices
Requires-Dist: meep; extra == "devices"
Provides-Extra: crosscheck
Requires-Dist: strawberryfields; extra == "crosscheck"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# dyberforge (Workbench SDK)

Open-source simulation SDK for H-cat components: cat-state generation from squeezed vacuum,
single-mode cat loss curves, and an illustrative resource model. These are component
simulations; they make no claim about a full machine.

## Install (development)

```bash
conda create -n dyber python=3.11 -y && conda activate dyber
pip install numpy scipy qutip matplotlib stim pymatching
pip install -e .            # from forge/sdk/
```

## Use

```python
import dyberforge as df
df.generate_cat(s_db=6.0, k=1, N=40)        # cat fidelity, parity, Wigner-ready state
df.loss_curves(2.0, [10**-0.32])            # single-mode loss curves (component level)
df.estimate(gamma=0.005, target_logical_err=1e-9)  # model values (illustrative), not a device spec
```

Run the example: `python examples/quickstart.py`.

## Notes

- The physics modules are vendored into `dyberforge/`, so the package is fully
  self-contained: `pip install dyberforge` works standalone with no path injection.
- Public science only.
- `estimate()` returns model values. Model value: abstract circuit model with assumed loss
  heralds. Not a hardware operating point.
- `generate_cat()` and `loss_curves()` are component simulations of single cat modes. The
  k=1 fits at 3.5 to 8 dB land at or near the alpha = 1 floor: small cats.
- In the H-cat encoding (J. Lee et al., PRX Quantum 5, 030322 (2024)) both logical states
  carry even cats. The `parity` these functions report is a loss flag, not the logical value.
- Optional extras: `pip install .[devices]` (Meep), `.[crosscheck]` (Strawberry Fields),
  `.[dev]` (pytest). The extras install those tools only; this package contains no Meep
  or Strawberry Fields code.

## Changelog

### 0.1.1
- Labels and documentation only: resource-model thresholds, distances and cat counts are
  labeled as model values; the H-cat encoding and parity are described as in the published
  paper; the paper citation is corrected; `estimate()` results carry a `basis` field.
  No numerical change. The quickstart example also prints the fitted cat amplitude.
