RuntimeProgram¶
- class RuntimeProgram(program_name, program_id, description, parameters=None, return_values=None, interim_results=None, max_execution_time=0, backend_requirements=None, creation_date='', update_date='', is_public=False, data='', api_client=None)[Quellcode]¶
Bases:
object
Class representing program metadata.
This class contains the metadata describing a program, such as its name, ID, description, etc.
You can use the
IBMRuntimeService
to retrieve the metadata of a specific program or all programs. For example:from qiskit import IBMQ provider = IBMQ.load_account() # To retrieve metadata of all programs. programs = provider.runtime.programs() # To retrieve metadata of a single program. program = provider.runtime.program(program_id='circuit-runner') print(f"Program {program.name} takes parameters {program.parameters().metadata}")
RuntimeProgram constructor.
- Parameter
program_name (
str
) – Program name.program_id (
str
) – Program ID.description (
str
) – Program description.parameters (
Optional
[Dict
]) – Documentation on program parameters.return_values (
Optional
[Dict
]) – Documentation on program return values.interim_results (
Optional
[Dict
]) – Documentation on program interim results.max_execution_time (
int
) – Maximum execution time.backend_requirements (
Optional
[Dict
]) – Backend requirements.creation_date (
str
) – Program creation date.update_date (
str
) – Program last updated date.is_public (
Optional
[bool
]) –True
if program is visible to all.False
if it’s only visible to you.data (
str
) – Program data.api_client (
Optional
[RuntimeClient
]) – Runtime api client.
Methods
Program parameter namespace.
Convert program metadata to dictionary format.
Attributes
- backend_requirements¶
Backend requirements.
- Rückgabetyp
Dict
- Rückgabe
Backend requirements for this program.
- creation_date¶
Program creation date.
- Rückgabetyp
str
- Rückgabe
Program creation date.
- data¶
Program data.
- Rückgabetyp
str
- Rückgabe
Program data.
- Verursacht
IBMQNotAuthorizedError – if user is not the program author.
- description¶
Program description.
- Rückgabetyp
str
- Rückgabe
Program description.
- interim_results¶
Program interim result definitions.
- Rückgabetyp
Dict
- Rückgabe
Interim result definitions for this program.
- is_public¶
Whether the program is visible to all.
- Rückgabetyp
bool
- Rückgabe
Whether the program is public.
- max_execution_time¶
Maximum execution time in seconds.
A program execution exceeding this time will be forcibly terminated.
- Rückgabetyp
int
- Rückgabe
Maximum execution time.
- name¶
Program name.
- Rückgabetyp
str
- Rückgabe
Program name.
- program_id¶
Program ID.
- Rückgabetyp
str
- Rückgabe
Program ID.
- return_values¶
Program return value definitions.
- Rückgabetyp
Dict
- Rückgabe
Return value definitions for this program.
- update_date¶
Program last updated date.
- Rückgabetyp
str
- Rückgabe
Program last updated date.