Qubit

class Qubit(register, index)[source]

Implement a quantum bit.

Creates a qubit.

Parameters
  • register (QuantumRegister) – a quantum register.

  • index (int) – the index to insert the qubit

Raises

CircuitError – if the provided register is not a valid QuantumRegister

Attributes

Qubit.index

Get bit’s index.

Qubit.register

Get bit’s register.

Methods