OptimizeQuantumCircuit module

OptimizeQuantumCircuit(qc) bool

Optimizes the provided quantum circuit for performance.

Args:
qc (QuantumCircuit):

The quantum circuit that needs to be optimized

Returns:

True - If the circuit was optimized. False - The circuit could not be optimized or something went wrong in the process. The input circuit is not modified.

Raises:
RunTimeError:

If there was an error.