42 lines
1.7 KiB
Plaintext
42 lines
1.7 KiB
Plaintext
---
|
||
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>
|
||
|