qiskit_serverless.core.BaseClient

class BaseClient(name, host=None, token=None)[source]

A client class for specifying custom compute resources.

Example

>>> client = BaseClient(
>>>    name="<NAME>",
>>>    host="<HOST>",
>>>    token="<TOKEN>",
>>>    compute_resource=ComputeResource(
>>>        name="<COMPUTE_RESOURCE_NAME>",
>>>        host="<COMPUTE_RESOURCE_HOST>"
>>>    ),
>>> )

Initialize a BaseClient instance.

Parameters:
  • name (str) – name of client

  • host (Optional[str]) – host of client a.k.a managers host

  • token (Optional[str]) – authentication token for manager

__init__(name, host=None, token=None)[source]

Initialize a BaseClient instance.

Parameters:
  • name (str) – name of client

  • host (Optional[str]) – host of client a.k.a managers host

  • token (Optional[str]) – authentication token for manager

Methods

__init__(name[, host, token])

Initialize a BaseClient instance.

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 programs.

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(**kwargs)

Return list of jobs.

list(**kwargs)

Returns list of available programs.

logs(job_id)

Return logs.

result(job_id)

Return results.

run(program[, arguments, config])

Run a function and return its job.

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.