Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Standard/src/Convert/Convert.qs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ namespace Microsoft.Quantum.Convert {
/// An array of boolean values representing `number`.
///
/// # Remarks
/// The input `number` must be at most $2^{\texttt{bits}} - 1$.
/// The input `bits` must be between 0 and 63.
/// The input `number` must be between 0 and $2^{\texttt{bits}} - 1$.
function IntAsBoolArray(number : Int, bits : Int) : Bool[] {
Fact(bits >= 0 and bits <= 63, $"`bits` must be between 0 and 63 {2^bits}");
EqualityFactB(number >= 0 and number < 2 ^ bits, true, $"`number` must be between 0 and 2^`bits` - 1");
mutable outputBits = new Bool[bits];
mutable tempInt = number;
Expand Down