Release 0.7.0
What's Changed
BREAKING
-
Removed
Qx.Remote,Qx.Remote.Config, andQx.RemoteError. The qx_server-based hardware path has been replaced by direct-to-IBM execution viaQx.Hardware. There is no shim; the credential shape and call sites are different.Migration:
# before (0.6.x) config = Qx.Remote.Config.new!(url: "...", api_key: "...") {:ok, result} = Qx.Remote.run(circuit, config, backend: "ibm_brisbane", shots: 4096) # after (0.7.x) config = Qx.Hardware.Config.new!( portal_url: "https://api.qxquantum.com", portal_token: "<qxportal token>", ibm_api_key: "<ibm cloud api key>", ibm_crn: "<ibm quantum service crn>", ibm_region: "us-east", backend: "ibm_brisbane", shots: 4096 ) {:ok, result} = Qx.Hardware.run(circuit, config)
The new
Qx.Hardware.Config.from_env!/1readsQX_PORTAL_URL,QX_PORTAL_TOKEN,QX_IBM_API_KEY,QX_IBM_CRN,QX_IBM_REGION,QX_IBM_BACKENDfor a one-liner setup.
Added
Qx.Hardware— public namespace owning the full direct-to-IBM execution pipeline (IAM exchange → qxportal transpile → IBM submit → poll → result-build).Qx.Hardware.Config— credential + execution-preference struct (portal_url,portal_token,ibm_api_key,ibm_crn,ibm_region,backend,optimization_level,shots). Validates region against the IBM allowlist, optimization_level0..3, shots1..100_000, portal URL scheme.Qx.Hardware.Ibm— Req-based client for IBM Quantum (Qiskit Runtime REST API). IAM exchange + 401-refresh-retry, backends list, backend configuration, Sampler V2 submission, poll loop with Pascal-Case status allowlist, sample-aggregation to counts, best-effort cancel.Qx.Hardware.Portal— Req-based client for the qxportal/api/v1/meand/api/v1/transpileendpoints. Atomize allowlist for response keys.Qx.Hardware.NoMeasurementsError— raised when a circuit submitted to hardware has nomeasure/2instructions.Qx.Hardware.ConfigError— typed validation error forQx.Hardware.Config.- Privacy invariant — two independent HTTP clients; the portal token never reaches IBM, and the IBM API key/CRN never reach the portal.
- Status callback — pipeline progress events (
{:portal, :transpiling},{:ibm, :polling, status}, …). All atoms literal (Iron Law #1 — noString.to_atomon caller input).
Removed
Qx.Remote,Qx.Remote.Config,Qx.RemoteError(see BREAKING above).examples/remote/— superseded byexamples/hardware/run_on_ibm.exs.
Dependencies
- New test-only dep:
{:bypass, "~> 2.1"}(HTTP stubbing for portal + IBM tests). - Explicit pin:
{:jason, "~> 1.4"}(previously transitive via Req/Plug).
Installation
Add to your mix.exs:
def deps do
[
{:qx_sim, "~> 0.7.0"}
]
end