Skip to main content

Quantum Network Simulation Engine — entanglement distribution across repeater networks

Project description

qnet-core

License: MIT Rust Python Release

Quantum network entanglement distribution simulator. Models quantum repeater networks, link generation protocols, fidelity purification (BBPSSW), and routing strategies for quantum communication — with both Rust library and Python bindings.

Features

  • Event-driven simulation — timeline coordination with binary heap scheduler
  • Entanglement purification — BBPSSW distillation protocol
  • Three routing strategies — lowest latency, highest fidelity, highest success rate
  • Monte Carlo ensembles — statistical analysis across thousands of runs
  • Pre-built topologies — telecom backbone, repeater chain, hybrid satellite-fiber
  • Topology comparison & diffing — compare and version your network designs
  • .qnet file format — load/save/diff network topologies
  • Python bindings — full API via PyO3

Installation

Python (from source)

# Install build dependencies
pip install maturin

# Build and install in development mode
maturin develop --features python

Rust

cargo add qnet-core

Quick Start

from qnet_core import QNetEngine, StrategyType, NodeDefinition, LinkDefinition

engine = QNetEngine()

nodes = [
    NodeDefinition(id="A", memory_lifetime_t2=1.0),
    NodeDefinition(id="B", memory_lifetime_t2=1.0),
]
links = [
    LinkDefinition(
        from_node="A", to="B",
        distance_km=10.0,
        base_fidelity=0.95,
        generation_rate_hz=1000.0,
    ),
]
engine.define_network(nodes=nodes, links=links)

# Single simulation
result = engine.request_entanglement(
    from_node="A", to="B",
    fidelity_target=0.9,
    max_latency_ms=100.0,
    strategy=StrategyType.HighestFidelity,
)
print(f"Success: {result.success}  Fidelity: {result.final_fidelity:.4f}")

# Monte Carlo ensemble (1000 runs)
stats = engine.simulate(
    from_node="A", to="B",
    fidelity_target=0.9, max_latency_ms=100.0, runs=1000,
)
print(f"Success rate: {stats.empirical_success_rate:.2%}")

Documentation

Building

# Rust only
cargo build

# Python bindings
maturin develop --features python

# Format & lint
cargo fmt && cargo clippy

# Run tests
cargo test
cd python && python test_example.py

Architecture

src/
├── api/          # Public API boundary (request/response types)
├── routing/      # Pathfinding + strategy selection
├── protocols.rs  # BBPSSW purification
├── scheduler.rs  # Timeline orchestration
├── simulation.rs # Event-driven runtime
├── network.rs    # Quantum graph model
├── memory.rs     # Qubit register tracking
├── metrics.rs    # Telemetry
└── swapping.rs   # Bell-state transformations
python/           # Python bindings + examples

License

MIT — see LICENSE.

Contributing

Contributions welcome! Please open an issue or submit a pull request.

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit changes (git commit -am 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

Built with Rust + PyO3. Powered by quantum simulation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qnet_core-0.1.5.tar.gz (79.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qnet_core-0.1.5-cp38-abi3-manylinux_2_34_x86_64.whl (617.7 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.34+ x86-64

qnet_core-0.1.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (615.1 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

qnet_core-0.1.5-cp38-abi3-macosx_11_0_arm64.whl (560.0 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

qnet_core-0.1.5-cp38-abi3-macosx_10_12_x86_64.whl (561.6 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file qnet_core-0.1.5.tar.gz.

File metadata

  • Download URL: qnet_core-0.1.5.tar.gz
  • Upload date:
  • Size: 79.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qnet_core-0.1.5.tar.gz
Algorithm Hash digest
SHA256 c0e490dfb463caec6a71a59a4d034a48441e66338748ec8a23bdf3a112f9d803
MD5 ef21274f0b07c6bf9fa92aa62da5e42a
BLAKE2b-256 316b588ed65503dc82741ae41fcf5fd7d1e0c3fb5d474b58a923491bf5ca8792

See more details on using hashes here.

Provenance

The following attestation bundles were made for qnet_core-0.1.5.tar.gz:

Publisher: release.yml on qnet-labs/qnet-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qnet_core-0.1.5-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for qnet_core-0.1.5-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 35767452e48cb0fe923a6ef20650ba084d8d1a64fa86758c7ff25ca525608a1c
MD5 bb85468232e29865106b7a9466c475b0
BLAKE2b-256 37aa1572302ac65aceb3b5dbf8dbaa162a80e76c225cc7aad7a31481523d5856

See more details on using hashes here.

Provenance

The following attestation bundles were made for qnet_core-0.1.5-cp38-abi3-manylinux_2_34_x86_64.whl:

Publisher: release.yml on qnet-labs/qnet-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qnet_core-0.1.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qnet_core-0.1.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5f92f69212c54e4eb538e1b2da1fc7bd6219a8feab796282f107a05cdf5e72d5
MD5 cd6fceae104bbd538b9c3066ef00a88e
BLAKE2b-256 55f08246a9e943b1da3a8da5af287df9fe1d8a714dc85464d2a0db511deddf6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for qnet_core-0.1.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on qnet-labs/qnet-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qnet_core-0.1.5-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qnet_core-0.1.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c9044887bc2e963ca4f6d8ea90802baef12a4e322b6d82194b16abff7785b167
MD5 bbc87f60f9b310ed4ca8643f8f5cdfcd
BLAKE2b-256 3d87d8f05b7b97f8ca63869b93bfa45b6a309662958fc3e3633052c1d21f080f

See more details on using hashes here.

Provenance

The following attestation bundles were made for qnet_core-0.1.5-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on qnet-labs/qnet-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qnet_core-0.1.5-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qnet_core-0.1.5-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f77562a3c67091e7dde07d54e20defc9e160c6dbdc39c3f1a16ba73ee74dcf1e
MD5 4bdedb48d54e450545779fd765e9343e
BLAKE2b-256 e8a5d3a3c2d2cf3461fd70e39a7caa577e9e87f7b708bcf099d34f64d25d71b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for qnet_core-0.1.5-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on qnet-labs/qnet-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page