pygsti.tools.symplectic.int_to_bitstring#
- int_to_bitstring(i, n)#
Converts integer i to an length n array of bits.
Code from “How to efficiently select an arbitrary Clifford group element by Robert Koenig and John A. Smolin.
- Parameters:
i (int) – Any integer.
n (int) – Number of bits
- Returns:
Integer array of 0s and 1s.
- Return type:
numpy.ndarray