Clbit¶
- class Clbit(register=None, index=None)[ソース]¶
ベースクラス:
Bit
Implement a classical bit.
Creates a classical bit.
- パラメータ
register (ClassicalRegister) – Optional. A classical register containing the bit.
index (int) – Optional. The index of the bit in its containing register.
- 例外
CircuitError – if the provided register is not a valid
ClassicalRegister
Attributes
- index¶
Get the index of an old-style bit in the register that owns it.
バージョン 0.17 で非推奨: Use
QuantumCircuit.find_bit()
instead.In modern Qiskit Terra (version 0.17+), bits are the fundamental object and registers are aliases to collections of bits. A bit can be in many registers depending on the circuit, so a single containing register is no longer a property of a bit. It is an error to access this attribute on bits that were not constructed as 「owned」 by a register.
- register¶
Get the register of an old-style bit.
バージョン 0.17 で非推奨: Use
QuantumCircuit.find_bit()
instead.In modern Qiskit Terra (version 0.17+), bits are the fundamental object and registers are aliases to collections of bits. A bit can be in many registers depending on the circuit, so a single containing register is no longer a property of a bit. It is an error to access this attribute on bits that were not constructed as 「owned」 by a register.