integers_to_bitstrings

qujax.integers_to_bitstrings(integers, nbits=None)

Convert integer or array of integers into their binary expansion(s).

Parameters:
  • integers (int | ndarray) – Integer or array of integers to be converted.

  • nbits (int | None) – Length of output binary expansion. Defaults to smallest possible.

Returns:

Array of binary expansion(s).

Return type:

ndarray