IntAsBoolArray function


This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Convert

Package: Microsoft.Quantum.Standard

Produces a binary representation of a non-negative integer, using the little-endian representation for the returned array.

function IntAsBoolArray (number : Int, bits : Int) : Bool[]


number : Int

A non-negative integer to be converted to an array of boolean values.

bits : Int

The number of bits in the binary representation of number.

Output : Bool[]

An array of boolean values representing number.


The input bits must be between 0 and 63. The input number must be between 0 and $2^{\texttt{bits}} - 1$.