qiskit-documentation/docs/api/qiskit/1.2/qiskit.synthesis.unitary.aq...

42 lines
1.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: CNOTUnitObjective (v1.2)
description: API reference for qiskit.synthesis.unitary.aqc.CNOTUnitObjective in qiskit v1.2
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.synthesis.unitary.aqc.CNOTUnitObjective
---
# CNOTUnitObjective
<Class id="qiskit.synthesis.unitary.aqc.CNOTUnitObjective" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/synthesis/unitary/aqc/cnot_unit_objective.py#L27-L58" signature="qiskit.synthesis.unitary.aqc.CNOTUnitObjective(num_qubits, cnots)" modifiers="class">
Bases: [`ApproximatingObjective`](qiskit.synthesis.unitary.aqc.ApproximatingObjective "qiskit.synthesis.unitary.aqc.approximate.ApproximatingObjective"), [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.13)")
A base class for a problem definition based on CNOT unit. This class may have different subclasses for objective and gradient computations.
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of qubits.
* **cnots** (*np.ndarray*) a CNOT structure to be used in the optimization procedure.
## Attributes
### num\_cnots
<Attribute id="qiskit.synthesis.unitary.aqc.CNOTUnitObjective.num_cnots">
Returns: A number of CNOT units to be used by the approximate circuit.
</Attribute>
### num\_thetas
<Attribute id="qiskit.synthesis.unitary.aqc.CNOTUnitObjective.num_thetas">
Returns: Number of parameters (angles) of rotation gates in this circuit.
</Attribute>
### target\_matrix
<Attribute id="qiskit.synthesis.unitary.aqc.CNOTUnitObjective.target_matrix">
Returns: a matrix being approximated
</Attribute>
</Class>