- class FastCNOTUnitObjective(num_qubits, cnots)¶
Implementation of objective function and gradient calculator, which is similar to
DefaultCNOTUnitObjectivebut several times faster.
num_qubits (int) – number of qubits.
cnots (ndarray) – a CNOT structure to be used in the optimization procedure.
Methods Defined Here
Computes the gradient of objective function.
Computes the objective function and some intermediate data for the subsequent gradient computation.
Returns: A number of CNOT units to be used by the approximate circuit.
Returns: Number of parameters (angles) of rotation gates in this circuit.
Returns: a matrix being approximated