Qubit#

class Qubit(identifier)[source]#

This class describes qubits. Qubits are created by supplying the identifier string.

Examples

We create a Qubit and add it to a QuantumCircuit:

>>> from qrisp import QuantumCircuit, Qubit
>>> qb = Qubit("alphonse")
>>> qc = QuantumCircuit()
>>> qc.add_qubit(qb)
>>> qc.x(qb)
>>> print(qc)
          ┌───┐
alphonse: ┤ X ├
          └───┘
Attributes
identifierstr

A string to identify the Qubit.