How qunasys/quri-sdk works
Main Components
• User-facing Layer
– Jupyter notebooks (notebooks/quri_sdk_notebooks)
– Tutorials & examples
• Meta-Package Layer
– quri_sdk (bundles all sub-packages)
• Core Libraries
– quri-parts: circuit & operator abstractions, transpilers, estimators, samplers
– quri-algo: high-level quantum algorithms, cost functions, problem definitions
– quri-vm: quantum virtual machine for simulation & resource estimation
• Backend & Plugin Layer (quri-parts subpackages)
– Simulators: qulacs, stim, itensor, tensornetwork, rust
– Cloud/Hardware SDKs: braket, cirq, qiskit, ionq, quantinuum, tket
– Chemistry libraries: pyscf, openfermion
– FTQC helpers: qsub
• Infrastructure Layer
– CI/CD: GitHub Actions workflows (lint, test, package)
– Packaging & build tools: Poetry (pyproject.toml), Makefiles, Sphinx docs
Relationships and Data Flow
• Notebooks ➔ import quri_sdk API
• quri_sdk ➔ aggregates quri-parts, quri-algo, quri-vm
• quri-algo ➔ calls quri-parts abstractions (circuits, estimators) and can target quri-vm or real devices via backend plugins
• quri-vm ➔ implements Estimator/Sampler interfaces defined by quri-parts for fast simulation and resource analysis
• quri-parts ➔ defines core interfaces; dispatches work to specific backend plugins based on user’s extra-package selection
• Backend plugins ➔ wrap external SDKs or simulators and translate between quri-parts IR and vendor APIs
• CI/CD workflows ➔ run tests, type checks, documentation builds on each component independently
Architectural Patterns
• Layered architecture: separation of user interface, orchestration (quri_sdk), core abstractions (quri-parts), algorithm logic (quri-algo), execution engine (quri-vm), and plugin backends
• Plugin/adapter pattern: quri-parts uses adapter subpackages to integrate third-party SDKs and simulators without changing core code
• Meta-package pattern: quri_sdk ensures compatibility and version alignment across quri-parts, quri-algo, and quri-vm
• Modular design: each library (and subpackage) has its own tests, CI, and packaging
Relevant Technologies
• Python 3.10+
• Packaging: Poetry (pyproject.toml)
• CI/CD: GitHub Actions (.github/workflows/*.yml)
• Documentation: Sphinx (quri-parts/docs), Jupyter notebooks
• Quantum frameworks: Qulacs, Stim, ITensor, TensorNetwork, OpenQASM, Braket, Cirq, Qiskit, IonQ, Quantinuum, PySCF, OpenFermion, TKET
• FTQC circuit synthesis: qsub
Essential Elements
• Interface labels on connections (e.g., “Circuit → Transpiler,” “Algorithm → Estimator”)
• CI/CD pipeline as a side flow feeding into each component’s build/test stage