Skip to main content

QbitRange

Base class: Object

A range of Qbit objects.

Factories​

qbit_range(integer num_sites) -> QbitRange​

Creates a range of Qbit objects with the specified number of sites.

The qbit_range function represents an ordered list of all the possible qubit product state with a number of sites equal to the provided integer. The Qbit objects are ordered according to the integer representation of their states when interpreted as the binary expansion of an integer.

Parameters​

  • num_sites: Number of sites in each qubit product state.

Example​

qbit_range(2) // Returns [(1 + 0i)|00>, (1 + 0i)|10>, (1 + 0i)|01>, (1 + 0i)|11>]