Clbit#

class Clbit(identifier)[source]#

This class represents classical bits. Classical bits are created by supplying the identifier string.

Examples

We create a Clbit and add it to a QuantumCircuit. After applying an Hadamard-Gate, we measure into the Clbit.

>>> from qrisp import Clbit, QuantumCircuit
>>> qc = QuantumCircuit(1)
>>> qc.h(0)
>>> mes_result = Clbit("mes_result")
>>> qc.add_clbit(mes_result)
>>> qc.measure(0, mes_result)
>>> qc.run()
{'0': 5000, '1': 5000}