Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.circuit.Qubit

class Qubit(register=None, index=None)

GitHub

Implement a quantum bit.

Creates a qubit.

Parameters

  • register (QuantumRegister) – Optional. A quantum register containing the bit.
  • index (int) – Optional. The index of the bit in its containing register.

Raises

CircuitError – if the provided register is not a valid QuantumRegister

__init__

__init__(register=None, index=None)

Creates a qubit.

Parameters

  • register (QuantumRegister) – Optional. A quantum register containing the bit.
  • index (int) – Optional. The index of the bit in its containing register.

Raises

CircuitError – if the provided register is not a valid QuantumRegister


Methods

__init__([register, index])Creates a qubit.

Attributes

indexGet bit’s index.
registerGet bit’s register.

index

Get bit’s index.

register

Get bit’s register.

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