Skip to main content

Qiskit BackendV2 bridge for MIMIQ: run Qiskit circuits on MIMIQ cloud or local MIMIQ simulators.

Project description

MIMIQ

mimiq-qiskit

Qiskit bridge for MIMIQ.

A drop-in Qiskit BackendV2 that lets Qiskit users submit circuits to the MIMIQ cloud, or to any local MIMIQ simulator, without leaving the Qiskit ecosystem. Build your circuits with QuantumCircuit, hand them to a MimiqBackend, get back a familiar qiskit.result.Result.

Highlights:

  • MimiqBackend: a BackendV2 covering the standard gate set, arbitrary UnitaryGates, and single-gate mid-circuit conditionals. A batch of circuits is submitted as a single MIMIQ job.
  • MimiqSamplerV2 / MimiqEstimatorV2: native Qiskit V2 primitives. The estimator computes expectation values exactly with MIMIQ's expectation-value engine, with no shot noise.
  • MIMIQ-specific run options (bonddim, entdim, timelimit, noisemodel, and more) pass straight through backend.run(...).

Repository layout

mimiq-qiskit/
├── docs/        # Sphinx documentation
├── examples/    # Runnable examples
├── src/         # Python package
└── tests/       # Pytest suite

Qiskit is Python-only, so this repo has no Julia side; the package lives at the repo root rather than under a nested mimiq-qiskit-python/ directory.

Quick start

from qiskit import QuantumCircuit
from mimiqlink import MimiqConnection
from mimiq_qiskit import MimiqBackend

# Authenticate against the MIMIQ cloud (opens a browser prompt).
conn = MimiqConnection()
conn.connect()

backend = MimiqBackend(conn)

qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])

job = backend.run(qc, shots=1000)
counts = job.result().get_counts()
print(counts)

Local MIMIQ simulators (anything implementing the mimiqcircuits.backends.Backend interface) wrap the same way; pass the backend instance instead of a connection:

from mimiq_qiskit import MimiqBackend
from somewhere import MyLocalBackend

backend = MimiqBackend(MyLocalBackend())

Primitives

Prefer the native primitives for sampling and expectation values. The estimator is exact, with no shot noise:

from qiskit import QuantumCircuit
from qiskit.quantum_info import SparsePauliOp
from mimiq_qiskit import MimiqBackend, MimiqEstimatorV2

backend = MimiqBackend(conn)
estimator = MimiqEstimatorV2(backend)

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

result = estimator.run([(qc, SparsePauliOp(["ZZ", "XX"], [1.0, 0.5]))]).result()
print(result[0].data.evs)

See examples/sampling.py and examples/expectation_values.py for runnable scripts.

Installation

pip install mimiq-qiskit

Development

Branch model: active development on devel, releases on main.

uv sync             # install dev environment
uv run pytest -sxv  # run the test suite
uv build            # build wheel + sdist

Repositories and releases

Development happens on the private GitLab repository (origin); the public GitHub mirror (public, qperfect-io/mimiq-qiskit) is kept in sync on the main branch and the public version tags:

  • main and vX.Y.Z tags are pushed to both origin and public.
  • vX.Y.Z-private tags live only on origin/devel and never reach the public remote.

On the public repository, pushing a vX.Y.Z tag triggers the PyPI publish and GitHub Pages documentation deploy. To develop against an unreleased mimiqcircuits, add the sibling checkout locally without committing it:

uv add --editable ../mimiqcircuits-python

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

mimiq_qiskit-0.1.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

mimiq_qiskit-0.1.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file mimiq_qiskit-0.1.1.tar.gz.

File metadata

  • Download URL: mimiq_qiskit-0.1.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mimiq_qiskit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 88ed38b57623cf7bacdbc000e930e47fe1756063bfd0bc58a12754d283af2941
MD5 a43ab559bcafbb4baf1ce4584a79523e
BLAKE2b-256 43cf6ea796a1d7eee941e410813f1efe0adefd6a67f52211457bbdf5d9f6ea94

See more details on using hashes here.

File details

Details for the file mimiq_qiskit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mimiq_qiskit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mimiq_qiskit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5bbfc2ebfa7f2333e6aded9f565675adbc15202e593b8b1b7794369bdee5c29c
MD5 fd901fcc3b37e078d4aa8c00320eb459
BLAKE2b-256 61aad1c5983f4d9ed02cf529ad14678e04850d40c92df76b943d93552e9f0ec1

See more details on using hashes here.

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