braket.circuits.qubit module

class braket.circuits.qubit.Qubit[source]

Bases: int

A quantum bit index. The index of this qubit is locally scoped towards the contained circuit. This may not be the exact qubit index on the quantum device.

Parameters

index (int) – Index of the qubit.

Raises

ValueError – If index is less than zero.

Examples

>>> Qubit(0)
>>> Qubit(1)
static new(qubit: Union[Qubit, int])braket.circuits.qubit.Qubit[source]

Helper constructor - if input is a Qubit it returns the same value, else a new Qubit is constructed.

Parameters

qubit (int or Qubit) – Qubit index. If type == Qubit then the qubit is returned.