Skip to main contentIBM Quantum Documentation

FastCNOTUnitObjective

class qiskit.synthesis.unitary.aqc.FastCNOTUnitObjective(num_qubits, cnots)

GitHub(opens in a new tab)

Bases: CNOTUnitObjective

Implementation of objective function and gradient calculator, which is similar to DefaultCNOTUnitObjective but several times faster.

Parameters


Attributes

num_cnots

Returns: A number of CNOT units to be used by the approximate circuit.

num_thetas

Returns: Number of parameters (angles) of rotation gates in this circuit.

target_matrix

Returns: a matrix being approximated


Methods

gradient

gradient(param_values)

GitHub(opens in a new tab)

Computes the gradient of objective function. See description of the base class method.

Return type

ndarray(opens in a new tab)

objective

objective(param_values)

GitHub(opens in a new tab)

Computes the objective function and some intermediate data for the subsequent gradient computation. See description of the base class method.

Return type

float(opens in a new tab)

Was this page helpful?
Report a bug or request content on GitHub.