Metadata-Version: 2.4
Name: mimiq-tensorkeeper-mock
Version: 0.1.2
Requires-Dist: mimiqcircuits>=0.32.0,<0.33
Requires-Dist: numpy>=1.26
Requires-Dist: qiskit>=2.0 ; extra == 'qiskit'
Requires-Dist: mimiq-qiskit>=0.5.0,<0.6 ; extra == 'qiskit'
Provides-Extra: qiskit
License-File: LICENSE.md
Summary: Unlicensed mock of the TensorKeeper CAMPS simulator: the MIMIQ data models with no simulation behind them
Author-email: Guido Masella <guido.masella@qperfect.io>
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# MIMIQ TensorKeeper: unlicensed mock

This distribution on PyPI is **not the TensorKeeper simulator**. It is
`MockTensorKeeper`: the same interface, the same arguments, the same MIMIQ data
models, and no simulation behind them. Results come back well-formed and empty:
all-zero samples, zero amplitudes and expectation values, fidelity 1.0.

It exists so that code which drives a MIMIQ backend can be tested on a machine
with no licence: a CI job can check that its circuits build, that its options
are accepted, and that its results parse and round-trip, without paying for a
simulation it does not care about.

```bash
pip install mimiq-tensorkeeper
```

The same build is also published as `mimiq-tensorkeeper-mock`. Use that name
when a project declares the licensed package (`mimiq-tensorkeeper`, from
QPerfect) and this mock side by side and needs the two to have different
names. Install one or the other, never both: they install the same
`tensorkeeper` package.

```python
import mimiqcircuits as mc
from tensorkeeper import MockTensorKeeper

sim = MockTensorKeeper(bonddim=64)

c = mc.Circuit()
c.push(mc.GateH(), 0)
c.push(mc.GateCX(), 0, 1)
c.push(mc.Measure(), [0, 1], [0, 1])

res = sim.execute(c, nsamples=1000, seed=42)
res.histogram()        # {bs"00": 1000}: a real QCSResults, carrying nothing
```

`MockTensorKeeper` takes the same constructor and `execute` arguments as the
licensed `TkSimulator` and refuses exactly what it refuses, so a configuration
that fails here fails there. Swapping between them is an import change.

## What this build cannot do

It is compiled without the compute kernels: gate application, the Clifford
frame updates, measurement, sampling, noise and expectation values are not in
the binary. `tensorkeeper.has_kernels()` is `False`, and `TkSimulator` raises
on construction and says so.

`python -m tensorkeeper.examples.00_mock_backend.main` runs in this build; the
other examples in `tensorkeeper.examples_dir()` show what the licensed one does.

## The licensed simulator

TensorKeeper is a Clifford-augmented matrix product state quantum circuit
simulator for MIMIQ, distributed by QPerfect to licence holders from its own
package index rather than from PyPI.

For access, documentation and support: <https://qperfect.io>

