---
title: CNOTUnitCircuit (latest version)
description: API reference for qiskit.synthesis.unitary.aqc.CNOTUnitCircuit in the latest version of qiskit
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.synthesis.unitary.aqc.CNOTUnitCircuit
---

# CNOTUnitCircuit

*class* `qiskit.synthesis.unitary.aqc.CNOTUnitCircuit(num_qubits, cnots, tol=0.0, name=None)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/synthesis/unitary/aqc/cnot_unit_circuit.py#L24-L103)

Bases: [`ApproximateCircuit`](/docs/api/qiskit/qiskit.synthesis.unitary.aqc.ApproximateCircuit "qiskit.synthesis.unitary.aqc.approximate.ApproximateCircuit")

A class that represents an approximate circuit based on CNOT unit blocks.

**Parameters**

- **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – the number of qubits in this circuit.
- **cnots** (*np.ndarray*) – an array of dimensions `(2, L)` indicating where the CNOT units will be placed.
- **tol** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – angle parameter less or equal this (small) value is considered equal zero and corresponding gate is not inserted into the output circuit (because it becomes identity one in this case).
- **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – name of this circuit

**Raises**

[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – if an unsupported parameter is passed.

## Attributes

### thetas

Returns a vector of rotation angles used by CNOT units in this circuit.

**Returns**

Parameters of the rotation gates in this circuit.

### name

Type: `str`

A human-readable name for the circuit.

**Example**

```python
from qiskit import QuantumCircuit

qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)
```

```text
my_circuit
```

## Methods

### build

`build(thetas)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/synthesis/unitary/aqc/cnot_unit_circuit.py#L68-L103)

**Constructs a Qiskit quantum circuit out of the parameters (angles) of this circuit. If a**

parameter value is less in absolute value than the specified tolerance then the corresponding rotation gate will be skipped in the circuit.

**Parameters**

**thetas** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray))

**Return type**

None
