Metadata-Version: 2.5
Name: quantakit
Version: 1.1.0
Summary: QuantaKit SDK — build, simulate and run quantum circuits. Book Edition 1.0: stable API, offline local simulator.
Project-URL: Homepage, https://quantakit.my
Project-URL: Documentation, https://quantakit.my/docs
Author: Alaganu Enterprise
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: circuit,education,openqasm,quantum,quantum computing,qubit,simulator
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: numpy>=1.23
Provides-Extra: test
Requires-Dist: pytest>=7; extra == 'test'
Provides-Extra: visualization
Requires-Dist: matplotlib>=3.6; extra == 'visualization'
Description-Content-Type: text/markdown

# QuantaKit SDK — Book Edition 1.0

[![PyPI](https://img.shields.io/pypi/v/quantakit)](https://pypi.org/project/quantakit/)
[![Python](https://img.shields.io/pypi/pyversions/quantakit)](https://pypi.org/project/quantakit/)
[![Tests](https://github.com/mustafaalobaedy/quantakit-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/mustafaalobaedy/quantakit-sdk/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Build, simulate and run quantum circuits in Python. **Everything runs offline** on the built-in simulator — no account,
no token, no quota. QuantaKit Cloud (https://quantakit.my) is optional.

```bash
pip install quantakit==1.0.0          # the exact version the book uses
pip install "quantakit[visualization]==1.0.0"   # + matplotlib plots
```

```python
from quantakit import QuantumCircuit, transpile, LocalSimulator
from quantakit.primitives import Sampler

qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()
print(qc.draw())

backend = LocalSimulator()                       # free, offline
job = Sampler(backend).run([transpile(qc, backend)], shots=4000, seed=7)
print(job.result()[0].data.meas.get_counts())     # {'00': ~2000, '11': ~2000}
```

Switch to the cloud by changing one line: `backend = CloudService(token="qk_...").least_busy(min_qubits=2)`.

## What's inside
| Module | Contents |
|---|---|
| `quantakit` | `QuantumCircuit`, registers, `Parameter`, `ParameterVector`, `transpile`, `LocalSimulator` |
| `quantakit.circuit.library` | Bell, GHZ, QFT, Grover, phase estimation, `real_amplitudes` ansatz |
| `quantakit.quantum_info` | `Statevector`, `DensityMatrix`, `Operator`, `SparsePauliOp`, `partial_trace`, `state_fidelity`, `entropy` |
| `quantakit.primitives` | `Sampler` (counts) and `Estimator` (expectation values) — local or cloud |
| `quantakit.qasm3` / `qasm2` | OpenQASM import/export |
| `quantakit.visualization` | `text_histogram` (no dependencies), `plot_histogram`, `plot_bloch_multivector` |
| `quantakit.cloud` | `CloudService` for QuantaKit Cloud (optional) |

Bit strings are written with the highest qubit on the left (`"01"` means q0 = 1, q1 = 0).

**`data.c` or `data.meas`?** The name after `data.` is the circuit's classical register: `QuantumCircuit(2, 2)` with
`qc.measure(...)` gives `data.c`; `qc.measure_all()` gives `data.meas`. `result[0].join_data().get_counts()` works for
both. See https://quantakit.my/docs#register-names.

## Noise on QuantaKit Cloud (1.1+)
```python
from quantakit.cloud import CloudService, NoiseModel
backend = CloudService().backend("qk-sim-density")        # density-matrix simulator with noise
backend.set_options(noise=NoiseModel(depolarizing_2q=0.05, readout=0.02))
result = Sampler(backend).run([qc], shots=1000, seed=7).result()[0]
result.metadata["fidelity"], result.metadata["purity"]
```
Details: https://quantakit.my/docs#noise. Offline, build noise by hand with `DensityMatrix` and `Operator`, or use `LocalSimulator(readout_error=...)`.

## Stability promise (Book Edition)
- Version **1.0.0** is frozen for the book. Pin it: `pip install quantakit==1.0.0`. Version **1.1.0** adds cloud noise settings and runs all 1.0 code unchanged.
- Every **1.x** release keeps every documented 1.0 API working. Anything deprecated keeps working for at least two minor releases.
- Breaking changes only happen in 2.0, which will be announced and will never replace 1.x on existing installs.

Documentation: https://quantakit.my/docs · Licence: Apache 2.0
