Shortcuts

qiskit.providers.ibmq.IBMQBackendService

class IBMQBackendService(provider)[소스]

Backend namespace for an IBM Quantum Experience account provider.

Represent a namespace that provides backend related services for the IBM Quantum Experience backends available to this provider. An instance of this class is used as a callable attribute to the AccountProvider class. This allows a convenient way to query for all backends or to access a specific backend:

backends = provider.backends()  # Invoke backends() to get the backends.
sim_backend = provider.backends.ibmq_qasm_simulator  # Get a specific backend instance.

Also, you are able to retrieve jobs from a provider without specifying the backend name. For example, to retrieve the ten most recent jobs you have submitted, regardless of the backend they were submitted to, you could do:

most_recent_jobs = provider.backends.jobs(limit=10)

It is also possible to retrieve a single job without specifying the backend name:

job = provider.backends.retrieve_job(<JOB_ID>)

IBMQBackendService constructor.

매개변수

provider (AccountProvider) – IBM Quantum Experience account provider.

__init__(provider)[소스]

IBMQBackendService constructor.

매개변수

provider (AccountProvider) – IBM Quantum Experience account provider.

Methods

__init__(provider)

IBMQBackendService constructor.

jobs([limit, skip, backend_name, status, …])

Return a list of jobs, subject to optional filtering.

my_reservations()

Return your upcoming reservations.

retrieve_job(job_id)

Return a single job.

jobs(limit=10, skip=0, backend_name=None, status=None, job_name=None, start_datetime=None, end_datetime=None, job_tags=None, job_tags_operator='OR', descending=True, db_filter=None)[소스]

Return a list of jobs, subject to optional filtering.

Retrieve jobs that match the given filters and paginate the results if desired. Note that the server has a limit for the number of jobs returned in a single call. As a result, this function might involve making several calls to the server.

매개변수
  • limit (int) – Number of jobs to retrieve.

  • skip (int) – Starting index for the job retrieval.

  • backend_name (Optional[str]) – Name of the backend to retrieve jobs from.

  • status (Union[JobStatus, str, List[Union[JobStatus, str]], None]) – Only get jobs with this status or one of the statuses. For example, you can specify status=JobStatus.RUNNING or status=》RUNNING》 or status=[《RUNNING》, 《ERROR》]

  • job_name (Optional[str]) – Filter by job name. The job_name is matched partially and regular expressions can be used.

  • start_datetime (Optional[datetime]) – Filter by the given start date, in local time. This is used to find jobs whose creation dates are after (greater than or equal to) this local date/time.

  • end_datetime (Optional[datetime]) – Filter by the given end date, in local time. This is used to find jobs whose creation dates are before (less than or equal to) this local date/time.

  • job_tags (Optional[List[str]]) – Filter by tags assigned to jobs.

  • job_tags_operator (Optional[str]) –

    Logical operator to use when filtering by job tags. Valid values are 《AND》 and 《OR》:

    • If 《AND》 is specified, then a job must have all of the tags specified in job_tags to be included.

    • If 《OR》 is specified, then a job only needs to have any of the tags specified in job_tags to be included.

  • descending (bool) – If True, return the jobs in descending order of the job creation date (i.e. newest first) until the limit is reached.

  • db_filter (Optional[Dict[str, Any]]) –

    A loopback-based filter. This is an interface to a database where filter. Some examples of its usage are:

    Filter last five jobs with errors:

    job_list = backend.jobs(limit=5, status=JobStatus.ERROR)
    

    Filter last five jobs with hub name ibm-q:

    filter = {'hubInfo.hub.name': 'ibm-q'}
    job_list = backend.jobs(limit=5, db_filter=filter)
    

반환 형식

List[IBMQJob]

반환값

A list of IBMQJob instances.

예외
  • IBMQBackendValueError – If a keyword value is not recognized.

  • TypeError – If the input start_datetime or end_datetime parameter value is not valid.

my_reservations()[소스]

Return your upcoming reservations.

반환 형식

List[BackendReservation]

반환값

A list of your upcoming reservations.

retrieve_job(job_id)[소스]

Return a single job.

매개변수

job_id (str) – The ID of the job to retrieve.

반환 형식

IBMQJob

반환값

The job with the given id.

예외
당신은 다음 언어로 문서를 보고 있다 lang: Korean
언어
English
Japanese
German
Korean