qiskit_serverless.core.ServerlessClient¶
- class ServerlessClient(name=None, host=None, version=None, token=None, instance=None, channel='ibm_quantum_platform')[source]¶
A client for connecting to a specified host.
Example
>>> client = ServerlessClient( >>> name="<NAME>", >>> host="<HOST>", >>> token="<TOKEN>", >>> )
Initializes the ServerlessClient instance.
- Parameters:
name (
Optional[str]) – name of clienthost (
Optional[str]) – host of gatewayversion (
Optional[str]) – version of gatewaytoken (
Optional[str]) – authorization tokeninstance (
Optional[str]) – IBM Cloud CRN or IQP h/g/pchannel (
str) – identifies the method to use to authenticate the user
- __init__(name=None, host=None, version=None, token=None, instance=None, channel='ibm_quantum_platform')[source]¶
Initializes the ServerlessClient instance.
- Parameters:
name (
Optional[str]) – name of clienthost (
Optional[str]) – host of gatewayversion (
Optional[str]) – version of gatewaytoken (
Optional[str]) – authorization tokeninstance (
Optional[str]) – IBM Cloud CRN or IQP h/g/pchannel (
str) – identifies the method to use to authenticate the user
Methods
__init__([name, host, version, token, ...])Initializes the ServerlessClient instance.
dependencies_versions()Get the list of available dependencies and its versions for creating functions
file_delete(file, function)Deletes a file available to the user for the specific Qiskit Function.
file_download(file, function[, target_name, ...])Download a file available to the user for the specific Qiskit Function.
file_upload(file, function)Uploads a file in the specific user's Qiskit Function folder.
files(function)Returns the list of files available for the user in the Qiskit Function folder.
filtered_logs(job_id, **kwargs)Returns logs of the job.
from_dict(dictionary)Converts dict to object.
function(title[, provider])Returns program based on parameters.
functions(**kwargs)Returns list of available functions.
get(title[, provider])Returns program based on parameters.
get_job_by_id(job_id)Returns job by job id.
get_jobs(**kwargs)Return list of jobs.
job(job_id)Returns job by job id.
jobs([function])Retrieve a list of jobs with optional filtering.
list(**kwargs)Returns list of available programs.
logs(job_id)Return logs.
provider_file_delete(file, function)Deletes a file available to the provider for the specific Qiskit Function.
provider_file_download(file, function[, ...])Download a file available to the provider for the specific Qiskit Function.
provider_file_upload(file, function)Uploads a file in the specific provider's Qiskit Function folder.
provider_files(function)Returns the list of files available for the provider in the Qiskit Function folder.
provider_jobs(function, **kwargs)Retrieve jobs for a specific provider and function.
result(job_id)Return results.
run(program[, arguments, config, provider])Run a function and return its job.
runtime_jobs(job_id[, runtime_session])Retrieve Qiskit IBM Runtime job ids that correspond to a given serverless job_id execution and, optionally, filtered by session id.
runtime_sessions(job_id)Retrieve Qiskit IBM Runtime session ids that correspond to a given serverless job_id execution.
status(job_id)Check status.
stop(job_id[, service])Stops job/program.
to_dict()Converts class to dict.
upload(program)Uploads program.
widget()Widget for information about provider and jobs.