Qiskit.IBMRuntimeIBM quantum cloud access through qiskit-ibm-runtime, the supported package for qiskit >= 1.0.
Real hardware only accepts primitives, so circuits must be transpiled for the backend and run through a IBMRuntime.sampler:
let serv = IBMRuntime.service ~token:"TOKEN" () in
let backend = IBMRuntime.least_busy serv in
let j = IBMRuntime.sampler backend |> IBMRuntime.run (transpile qc backend) in
j |> result |> IBMRuntime.get_counts |> Visualization.plot_histogramPassing an Aer backend (e.g. aer_simulator) to IBMRuntime.sampler runs the circuit locally instead.
val service : ?token:string -> unit -> Provider.qproviderservice () connects to the IBM quantum platform using the saved account, or with ~token if given.
save_account token saves the IBM quantum platform account credentials on disk; ~instance selects a specific cloud instance (CRN) and ~overwrite replaces previously saved credentials.
val get_backend : string -> Provider.qprovider -> Provider.backendget_backend n serv returns the backend named n.
val backends : Provider.qprovider -> Provider.backend listbackends serv returns the available backends.
val least_busy : Provider.qprovider -> Provider.backendleast_busy serv returns the least busy operational backend.
val sampler : Provider.backend -> qsamplersampler b creates a SamplerV2 primitive running on backend b.
run qc s submits the circuit to the sampler; qc must be transpiled for the sampler backend (see transpile).
val job_status : qjob -> stringjob_status j returns the job status as a string.