Skip to main content

Marqov SDK

Orchestration engine for hybrid quantum-classical workflows.

Run a Bell state immediately — no credentials, no infrastructure:

import asyncio
from marqov.circuits import Circuit
from marqov.executors import LocalExecutor

async def main():
    result = await LocalExecutor().execute(
        Circuit().h(0).cnot(0, 1), shots=1000
    )
    print(result.counts)  # {'00': ~500, '11': ~500}

asyncio.run(main())

Scale to parallel workflows across any backend:

from marqov import task, workflow, bell_state
from marqov.executors import LocalExecutor

@task
async def measure(shots):
    result = await LocalExecutor().execute(bell_state(), shots=shots)
    return result.counts

@workflow
def multi_shot_study(shot_counts):
    return [measure(n) for n in shot_counts]  # all run in parallel

dispatch = multi_shot_study([100, 500, 1000, 5000])
# dispatch.run(client) — needs a Temporal worker
# Use the Marqov platform or run your own: see marqov/workflows/

Independent tasks execute in parallel automatically. Marqov handles scheduling, retries, and result collection across any supported backend.


Installation

pip install marqov

With backend-specific extras:

# IBM Quantum
pip install "marqov[qiskit]"

# All extras
pip install "marqov[all]"

For local development:

git clone https://github.com/marqov-dev/marqov-sdk
cd marqov-sdk
pip install -e ".[all,dev]"
pytest tests/ -v

Cloud Executors

Swap in a cloud backend when you're ready to run on hardware — on your own provider accounts, no Marqov account needed:

import asyncio
from marqov.circuits import Circuit
from marqov.executors import ExecutorFactory

async def main():
    circuit = Circuit().h(0).cnot(0, 1)

    executor = ExecutorFactory.create_executor("sv1", {
        "provider": "AWS Braket",
        "device_arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1",
        "s3_bucket": "my-bucket",
        "s3_prefix": "jobs",
    })
    result = await executor.execute(circuit, shots=1000)
    print(result.counts)

asyncio.run(main())

Or run directly on IonQ hardware via the native REST API (no AWS account needed):

executor = ExecutorFactory.create_executor("qpu.aria-1", {
    "provider": "IonQ Direct",
    "api_key": "your-ionq-api-key",  # or set IONQ_API_KEY
})
result = await executor.execute(circuit, shots=1000)

Or run on Rigetti QPUs (or the local QVM, no cloud account needed) via Rigetti QCS:

executor = ExecutorFactory.create_executor("2q-qvm", {
    "provider": "Rigetti QCS",
})
result = await executor.execute(circuit, shots=1000)

Supported Backends

Backend Status
Local (QuantumFlow simulator) Available
AWS Braket Available
IBM Quantum Available
Azure Quantum Available
IonQ Direct Available
Rigetti QCS Available
Quantinuum Available

Circuit Interop

Circuit is a backend-agnostic abstraction that converts to any supported framework's native format:

from marqov.circuits import Circuit

circuit = Circuit().h(0).cnot(0, 1)

circuit.to_qiskit()   # qiskit.QuantumCircuit
circuit.to_braket()   # braket.circuits.Circuit
circuit.to_cirq()     # cirq.Circuit
circuit.to_pyquil()   # pyquil.Program  (requires pip install marqov[pyquil])

Import from other formats:

circuit = Circuit.from_qiskit(qiskit_circuit)
circuit = Circuit.from_cirq(cirq_circuit)
circuit = Circuit.from_pennylane(tape)
circuit = Circuit.from_pyquil(pyquil_program)  # requires pip install marqov[pyquil]

Using the hosted platform (marqov.platform)

The SDK runs fully standalone — everything above needs no Marqov account.

If you want managed backend credentials, persistent job history, execution traces, and spend controls without running your own infrastructure, the Marqov Platform is an opt-in value-add.

marqov.platform is an optional import — loading marqov never loads the platform client. It is only activated when you import it explicitly.

Live-server caveat: The examples below are not yet verified against a live server — live verification is pending our staging environment.

v1.0 scope: v1.0 supports free backends (e.g. dwave-sim). Paid backends and Circuit submission are coming in a future update.

Quickstart

1. Set your API key (get one from the Marqov Platform dashboard):

export MARQOV_PLATFORM_KEY="marqey_live_your_key_here"

2. Submit a script and poll for results:

from marqov.platform import MarqovClient

# Key is read from MARQOV_PLATFORM_KEY automatically
client = MarqovClient()

script = """
from marqov import task

@task
async def bell(shots):
    from marqov.circuits import Circuit
    from marqov.executors import LocalExecutor
    result = await LocalExecutor().execute(
        Circuit().h(0).cnot(0, 1), shots=shots
    )
    return result.counts

bell(1000)
"""

job = client.submit(script, backend="dwave-sim", framework="marqov", shots=1000)
print("Job ID:", job.id)

# Block until complete (up to 5 minutes by default)
result = job.result(timeout=300.0)
print(result.counts)       # e.g. {'00': 507, '11': 493}
print(result.probabilities) # e.g. {'00': 0.507, '11': 0.493}

3. Check available backends:

for b in client.backends():
    print(b.slug, b.name, "available:", b.is_available)

4. Reconnect to a job from a previous session:

job = client.job("550e8400-e29b-41d4-a716-446655440000")
result = job.result(timeout=60.0)

Error handling

All platform errors inherit from MarqovPlatformError:

from marqov.platform import AuthenticationError, JobFailed, RateLimited

try:
    job = client.submit(script, backend="dwave-sim", framework="marqov")
    result = job.result(timeout=120.0)
except AuthenticationError:
    print("Check your MARQOV_PLATFORM_KEY")
except JobFailed as e:
    print("Job failed:", e.message)
except RateLimited as e:
    print(f"Rate limited — retry after {e.retry_after}s")
except TimeoutError:
    print("Timed out — job is still running server-side")

For the full error taxonomy and retry guidance see docs/platform-client/error-handling.md.

Platform documentation


Contributing

See CONTRIBUTING.md for the executor interface spec, canonical gate set, factory registration steps, and local QVM setup for Rigetti development.

Bounty issues are open through unitaryHACK 2026 — see the issues page for what's available.

License

Apache 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marqov-0.3.0.tar.gz (375.4 kB view details)

Uploaded Source

Built Distribution

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

marqov-0.3.0-py3-none-any.whl (108.5 kB view details)

Uploaded Python 3

File details

Details for the file marqov-0.3.0.tar.gz.

File metadata

  • Download URL: marqov-0.3.0.tar.gz
  • Upload date:
  • Size: 375.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for marqov-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1a828573a76824e74b3f3035065b6005c0d4865f239818d427f7c8faa53d6c60
MD5 1b88454ac7b4c9719b1792c3fb77a40e
BLAKE2b-256 a39e15801743244ca7635bf71faae29b6f858bf8ad8f6f09afe13cd1fc215bc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for marqov-0.3.0.tar.gz:

Publisher: release.yml on marqov-dev/marqov-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file marqov-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: marqov-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 108.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for marqov-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c231d282b4b7a5c30fddf7b2fc8d14cca4a582c8ad8d7d3a166d2b83e024be
MD5 ea7dd6f85c591dcf82d2e313f4e54bd1
BLAKE2b-256 cc0aed1bcaf50e6cc2d5fc3ef7bb7c1d11bb1c4ca172e0b553a633ca0df6388c

See more details on using hashes here.

Provenance

The following attestation bundles were made for marqov-0.3.0-py3-none-any.whl:

Publisher: release.yml on marqov-dev/marqov-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page