Skip to content

Releases: ONMARTECH/quanta-sdk

v0.9.2 — 200+ Qubit Simulation (MPS + Sparse)

Choose a tag to compare

@enessari enessari released this 31 Mar 06:44

🚀 Quanta SDK v0.9.2

Highlights

  • 200+ qubit simulation via new MPS (tensor network) simulator
  • Sparse statevector for 40-50 qubit circuits with O(k) memory
  • SimulatorBackend ABC — clean architecture for all 6 backends
  • Circuit-aware router — automatic simulator selection
  • Security hardening — exec() sandbox, eval() elimination, traceback fix
  • L3 decoupling — all 10 algorithms use factory pattern

New Simulator Backends

Simulator Max Qubits Memory Best For
Dense 27 O(2ⁿ) Full accuracy
Sparse (NEW) 50 O(k) GHZ, oracle, product
MPS (NEW) 200+ O(n·χ²) QAOA, VQE, 1D circuits
Clifford 1000+ O(n²) Stabilizer circuits

Quality

  • 820 tests pass (up from 774)
  • 0 ruff lint errors
  • 91% code coverage
  • Cross-validated: all new simulators verified against dense simulator

Security (from v0.9.1)

  • exec() sandboxed with _SAFE_BUILTINS + _validate_code()
  • eval() eliminated — pure AST walker in QASM import
  • All MCP error responses sanitized (no traceback leaks)

Install

pip install --upgrade quanta-sdk

Full changelog: CHANGELOG.md

v0.9.0 — Primitives, @quantum, Async, Benchmarks

Choose a tag to compare

@enessari enessari released this 28 Mar 22:49

What's New in v0.9.0

Estimator/Sampler Primitives (IBM V2 Compatible)

  • Estimator().run(circuit, observables=[('ZZ', 1.0)]) — exact ⟨ψ|O|ψ⟩
  • Sampler().run(circuit, shots=4096) — measurement sampling with batch
  • Both support run_async() for parallel batch execution

@quantum Decorator (PennyLane @qml.qnode Equivalent)

  • @quantum(qubits=2, observable=[('ZZ', 1.0)])
  • .expectation() — exact expectation values
  • .gradient() — parameter-shift rule, verified analytical gradients

Async Execution

  • run_async(circuits, shots=N) — top-level async batch runner

Benchmark Suite

  • 10 benchmarks: Bell (0.45ms), GHZ-20 (83ms), Gradient (0.51ms)

Property-Based Testing

  • 21 Hypothesis tests: gate unitarity, Pauli algebra, determinism

Jupyter Notebooks

  • 14 notebooks with Google Colab badges

Quality

  • 669 tests, 89% coverage
  • 0 ruff lint errors

v0.8.1 — GATE_REGISTRY, ReadoutError, Docstrings

Choose a tag to compare

@enessari enessari released this 15 Mar 02:35

Bug Fixes

  • GATE_REGISTRY: All 25 gates now registered (added RX, RY, RZ, P, U, RXX, RZZ)
  • Simulator: Fixed _get_gate_matrix() in statevector AND density matrix to handle parametric gates from registry
  • ReadoutError: Wired into runner pipeline — apply_to_counts() now applies post-measurement noise
  • Docstrings: Filled record(), build(), circuit() Args/Returns/Raises

Quality

  • 530 tests, 87% coverage
  • Lint clean (Ruff)

v0.8.0 — QML, Multi-Backend, IBM Hardware, 14 MCP Tools

Choose a tag to compare

@enessari enessari released this 10 Mar 09:51

🚀 What's New in v0.8.0

Quantum Machine Learning

  • QuantumClassifier — Variational quantum classifier with parameter-shift gradients
  • QuantumKernel — Quantum kernel matrix K(x,y) = |⟨φ(x)|φ(y)⟩|²
  • 3 Feature Maps — Angle, ZZ, Amplitude encoding

IBM Quantum Hardware

  • Real hardware submission — Submit circuits to ibm_torino, ibm_fez via REST API
  • Job pollingibm_job_result tool to fetch results from IBM
  • ISA transpilation — Automatic Heron native gate decomposition

14 MCP Tools for AI

  • run_circuit, create_bell_state, grover_search, shor_factor
  • simulate_noise, draw_circuit, list_gates, explain_result
  • monte_carlo_price, qaoa_optimize, cluster_data
  • run_on_ibm, ibm_backends, ibm_job_result (NEW)

Multi-Backend

  • IBM Quantum (156 qubits, Heron r3)
  • IonQ (36 qubits, trapped ion)
  • Google Quantum (72 qubits, Sycamore)
  • Local simulator (27 qubits)

Bug Fixes

  • QMC precision plateau eliminated (golden-section MLE)
  • Noise fidelity: Kraus density matrix + Bhattacharyya
  • Shor prime input validation
  • Sandbox import restrictions removed

Quality

  • 515 tests, 87% coverage
  • Lint clean (Ruff)
  • Python 3.10+ compatible

