Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

FastCNOTUnitObjective

class FastCNOTUnitObjective(num_qubits, cnots)

GitHub

Bases: qiskit.transpiler.synthesis.aqc.cnot_unit_objective.CNOTUnitObjective

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

Parameters

  • num_qubits (int) – number of qubits.
  • cnots (ndarray) – a CNOT structure to be used in the optimization procedure.

Methods Defined Here

gradient

FastCNOTUnitObjective.gradient(param_values)

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

Return type

ndarray

objective

FastCNOTUnitObjective.objective(param_values)

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

Return type

float


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

Return type

ndarray

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