Skip to main content

qiskit-zksf

CI PyPI Python License: MIT DOI

Qiskit provider for ZKSF (Zero Kelvin Simulation Foundry). Point circuits you have already written at classical simulators, GPU accelerators, or real quantum processors, and get a documented accuracy statement back with every approximate result.

pip install qiskit-zksf
from qiskit import QuantumCircuit
from qiskit_zksf import ZKSFProvider

qc = QuantumCircuit(40, 40)
qc.h(0)
for i in range(39):
    qc.cx(i, i + 1)
qc.measure(range(40), range(40))

backend = ZKSFProvider(token="...").backend("zksf_auto")
job = backend.run(qc, shots=1000)

print(job.result().get_counts())
print(job.error_info())     # how far that answer may be from the truth

The token comes from the console at app.zksf.org, or from the ZKSF_TOKEN environment variable.

Why this exists

Exact statevector simulation stops near 30 to 32 qubits, because state size grows as 2^n. Past that, every practical method is approximate: tensor networks truncate the bond dimension, Pauli propagation truncates operator weight, real hardware substitutes device noise for the ideal distribution.

Simulators do not normally tell you how much of the answer that cost you, even though the error quantities exist inside the simulation. job.error_info() is that number.

{'protocol': 'ZCC-v0.1',
 'method': 'MPS (quimb), measured discarded-weight bound',
 'truncation_weight': 2.220446049250313e-16,
 'error_bound': 2.1073424255447017e-08,
 'certified': True,
 'converged': True}

Any finished job can be minted into a public certificate that anyone can check without an account, using zcc-verify. The protocols are specified in a citable paper: doi.org/10.5281/zenodo.21851381.

Backends

Backend Engine Qubits Notes
zksf_auto router picks 128 Default. Chooses the cheapest adequate engine
zksf_exact_cpu exact.cpu 30 Exact statevector
zksf_exact_gpu exact.gpu 29 Exact statevector on GPU
zksf_mps mps.quimb.cpu 128 Tensor network, supports certified=True
zksf_mps_aer mps.aer.cpu 128 Tensor network (Aer)
zksf_clifford clifford 5000 Stabilizer, exact for Clifford circuits
zksf_pauli pauli.cpu 1024 Heisenberg picture, needs an observable
zksf_noisy noisy.cpu 30 Device noise model, supports mitigate=True
zksf_rigetti qpu.rigetti 108 Rigetti Cepheus-1, real hardware
zksf_ionq qpu.ionq 36 IonQ Forte-1, real hardware
provider = ZKSFProvider()
provider.backends()                      # all of them
provider.backends(min_num_qubits=100)    # only the ones that reach 100 qubits
provider.backends(hardware=True)         # only real quantum processors

Qubit counts mirror the limits the service enforces, so a circuit too large for an engine fails at transpile time instead of after a round trip. The stabilizer backend advertises only Clifford gates, so the transpiler will not hand it a T gate that Stim cannot represent.

Estimate before you spend

Qiskit has no equivalent concept, so this lives on the provider. It is free, instant, and the only way to learn that a circuit would be rejected without submitting it.

est = provider.estimate(qc, shots=1000)
print(est["engine"], est["predicted_cost_usd"], est["reason"])

Asking for a measured bound

By default an approximate run is checked by convergence: the circuit is simulated again at double the resource budget and the shift in outcome probabilities is reported. That is evidence of accuracy, not a bound.

certified=True asks the tensor-network engine for a stronger statement. It runs with state renormalization disabled, so the final state's norm deficit equals the total weight discarded across every truncation, read directly off the result rather than estimated.

job = provider.backend("zksf_mps").run(qc, shots=1000, certified=True)
job.error_info()["error_bound"]

Rejections are a feature

A simulation whose own error bound would be vacuous is refused rather than returned, and the refusal says what would make the circuit tractable.

from qiskit_zksf import JobRejected

try:
    job.result()
except JobRejected as exc:
    print(exc)   # "intractable classically at this structure: ... Options: ..."

Notes and limits

  • Several circuits become several jobs. The service has no batch endpoint yet, so backend.run([qc1, qc2]) submits them individually and each is billed separately.
  • No gradients. This is a cloud job queue with per-job billing, so parameter-shift differentiation through it would be expensive and slow. Use a local simulator for optimization loops and this for the runs whose accuracy you need to state.
  • Hardware costs real money and queues in hours, not seconds. Call estimate() first.

Links

Licence

MIT.

Download files

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

Source Distribution

qiskit_zksf-0.1.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

qiskit_zksf-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file qiskit_zksf-0.1.0.tar.gz.

File metadata

  • Download URL: qiskit_zksf-0.1.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for qiskit_zksf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3f8e0e046e2cd51474a74fae5585dd8d47db76001fd1e4ea8baf584154308736
MD5 58f38ff448332bf248a495791bac4ca6
BLAKE2b-256 c1bf2e9fe5d8e9dc233b24d7fc345af2a29b16b5c19362f8b11ceeb2985d3291

See more details on using hashes here.

Provenance

The following attestation bundles were made for qiskit_zksf-0.1.0.tar.gz:

Publisher: publish.yml on official-dvl/qiskit-zksf

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

File details

Details for the file qiskit_zksf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qiskit_zksf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for qiskit_zksf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2e0235de955e2069d11c5e5d4079beedb8c66bb245452f0be2ffcbde05579db
MD5 770f3c02c2bb0f15fc8ea0b27a1592b6
BLAKE2b-256 e04cedca5fea33b7bc3a44c0060c4e6ce2012a55fad3bcaff89ebc7bdd693b26

See more details on using hashes here.

Provenance

The following attestation bundles were made for qiskit_zksf-0.1.0-py3-none-any.whl:

Publisher: publish.yml on official-dvl/qiskit-zksf

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