Repository navigation
Release Notes
v0.37.0
Prelude
qiskit_serverless v0.37.0 removes the Ray-coupling client helpers that
were deprecated in 0.34.0: the distribute_task decorator, the get,
put and get_refs_by_status helpers, distribute_qiskit_function and
qiskit_serverless.core.remote. Functions that need in-function
parallelism should use Ray directly. The deprecated compute_profile
input on run() is also removed in favour of function_size, whose
label is restricted to S, M, L and XL. This release also adds a
provider filter to function listing, reports a new STOPPING status
when a job is cancelled, and raises the required qiskit-ibm-runtime
version to 0.50.
New Features
qiskit-fermions==0.2.0has been added to the dynamic dependencies
allowlist bundled in the custom functions image. Qiskit Functions that
declare it as a dependency can now use it.
- The custom functions image now ships the CUDA runtime libraries
gpu4pyscfneeds at import, so GPU chemistry functions no longer have
to install those wheels themselves.
-
Listing Qiskit Functions now accepts a
providerargument that
returns only the functions belonging to that provider:client.functions(provider="q-ctrl")The filter narrows the functions the caller can already see, so it
never widens access, and a provider the caller has no functions under
returns an empty list.
- Cancelling a job now reports a new
STOPPINGstatus, shown by the
client SDK asCANCELING, until the job has really stopped and its
compute is released. Previously the job was reported as stopped
straight away, while its compute was still being released. Sub-status
and error reporting keep working while a job is stopping.
-
Running Qiskit Functions can now read the compute sizing their job
resolved to, with two new helpers,
~qiskit_serverless.get_function_sizeand
~qiskit_serverless.get_compute_profile:from qiskit_serverless import get_function_size, get_compute_profile get_function_size() # e.g. "M" get_compute_profile() # e.g. "24x120x1a100p"This lets a function check which
function_sizethe user submitted
and which compute profile it mapped to. Both are always set for Fleets
jobs (the requested size, or the function's default when none was
requested) and are empty when sizes do not apply, i.e. a non-Fleets
(Ray) job. The values are set by the gateway at job submission through
theENV_JOB_FUNCTION_SIZEandENV_JOB_COMPUTE_PROFILEenvironment
variables.
- The gateway now injects an authoritative Qiskit user configuration
file (settings.conf) into every Ray and Code Engine Fleets job
container and pointsQISKIT_SETTINGSat it. The file currently sets
a single key,min_qpy_version(default13, configurable fleet-wide
with theQISKIT_MIN_QPY_VERSIONenvironment variable), which makes
Qiskit reject QPY payloads older than that version. For Fleets the
file is written by the job wrapper at container startup; for Ray it is
written into the job working directory and referenced by a
cwd-relativeQISKIT_SETTINGS.
Upgrade Notes
- Qiskit Serverless now requires
qiskit-ibm-runtime==0.50, raised from
0.49.
- The optional
rayextra (pip install qiskit-serverless[ray]) now
requiresray>=2.59, raised from2.58.
- Several packages have been added to the dynamic dependencies allowlist
bundled in the custom functions image:h5py,mpi4py,openmpi,
pybind11andqrmi[ibm]. Qiskit Functions that declare any of them
as a dependency can now use them.ffsimis updated to0.0.70and
qiskit-addon-sqdto0.13.1.
qiskit-fermions==0.2.0requiresqiskit~=2.5.0, so theqiskit
version in the custom functions image is now held to the 2.5 line.
Functions that relied on an earlierqiskitin the image should
review the Qiskit 2.3-2.5 release notes for API changes.
-
The
distribute_taskdecorator and theget,putand
get_refs_by_statushelpers have been removed. They were
deprecated in 0.34.0 as thin wrappers around Ray's native API, which
must now be used directly. Functions that need in-function parallelism
shouldimport rayand use Ray's own decorators:distribute_task->
ray.remoteget->
ray.getput->
ray.putget_refs_by_status->
ray.wait
Before (using the removed Qiskit Serverless wrappers):
from qiskit_serverless import get_arguments, save_result, distribute_task, get @distribute_task() def distributed_transpilation(circuit, target_backend): ... # returns an ISA circuit return isa_circuit refs = [distributed_transpilation(circuit, backend) for circuit in circuits] isa_circuits = get(refs) save_result({"results": isa_circuits})
After (using Ray directly):
import ray from qiskit_serverless import get_arguments, save_result @ray.remote def distributed_transpilation(circuit, target_backend): ... # returns an ISA circuit return isa_circuit refs = [distributed_transpilation.remote(circuit, backend) for circuit in circuits] isa_circuits = ray.get(refs) save_result({"results": isa_circuits})
- The
distribute_qiskit_functiondecorator has been removed. It
was deprecated in 0.30. Use theuploadfunctionality of
~qiskit_serverless.ServerlessClientinstead.
qiskit_serverless.core.remote, a thin proxy around
ray.remote,
has been removed. Useray.remotedirectly, as shown above.
- The OpenTelemetry spans that
distribute_taskinjected around each
distributed task have been removed along with it, including the
per-taskqs.meta.*,qs.resources.*,qs.args.*andqs.kwargs.*
span attributes. The client-sidejob.*,function.*andfiles.*
spans, and gateway and scheduler tracing, are unaffected.
-
The deprecated
compute_profileinput onPOST /programs/run/has
been removed. Usefunction_sizewith one of the labels the function
declares instead. Sendingcompute_profilenow returns a 400 naming
the replacement, instead of being silently ignored.The client SDK's
compute_profilekeyword onrun()now raises
QiskitServerlessExceptionlocally instead of sending the request, so
upgrade the client to get a clear error rather than a generic 400 from
the gateway.
- The size label declared for a function is now restricted to
S,M,
LandXL. A size outside this catalog is rejected on
/programs/upload. A size is accepted case-insensitively and stored
and read back in uppercase.
- A cancelled job stays in
STOPPINGuntil its compute is released, and
counts against the user's active and running job limits for that time.
A cancellation that is never confirmed is forced to stopped after 5
minutes.
- Stopping a job now answers "Serverless job stop has been requested."
where it used to say the job "was running and has been stopped", since
the request only asks for the stop and does not wait for it to finish.
- The gateway-provided
settings.confis authoritative: a function's
own Qiskit configuration file is no longer consulted in the Functions
runtime. Qiskit reads exactly the one fileQISKIT_SETTINGSnames,
with no merging, and the gateway setsQISKIT_SETTINGSin the
system-controlled environment layer that overrides any value a
function supplies. A function that shipped or wrote its own
settings.conf(at the default~/.qiskit/settings.confor
elsewhere) will find it ignored. Function vendors that need Qiskit
configuration beyondmin_qpy_versionmust apply it programmatically
in their function code rather than through a configuration file.
Security Issues
- The
custom_tokenauthentication mechanism no longer accepts the
localchannel, which checks a static mock token and needs no
instance. The Helm chart also stops passingSETTINGS_AUTH_MOCK_TOKEN
to the pods unless the mechanism ismock_token.
Bug Fixes
- The gateway and the scheduler now exit when their startup migration
fails, instead of starting against a database that does not match the
code.
- Fixed GPU chemistry functions silently running on the CPU, because the
CUDA librariesgpu4pyscfloads at import were missing from the
image. The image now installs them and its build checks that they
resolve.
- A request to the IBM Cloud and IBM Quantum Platform channels without
theService-CRNheader now fails with an authentication error that
asks for the header, instead of an internal server error.
- A request whose authentication could not be completed because IBM
Cloud was unreachable, timed out, or returned a server error now fails
withHTTP 503and a message asking the user to retry, instead of a
401telling them to review their API key or CRN. Valid credentials
and a valid CRN are no longer reported as invalid during an IBM Cloud
outage; the401messages are kept only when IBM Cloud actually
rejects the API key or the CRN.
- A request that fails to reach the service because the connection was
dropped, the TLS handshake failed, or the request timed out now raises
aQiskitServerlessExceptionwith codeCONN1001and a message
saying the failure is usually temporary and to try again. These
transient failures were previously reported with codeAUTH1001and a
message telling the user to check their host and authentication, which
pointed at configuration that was not the problem.
- A successful response that arrives with an empty body, which happens
on a transient blip and clears on retry, now raises a
QiskitServerlessExceptionwith codeEMPTY1001and a message saying
to try again. It was previously reported with codeJSON1001as a
server json decoding error, which read as a permanent problem.
Changes
- Register blocked accounts Goyo (@korgan00) (#2519)
- Changing some log messages from info to debug level Ismael Rozas (@ismaelRozasRamallal) (#2571)
- update-version-0.37.0 @github-actions[bot] (#2563)
- Expose resolved function size and compute profile to the job Elena Peña Tapia (@ElePT) (#2569)
- Use the shared IamTokenProvider for IBM Cloud auth Marcelo Carneiro do Amaral (@marceloamaral) (#2568)
- Inject a Qiskit user configuration file setting the minimum QPY version into job containers Elena Peña Tapia (@ElePT) (#2567)
- Return 503 instead of a CRN error when IBM Cloud is unreachable during auth Elena Peña Tapia (@ElePT) (#2564)
- Report a dropped connection as transient, not as a configuration error Elena Peña Tapia (@ElePT) (#2565)
- Consume blocked accounts events Goyo (@korgan00) (#2505)
- Add cuda dependencies for GPU chemistry functions Tonia Maracheril (@eletonia) (#2542)
- Require the Service-CRN header and reject the local channel in the custom token backend Alberto Vilches (@avilches) (#2561)
- Stop a Fleets job through STOPPING and confirm it from the task store Marcelo Carneiro do Amaral (@marceloamaral) (#2532)
- Create http client to publish functions jobs to the Runtime API Alberto Vilches (@avilches) (#2557)
- Keep a Fleets job queued and pause Fleets submits while Code Engine or COS is unavailable Marcelo Carneiro do Amaral (@marceloamaral) (#2551)
- Remove the Ray-coupling decorators from the client ItamarGoldman (#2543)
- Send best-effort Kafka events without waiting for a flush Alberto Vilches (@avilches) (#2547)
- Add a Functions Operator API key secret to the gateway and scheduler Tova Roth (@riley2012) (#2556)
- Remove the transitional
Job.compute_profilestring field from the gateway Dhruval P (@dpatel-ops) (#2555) - Send to plain senders one row at a time and to batch senders in batches Alberto Vilches (@avilches) (#2545)
- Bump the gateway-dependencies group in /gateway with 10 updates @dependabot[bot] (#2554)
- Bump the client-dependencies group in /client with 6 updates @dependabot[bot] (#2553)
- Bump the tests-dependencies group in /tests with 4 updates @dependabot[bot] (#2552)
- Remove dead compute_profile attribute from client SDK Job Dhruval P (@dpatel-ops) (#2550)
- Revert "Pass the job id to Fleets containers as QISKIT_FUNCTIONS_IDENTIFIER" Alberto Vilches (@avilches) (#2548)
- remove compute profile string from client Dhruval P (@dpatel-ops) (#2537)
- Move compute profile registration from gh actions to test fixture Dhruval P (@dpatel-ops) (#2546)
- Store the CRN region in the outbox and drain it per region Alberto Vilches (@avilches) (#2541)
- Fix subscription id field Ismael Rozas (@ismaelRozasRamallal) (#2544)
- Billing: swtich to compute_profile_id Dhruval P (@dpatel-ops) (#2540)
- Parse instance CRNs in one shared helper Alberto Vilches (@avilches) (#2538)
- Pass the job id to Fleets containers as QISKIT_FUNCTIONS_IDENTIFIER Alberto Vilches (@avilches) (#2539)
- Send outbox rows in batches with a single flush per producer Alberto Vilches (@avilches) (#2536)
- Restrict function size labels to a closed catalog (S/M/L/XL) Alberto Vilches (@avilches) (#2499)
- Lowercase the function size in the license fee metric type Marcelo Carneiro do Amaral (@marceloamaral) (#2535)
- Publish job billing events to Kafka through a transactional outbox Alberto Vilches (@avilches) (#2498)
- Exit the entrypoints when the startup migration fails Alberto Vilches (@avilches) (#2531)
- Map the STOPPING job status to CANCELING in the client SDK Marcelo Carneiro do Amaral (@marceloamaral) (#2528)
- Persist plan_id and subscription_id on the job Ismael Rozas (@ismaelRozasRamallal) (#2529)
- Bump the gateway-dependencies group in /gateway with 9 updates @dependabot[bot] (#2527)
- Resolve plan_id and subscription_id during authentication Ismael Rozas (@ismaelRozasRamallal) (#2523)
- Build job_fleet_id_idx without CONCURRENTLY to fix the startup migration deadlock Tova Roth (@riley2012) (#2524)
- Bump the tests-dependencies group in /tests with 3 updates @dependabot[bot] (#2525)
- Bump the client-dependencies group in /client with 7 updates @dependabot[bot] (#2526)
- Add a STOPPING job status Marcelo Carneiro do Amaral (@marceloamaral) (#2508)
- Install Ray in the Fleets selector image Elena Peña Tapia (@ElePT) (#2522)
- docs: document the non-blocking result(wait=False) behaviour Chandra Teja Pannem (@Asterisk-Hunter) (#2516)
- Fix spelling mistakes in docs, READMEs and comments Chandra Teja Pannem (@Asterisk-Hunter) (#2517)
- Resolve the Code Engine project name to its id and resource group Marcelo Carneiro do Amaral (@marceloamaral) (#2510)
- Rename CI checks to Ray Integration tests and Fleets smoke tests Marcelo Carneiro do Amaral (@marceloamaral) (#2374)
- gateway update compute_profile -> compute_profile_fk Dhruval P (@dpatel-ops) (#2514)
- Extend the Job model with plan_id and subscription_id Ismael Rozas (@ismaelRozasRamallal) (#2512)
- Fix the postgres healthcheck passing before the database is ready Marcelo Carneiro do Amaral (@marceloamaral) (#2509)
- Read Functions entitlements from GET /entitlements Tova Roth (@riley2012) (#2495)
- Replace MinIO with SeaweedFS in fleets integration tests Elena Peña Tapia (@ElePT) (#2511)
- remove compute_profile from filler jobs Dhruval P (@dpatel-ops) (#2507)
- Add GPU and new chemistry dependencies to docker images Elena Peña Tapia (@ElePT) (#2506)
- License fee function size Goyo (@korgan00) (#2472)
- Resolve Code Engine subnet pool id from a configured name Elena Peña Tapia (@ElePT) (#2455)
- Replace eu-de Kafka secret lookup with values-gated env vars Ismael Rozas (@ismaelRozasRamallal) (#2504)
- Bump the gateway-dependencies group across 1 directory with 8 updates @dependabot[bot] (#2503)
- Bump the client-dependencies group across 1 directory with 3 updates @dependabot[bot] (#2502)
- Tolerate the wall-clock fallback in the backtracking regex test Alberto Vilches (@avilches) (#2500)
- Bump the tests-dependencies group across 1 directory with 4 updates @dependabot[bot] (#2501)
- Update base image versions David (@Tansito) (#2494)
- Report whether Code Engine accepted a fleet cancel Marcelo Carneiro do Amaral (@marceloamaral) (#2496)
- Disable manual status edits in Job admin, add Ray-only Stop job button Alberto Vilches (@avilches) (#2497)
- Repoint FleetsRunner and admin timeline to Job.compute_profile_fk Dhruval P (@dpatel-ops) (#2492)
- Add fleets selector image to fleets integration tests and Makefile Tonia Maracheril (@eletonia) (#2493)
- Surface T-shirt size elements in the backoffice admin Elena Peña Tapia (@ElePT) (#2467)
- Force sizes exist for a function fleet David (@Tansito) (#2490)
- Modify Gateway tox configuration for environment David (@Tansito) (#2491)
- Add regions to kafka Goyo (@korgan00) (#2417)
- Add a command to migrate old job business models to licensed Alberto Vilches (@avilches) (#2435)
- Fix Fleets jobs stuck in PENDING when Kafka is down Alberto Vilches (@avilches) (#2489)
- Add external secret for eu-de kafka instance Ismael Rozas (@ismaelRozasRamallal) (#2483)
- Pull Minio from Quay Ismael Rozas (@ismaelRozasRamallal) (#2484)
- Create kafka external secret independently of billing Ismael Rozas (@ismaelRozasRamallal) (#2482)
- Enable find jobs by fleet_id in backoffice Alberto Vilches (@avilches) (#2474)
- Cancel the Code Engine job when a Fleets job times out Alberto Vilches (@avilches) (#2478)
- Emit classical time events in seconds instead of miliseconds Ismael Rozas (@ismaelRozasRamallal) (#2477)
- Exempt filler jobs from PROGRAM_TIMEOUT Alberto Vilches (@avilches) (#2476)
- Revert "Exclude filler jobs from the Fleets status/timeout update task" Alberto Vilches (@avilches) (#2475)
- Exclude filler jobs from the Fleets status/timeout update task Alberto Vilches (@avilches) (#2473)
- Bump the gateway-dependencies group in /gateway with 5 updates @dependabot[bot] (#2471)
- Bump the tests-dependencies group in /tests with 4 updates @dependabot[bot] (#2469)
- Bump the client-dependencies group in /client with 2 updates @dependabot[bot] (#2470)
- Allow filtering functions by provider name in list() Elena Peña Tapia (@ElePT) (#2433)
- Set
running_started_atbefore emitting the job-started events Ismael Rozas (@ismaelRozasRamallal) (#2468)
🐛 Bug Fixes
- Report what a job really did when it finishes while stopping Marcelo Carneiro do Amaral (@marceloamaral) (#2562)
- Stop a job and submit it at the same time without leaking a fleet Marcelo Carneiro do Amaral (@marceloamaral) (#2566)