DefaultCNOTUnitObjective#

class qiskit.transpiler.synthesis.aqc.DefaultCNOTUnitObjective(num_qubits, cnots)[소스]#

기반 클래스: CNOTUnitObjective

A naive implementation of the objective function based on CNOT units.

매개변수:
  • num_qubits (int) – number of qubits.

  • cnots (np.ndarray) – a CNOT structure to be used in the optimization procedure.

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(param_values)[소스]#

Computes a gradient with respect to parameters given a vector of parameter values.

매개변수:

param_values (ndarray) – a vector of parameter values for the optimization problem.

반환:

an array of gradient values.

반환 형식:

ndarray

objective(param_values)[소스]#

Computes a value of the objective function given a vector of parameter values.

매개변수:

param_values (ndarray) – a vector of parameter values for the optimization problem.

반환:

a float value of the objective function.

반환 형식:

SupportsFloat