qiskit.providers.ibmq.runtime.RuntimeProgram¶
-
class
RuntimeProgram
(program_name, program_id, description, parameters=None, return_values=None, interim_results=None, max_execution_time=0, version='0', backend_requirements=None, creation_date='')[Quellcode]¶ 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}")
RuntimeProgram constructor.
- Parameter
program_name (
str
) – Program name.program_id (
str
) – Program ID.description (
str
) – Program description.parameters (
Optional
[List
]) – Documentation on program parameters.return_values (
Optional
[List
]) – Documentation on program return values.interim_results (
Optional
[List
]) – Documentation on program interim results.max_execution_time (
int
) – Maximum execution time.version (
str
) – Program version.backend_requirements (
Optional
[Dict
]) – Backend requirements.creation_date (
str
) – Program creation date.
-
__init__
(program_name, program_id, description, parameters=None, return_values=None, interim_results=None, max_execution_time=0, version='0', backend_requirements=None, creation_date='')[Quellcode]¶ RuntimeProgram constructor.
- Parameter
program_name (
str
) – Program name.program_id (
str
) – Program ID.description (
str
) – Program description.parameters (
Optional
[List
]) – Documentation on program parameters.return_values (
Optional
[List
]) – Documentation on program return values.interim_results (
Optional
[List
]) – Documentation on program interim results.max_execution_time (
int
) – Maximum execution time.version (
str
) – Program version.backend_requirements (
Optional
[Dict
]) – Backend requirements.creation_date (
str
) – Program creation date.
Methods
__init__
(program_name, program_id, description)RuntimeProgram constructor.
to_dict
()Convert program metadata to dictionary format.
Attributes
Backend requirements.
Program creation date.
Program description.
Program interim result definitions.
Maximum execution time in seconds.
Program name.
Program parameter definitions.
Program ID.
Program return value definitions.
Program version.
-
property
backend_requirements
¶ Backend requirements.
- Rückgabetyp
Dict
- Rückgabe
Backend requirements for this program.
-
property
creation_date
¶ Program creation date.
- Rückgabetyp
str
- Rückgabe
Program creation date.
-
property
description
¶ Program description.
- Rückgabetyp
str
- Rückgabe
Program description.
-
property
interim_results
¶ Program interim result definitions.
- Rückgabetyp
List
[ProgramResult
]- Rückgabe
Interim result definitions for this program.
-
property
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.
-
property
name
¶ Program name.
- Rückgabetyp
str
- Rückgabe
Program name.
-
property
parameters
¶ Program parameter definitions.
- Rückgabetyp
List
[ProgramParameter
]- Rückgabe
Parameter definitions for this program.
-
property
program_id
¶ Program ID.
- Rückgabetyp
str
- Rückgabe
Program ID.
-
property
return_values
¶ Program return value definitions.
- Rückgabetyp
List
[ProgramResult
]- Rückgabe
Return value definitions for this program.
-
to_dict
()[Quellcode]¶ Convert program metadata to dictionary format.
- Rückgabetyp
Dict
- Rückgabe
Program metadata in dictionary format.
-
property
version
¶ Program version.
- Rückgabetyp
str
- Rückgabe
Program version.