- class QuantumInstance(backend, shots=1024, seed_simulator=None, max_credits=10, basis_gates=None, coupling_map=None, initial_layout=None, pass_manager=None, seed_transpiler=None, optimization_level=None, backend_options=None, noise_model=None, timeout=None, wait=5, skip_qobj_validation=True, measurement_error_mitigation_cls=None, cals_matrix_refresh_period=30, measurement_error_mitigation_shots=None, job_callback=None)¶
Quantum Backend including execution setting.
Quantum Instance holds a Qiskit Terra backend as well as configuration for circuit transpilation and execution. When provided to an Aqua algorithm the algorithm will execute the circuits it needs to run using the instance.
backend (BaseBackend) – Instance of selected backend
shots (int, optional) – Number of repetitions of each circuit, for sampling
seed_simulator (int, optional) – Random seed for simulators
max_credits (int, optional) – Maximum credits to use
basis_gates (list[str], optional) – List of basis gate names supported by the target. Default: [‘u1’, ‘u2’, ‘u3’, ‘cx’, ‘id’]
coupling_map (CouplingMap or list[list]) – Coupling map (perhaps custom) to target in mapping
initial_layout (Layout or dict or list, optional) – Initial layout of qubits in mapping
pass_manager (PassManager, optional) – Pass manager to handle how to compile the circuits
seed_transpiler (int, optional) – The random seed for circuit mapper
optimization_level (int, optional) – How much optimization to perform on the circuits. Higher levels generate more optimized circuits, at the expense of longer transpilation time.
backend_options (dict, optional) – All running options for backend, please refer to the provider of the backend for information as to what options it supports.
noise_model (qiskit.provider.aer.noise.noise_model.NoiseModel, optional) – noise model for simulator
timeout (float, optional) – Seconds to wait for job. If None, wait indefinitely.
wait (float, optional) – Seconds between queries for job result
skip_qobj_validation (bool, optional) – Bypass Qobj validation to decrease circuit processing time during submission to backend.
measurement_error_mitigation_cls (Callable, optional) – The approach to mitigate measurement errors. Qiskit Ignis provides fitter classes for this functionality and CompleteMeasFitter from qiskit.ignis.mitigation.measurement module can be used here. (TensoredMeasFitter is not supported).
cals_matrix_refresh_period (int, optional) – How often to refresh the calibration matrix in measurement mitigation. in minutes
measurement_error_mitigation_shots (int, optional) – The number of shots number for building calibration matrix. If None, the main shots parameter value is used.
job_callback (Callable, optional) – Optional user supplied callback which can be used to monitor job progress as jobs are submitted for processing by an Aqua algorithm. The callback is provided the following arguments: job_id, job_status, queue_position, job
Return BaseBackend backend object.
Getter of backend_config.
Return backend name.
Getter of backend_options.
returns matrix refresh period
Getter of circuit summary.
Getter of compile_config.
Return True if backend is a local backend.
Return True if backend is a simulator.
Return True if backend is a statevector-type simulator.
returns measurement error mitigation cls
returns measurement error mitigation shots
Getter of noise_config.
Getter of qjob_config.
Getter of run_config.
checks if skip qobj validation
Get the stored calibration matrices and its timestamp.
A wrapper to interface with quantum backend.
Calculate the time difference from the query of last time.
Set configurations for the quantum instance.
A wrapper to transpile circuits to allow algorithm access the transpiled circuits.