quspin.basis.basis_ones

quspin.basis.basis_ones(shape, dtype=uint32)

Allocates initialized array using the QuSpin basis integers.

QuSpin uses non-standard numpy datatypes which wrap boost multiprecision integers. This function creates an array of integers which are properly initialized to 1.

Parameters:
shape: tuple

shape of the numpy array.

dtype: numpy.dtype, optional

numpy dtype used to create the array, one can use QuSpin defined dtypes here: uint32, uint64, uint256, uint1024, uint4096, or uint16384.

Returns:
numpy.array object

a properly initialized array of type dtype initialized to 1.

Examples

>>> a = basis_ones((100,))