RangeAsIntArray function
Warning
This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.
Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.
Namespace: Microsoft.Quantum.Convert
Package: Microsoft.Quantum.Standard
Creates an array arr
of integers enumerated by start..step..end.
function RangeAsIntArray (range : Range) : Int[]
Input
range : Range
A Range
of values start..step..end
to be converted to an array.
Output : Int[]
A new array of integers corresponding to values iterated over by range
.
Example
// The following returns [1,3,5,7];
let array = RangeAsIntArray(1..2..8);
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for