CNOTUnitCircuit
class qiskit.synthesis.unitary.aqc.CNOTUnitCircuit(num_qubits, cnots, tol=0.0, name=None)
Bases: ApproximateCircuit
A class that represents an approximate circuit based on CNOT unit blocks.
Parameters
- num_qubits (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 (Optional[float]) – 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 (Optional[str]) – name of this circuit
Raises
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
from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)
my_circuit