Skip to main content

eigenorbit-router-client

Run eigenkit circuits on real quantum hardware.

eigenorbit-router-client lets eigenkit users run circuits on real quantum hardware through EigenOrbit Router, with one EigenOrbit API key instead of separate vendor credentials.

You write the same eigenkit code as with your own vendor credentials and pass provider=RouterConfig(...). The router runs the circuit on an Amazon Braket simulator or QPU, or on an IBM Quantum device. Results have the same shape, dtype and bit ordering as the same code on the vendor directly. Braket jobs are billed to your prepaid EigenOrbit balance. IBM jobs run on your own IBM Quantum account and carry no router charge.

Install

pip install "eigenkit[router]"

The router extra of eigenkit installs this client.

API key

  1. Sign in to EigenOrbit Router at https://router.eigenorbit.com and accept the router terms.
  2. Add funds on the Balance page if you run Braket jobs.
  3. Create an API key on the Keys page. The key is shown once; copy it then.
export EIGENORBIT_ROUTER_API_KEY=eo_live_...
Variable Used when
EIGENORBIT_ROUTER_API_KEY RouterConfig(api_key=...) is None
EIGENORBIT_ROUTER_URL RouterConfig(base_url=...) is None; unset means https://router.eigenorbit.com

The router URL must be https:// (plain http:// only for localhost). The key is never written to a pickle or a saved model, and never appears in repr.

Quickstart

import numpy as np
from eigenkit import Circuit
from eigenkit.core.blocks import (
    AngleEncoding, BasicVariational, assemble,
)
from eigenkit.core.observables import all_z
from eigenorbit_router_client import RouterConfig

spec = assemble([
    AngleEncoding(in_features=2),
    BasicVariational(depth=1),
])

# The API key is read from EIGENORBIT_ROUTER_API_KEY.
# On a real QPU: device="braket/iqm_garnet" (see Devices)
provider = RouterConfig(device="braket/sv1", shots=1000)
circuit = Circuit(spec, all_z(2), provider=provider)

weights = np.linspace(-0.9, 1.1, spec.n_weights)
inputs = np.array([0.2, 0.6])
values = circuit(weights, inputs)  # one router job
print(values)

values holds one expectation value per observable, as on any other eigenkit provider. sample(...) and probabilities(...) work as well, and a 2-D batch runs as one router job per row.

Devices

A device ID is <vendor>/<device>, for example braket/sv1, braket/dm1, braket/iqm_garnet or ibm/ibm_fez. The catalog at https://router.eigenorbit.com/devices (no sign-in needed) lists every device with its status, availability windows, shot ranges and price.

Cost

Building a circuit asks the router for an estimate and shows one CostWarning with the price of a job: the vendor's cost plus the EigenOrbit fee. circuit.dry_run_info() returns the same estimate without sending anything. Every job holds its estimate on your balance first, so the router never runs a job your balance cannot cover. Each row of a batch and each parameter-shift gradient evaluation is a separate paid job.

Jobs

Every call blocks until its job finishes. To come back to a job later:

handle = circuit.submit(weights, inputs)
print(handle.job_id(), handle.status())
values = handle.result()

handle.cancel() asks the router to cancel the job. A job still queued at the router is cancelled at once; a job at the vendor ends the way the vendor decides. The job ID is also on the router web app's Jobs page.

Errors

Every router failure raises eigenorbit_router_client.RouterError with code, message, details and http_status. Branch on code, never on the message. The most common codes:

Code What to do
unauthenticated Check EIGENORBIT_ROUTER_API_KEY.
terms_not_accepted Accept the current terms at details["accept_url"].
insufficient_balance Add funds on the Balance page.
device_unavailable The device is offline; pick another or retry later.
shots_invalid Use shots within details["min_shots"]..details["max_shots"].
router_unreachable No answer after the retries; see below.

The client retries 502, 503, 504 and dropped connections with the same Idempotency-Key, so a retry never creates a second job. If every attempt loses its answer, router_unreachable carries details["idempotency_key"]: the job may already exist. Pass that key as circuit.compiled.submit(..., idempotency_key=...) to get the same job back instead of a second, separately billed one.

IBM Quantum

IBM devices are ibm/<backend> and run on your own IBM Quantum account. Connect it once on the router's IBM account page (https://router.eigenorbit.com/ibm) with your IBM API key and instance CRN. IBM jobs are free through the router; IBM bills your instance for the quantum time they use.

primitive_options passes Qiskit Runtime options to the job's primitive. It has the name and shape of primitive_options on eigenkit's QiskitRuntimeConfig, so the same options work with your own IBM credentials:

from eigenorbit_router_client import RouterConfig

provider = RouterConfig(
    device="ibm/ibm_fez",
    shots=4000,
    primitive_options={
        "dynamical_decoupling": {"enable": True, "sequence_type": "XpXm"},
        "twirling": {
            "enable_gates": True,
            "num_randomizations": 40,
            "shots_per_randomization": 100,
        },
    },
)

The router accepts dynamical_decoupling (enable, and sequence_type XX, XpXm or XY4) and twirling (enable_gates, enable_measure, num_randomizations, shots_per_randomization). With twirling, num_randomizations * shots_per_randomization must equal shots. Anything else is refused with validation_error before the job is created. Only IBM devices take primitive_options; on any other device RouterConfig raises ValueError.

handle.execution() returns what the router ran on IBM for a finished job, from the same request as handle.result(): the IBM job ID (vendor_job_id), the physical qubits (initial_layout, final_layout, active_qubits), the transpiled circuit as OpenQASM 3 (transpiled_qasm3), seed_transpiler, optimization_level and the Qiskit versions. It is None for a Braket job.

Saved models

A model whose provider is a RouterConfig saves the device and the settings, never the API key. Pass the router config again when you load it:

from eigenkit import QSVC
from eigenorbit_router_client import RouterConfig

model = QSVC.load("model.eigenkit", provider=RouterConfig(device="braket/sv1"))

Contributing

Development, the contract sync, releases and the live checks are described in CONTRIBUTING.md.

Support

Write to support@eigenorbit.com. Include the router job ID for a question about a job.

License

eigenorbit-router-client is licensed under the Apache License 2.0.

Metadata

Release files for eigenorbit-router-client 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eigenorbit-router-client 0.2.0
File Size Uploaded Provenance Actions
eigenorbit_router_client-0.2.0.tar.gz 238.3 kB With provenance Details for eigenorbit_router_client-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eigenorbit-router-client 0.2.0
File Interpreter ABI Platform Actions
eigenorbit_router_client-0.2.0-py3-none-any.whl Python 3 none any Details for eigenorbit_router_client-0.2.0-py3-none-any.whl

Total release size: 269.7 kB

Release files / eigenorbit_router_client-0.2.0.tar.gz

Download URL eigenorbit_router_client-0.2.0.tar.gz
Size 238.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cbb58b094d1e3412260a0acf3b8900139ae2c4387d8c21c3387a7be3eddb3780
BLAKE2b-256 checksum
How to use checksums
8bdd4e2223fdcc89f5e869e170780e42e58ce28cc87519fd55257ed8bb254935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / eigenorbit_router_client-0.2.0-py3-none-any.whl

Download URL eigenorbit_router_client-0.2.0-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0a3325194265a5bbc7225909f72bbf36e7b345d4702c7c93171b72bc3d345ca
BLAKE2b-256 checksum
How to use checksums
e00ed38c576d36a68a2313a1b7ab8718cdb110607890e580668f7259ff180fac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for eigenorbit-router-client 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for eigenorbit_router_client-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page