Skip to main content
IBM Quantum Platform
This page is from the dev version of Qiskit SDK. Go to the stable version.

CNOTUnitCircuit

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

GitHub

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 (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) – 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

Methods

build

build(thetas)

GitHub

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)

Return type

None

Was this page helpful?
Report a bug, typo, or request content on GitHub.