pyqonvert.get_total_execution_time
- pyqonvert.get_total_execution_time(circuit, device=None)
Helper function to get total execution time of a circuit.
A Circuit takes a certain physical time when being executed on a quantum device. This function will calculate and return the total execution time of the circuit.
There are two possible ways to obtain the total execution time:
- The circuit is a linear circuit and the execution time is obtained by looking up
the execution times of the gates in the device.
- The circuit is already parallelized (for example by the qonvert Parallelizer Converter) and
contains PragmaStopParallelBlock annotations that specify the execution time for each parallel block.
- Parameters:
circuit (Circuit) -- The circuit for which to calculate the total execution time.
device (Device) -- The device determining the gate times.
- Returns:
The total execution time of the circuit. Can also by symbolic.
- Return type:
CalculatorFloat
- Raises:
RuntimeError -- If no device is provided and no PragmaStopParallelBlock annotations are found.