BackendV2 module
- class BackendV2
Implements the Backend class. The Backend class is the main execution engine.
- BackendV2()
The constructor of the BackendV2 class.
- Args:
None
- Returns:
BackendV2
- Raises:
None
- BackendV2.version: int
The version number of the class. Currently set as 2.
- BackendV2.dt: int
Returns the time resolution of input signals in seconds.
- BackendV2.dtm: int
Returns the time resolution of output signals in seconds.
- BackendV2.max_circuits: int
The maximum number of circuits that can be executed in the same run by the backend.
- BackendV2.num_qubits: int
The maximum number of qubits supported by the backend.
- BackendV2.name: str
The name of the backend.
- BackendV2.description: str
A description of the backend.
- BackendV2.online_date: str
The date the backend was brought online
- BackendV2.backend_version: str
The version of the backend.
- run(self, run_input, **kwargs)
Inserts the quantum circuit for execution in the backend’s queue. Refer to the JobV1 class for polling for the status of the job.
- Args:
- run_input (QuantumCircuit):
The QuantumCircuit object that needs to be executed.
- kwargs (dict):
Python dictionary describing execution parameters such as shots.
shots - The number of times the circuit needs to be executed in repetition.The measurement counts are maintained only for the first 10,000 shots. If more execution cycles are required, a file name can be provided where the measurements are logged.
- mode (str):
- “sync” - The quantum circuit is executed synchronously.default - “async” - The quantum circuit is executed asynchronously.
- performance (str):
- “highestefficiency” - Highest Efficiency“balancedaccuracy” - Balanced Accuracy“highestaccuracy” - Highest Accuracy“automatic” - Automatic
- quiet (bool):
- True (default) - Does not print any messageFalse - Prints some messages, such as which instruction is executed, which may be of help in tracking large circuits
- defaults (bool):
- default - True - Uses standard internal settings.False - Uses compact internal settings.
- generate_amplitude (bool):
- True - Generate amplitudes corresponding to the measurements and print them in the logging file for measurements.(default) False - Amplitudes are not printed in the logging file.
- file (str):
An optional file name for logging the measurements.
- Returns:
JobV1
- Raises:
None
- run(self, run_input, shots)
Queues the quantum circuit for execution in the backend’s queue. Refer to the JobV1 class for polling for the status of the job.
- Args:
- run_input (QuantumCircuit):
The QuantumCircuit object that needs to be executed.
- shots (int):
The number of times the circuit needs to be executed in repetition. The measurement counts are maintained only for the first 10,000 shots. If more execution cycles are required, a file name can be provided where the measurements are logged.
- sync_mode (str):
- “sync” - The quantum circuit is executed synchronously.default - “async” - The quantum circuit is executed asynchronously.
- accuracy_level (int):
- 0 - Highest Efficiency1 - Balanced Accuracy2 - Highest Accuracy3 - Automatic
- quiet (bool):
- default - True - Does not print any messageFalse - Prints some messages, such as which instruction is executed, which may be of help in tracking large circuits
- defaults (bool):
- default - True - Uses standard internal settings.False - Uses compact internal settings.
- generate_amplitude (bool):
- True - Generate amplitudes corresponding to the measurements and print them in the logging file for measurements.(default) False - Amplitudes are not printed in the logging file.
- file (str):
An optional file name for logging the measurements.
- Returns:
JobV1
- Raises:
None