pyqonvert

Qonvert Python interface.

Copyright © 2021-2023 HQS Quantum Simulations GmbH. All Rights Reserved.

decompositions

Two- and single-qubit decompisitions.

optimization

Single qubit gate multiplication and identities elimination.

routing

SWAP operations insertion for limited connectivity devices.

noise

Single qubit gate multiplication and identities elimination.

Functions

get_total_execution_time(circuit[, device])

Helper function to get total execution time of a circuit.

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.