v0.7.0 — Quantum Monte Carlo, QAOA Optimizer, Clustering

Choose a tag to compare

@enessari enessari released this 09 Mar 07:53

What's New in v0.7.0

3 New Quantum Algorithms

  • Quantum Monte Carlo (layer3/monte_carlo.py): Amplitude estimation (BHMT) for option pricing — European call/put, lognormal/normal/uniform distributions
  • QAOA Optimizer Loop (layer3/optimize.py): scipy COBYLA variational parameter training with multi-start optimization
  • Quantum Clustering (layer3/clustering.py): Swap test circuit for quantum distance computation + k-means clustering

MCP Server: 7 → 10 Tools

  • monte_carlo_price: European option pricing via quantum amplitude estimation
  • qaoa_optimize: Combinatorial optimization (max-cut, max-ones, min-ones)
  • cluster_data: Data clustering via quantum swap test distances

Bug Fixes

  • Shor numpy.int64 overflow fixed (works >32K now)
  • Grover MCP num_qubitsnum_bits parameter fix
  • Shor factor_recursive() for full prime decomposition

Stats

  • 445 tests passed, 0 lint errors
  • 10 MCP tools, 3 new algorithms

v0.6.1 — Structural Fixes & Encapsulation

Choose a tag to compare

@enessari enessari released this 08 Mar 08:29

What's Changed in v0.6.1

Architecture & Security

  • NoiseModel integration: run(circ, noise=NoiseModel()) — noise is now a first-class citizen
  • Grover encapsulation: sim._state → public apply_phase() + state setter
  • Shor QFT via DAG: Real H/RZ/SWAP gates through DAG pipeline (modular exp stays classical)
  • Surface code: Stabilizer-based syndrome extraction + deterministic BFS logical error check
  • MCP server: exec() sandboxed with restricted __builtins__
  • QASM import: eval() replaced with safe arithmetic parser

Encapsulation

  • All sim._state access eliminated — public API only (state, apply_phase, apply_noise)
  • StateVectorSimulator.apply_noise() public method added

Code Quality

  • 0 ruff lint errors (quanta/ + tests/)
  • 78 test lint fixes (unsorted/unused imports)
  • Turkish comments → English across 12+ files
  • MCP tests skip gracefully when fastmcp not installed

Bug Fixes

  • color_code.py: RNG reproducibility (rng parameter)
  • sdg/tdg gate mappings corrected
  • BitFlipCode/PhaseFlipCode distance → 3
  • list.pop(0)deque.popleft() in DAG + surface code BFS
  • CircuitSpec removed from __all__
  • CY gate added to exports

Tests: 445 passed, 12 skipped

Quanta SDK v0.6.0 — QEC Enhancements

Choose a tag to compare

@enessari enessari released this 07 Mar 13:52

What's New

Color Code (qec/color_code.py)

  • Triangular lattice, 3-colorable plaquettes (R, G, B)
  • Restriction decoder (inspired by Google's chromobius)
  • Transversal Clifford gates (H, S, CX) — advantage over surface code
  • ColorCode(distance=3) -> [[7,1,3]], d=5 -> [[19,1,5]], d=7 -> [[37,1,7]]

QEC Decoders (qec/decoder.py)

  • MWPMDecoder: Minimum Weight Perfect Matching (greedy, O(n^2))
  • UnionFindDecoder: Near-linear O(n·α(n)) cluster-based decoder
  • Works with both surface code and color code

Pauli Frame Simulator (simulator/pauli_frame.py)

  • Aaronson-Gottesman stabilizer tableau
  • O(n) per gate, O(n^2) memory
  • 50-qubit GHZ circuit in <5 seconds
  • Clifford gates: H, S, X, Y, Z, CX, CZ, SWAP
  • Error injection for noise testing

Stats

  • 216 tests, all pass
  • Google quantumlib equivalent: Stim + chromobius + tesseract-decoder

Install

pip install --upgrade quanta-sdk

Quanta SDK v0.5.0 — Hardware Backends

Choose a tag to compare

@enessari enessari released this 07 Mar 08:35

What's New

IBM Quantum Backend

  • QASM 2.0 bridge to Qiskit
  • Local Aer simulator + real hardware via SamplerV2
  • run(bell, backend=IBMBackend('ibm_brisbane'))

IonQ Backend

  • Pure REST API — zero external dependencies
  • Native JSON gate format with job polling
  • run(bell, backend=IonQBackend('qpu.aria-1'))

Runner Enhancement

  • run() now accepts backend= parameter
  • Default: built-in statevector simulator (unchanged)

Stats

  • 171 tests, all pass
  • 4 hardware backends: Local, Google, IBM, IonQ

Install

pip install --upgrade quanta-sdk

Quanta SDK v0.4.0

Choose a tag to compare

@enessari enessari released this 06 Mar 15:15

Multi-paradigm quantum computing SDK for Python.

Install: pip install quanta-sdk
Import: import quanta

150+ tests | 11 examples | 9 algorithms | Apache 2.0