Spanish
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

DefaultCNOTUnitObjective

class DefaultCNOTUnitObjective(num_qubits, cnots)[fuente]

Bases: CNOTUnitObjective

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

Parámetros
  • num_qubits (int) – number of qubits.

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

Methods Defined Here

gradient

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

objective

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

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