qcmet.devices.BaseDevice#
- class qcmet.devices.BaseDevice(name)[source]#
Abstract base class for quantum devices in the QCMet framework.
This class defines the required interface for any quantum device or simulator that is used to execute quantum circuits and retrieve device-specific properties.
- __init__(name)[source]#
Initialize the BaseDevice with a name.
- Parameters:
name (str) – The name of the quantum device.
Methods
__init__(name)Initialize the BaseDevice with a name.
run(circuits[, num_shots, max_circs_per_job])Execute one or more quantum circuits on the device.
- run(circuits, num_shots=1024, max_circs_per_job=None)[source]#
Execute one or more quantum circuits on the device.
If a single circuit is passed, a single counts dictionary should be returned. If a list of circuits is passed, a list of counts dictionaries should be returned.
- Parameters:
circuits (QuantumCircuit | List[QuantumCircuit]) – The circuit(s) to execute.
num_shots (int, optional) – Number of measurement shots. Defaults to 1024.
max_circs_per_job (int, optional) – Maximum number of circuits to be submitted per job. This is for when
None. (benchmark requires more circuits than hardware can run in one job. Defaults to)
- Returns:
Measurement outcomes (counts).
- Return type: