qsharp-lang 1.1.2-dev → 1.1.4-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/katas-content.generated.js +133 -122
- package/dist/language-service/language-service.d.ts +3 -1
- package/dist/language-service/language-service.js +3 -0
- package/dist/language-service/worker-proxy.js +1 -0
- package/docs/Microsoft.Quantum.Arrays/All.md +44 -0
- package/docs/Microsoft.Quantum.Arrays/Any.md +43 -0
- package/docs/Microsoft.Quantum.Arrays/Chunks.md +34 -0
- package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +46 -0
- package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +47 -0
- package/docs/Microsoft.Quantum.Arrays/Count.md +44 -0
- package/docs/Microsoft.Quantum.Arrays/Diagonal.md +43 -0
- package/docs/Microsoft.Quantum.Arrays/DrawMany.md +44 -0
- package/docs/Microsoft.Quantum.Arrays/Enumerated.md +45 -0
- package/docs/Microsoft.Quantum.Arrays/Excluding.md +47 -0
- package/docs/Microsoft.Quantum.Arrays/Filtered.md +44 -0
- package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +46 -0
- package/docs/Microsoft.Quantum.Arrays/Flattened.md +38 -0
- package/docs/Microsoft.Quantum.Arrays/Fold.md +47 -0
- package/docs/Microsoft.Quantum.Arrays/ForEach.md +43 -0
- package/docs/Microsoft.Quantum.Arrays/Head.md +32 -0
- package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +32 -0
- package/docs/Microsoft.Quantum.Arrays/IndexOf.md +40 -0
- package/docs/Microsoft.Quantum.Arrays/IndexRange.md +41 -0
- package/docs/Microsoft.Quantum.Arrays/Interleaved.md +49 -0
- package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +28 -0
- package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +42 -0
- package/docs/Microsoft.Quantum.Arrays/IsSorted.md +43 -0
- package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +42 -0
- package/docs/Microsoft.Quantum.Arrays/Mapped.md +43 -0
- package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +54 -0
- package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +48 -0
- package/docs/Microsoft.Quantum.Arrays/Most.md +34 -0
- package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +32 -0
- package/docs/Microsoft.Quantum.Arrays/Padded.md +50 -0
- package/docs/Microsoft.Quantum.Arrays/Partitioned.md +44 -0
- package/docs/Microsoft.Quantum.Arrays/Rest.md +34 -0
- package/docs/Microsoft.Quantum.Arrays/Reversed.md +34 -0
- package/docs/Microsoft.Quantum.Arrays/SequenceI.md +41 -0
- package/docs/Microsoft.Quantum.Arrays/SequenceL.md +41 -0
- package/docs/Microsoft.Quantum.Arrays/Sorted.md +52 -0
- package/docs/Microsoft.Quantum.Arrays/Subarray.md +51 -0
- package/docs/Microsoft.Quantum.Arrays/Swapped.md +40 -0
- package/docs/Microsoft.Quantum.Arrays/Tail.md +32 -0
- package/docs/Microsoft.Quantum.Arrays/Transposed.md +47 -0
- package/docs/Microsoft.Quantum.Arrays/Unzipped.md +46 -0
- package/docs/Microsoft.Quantum.Arrays/Where.md +36 -0
- package/docs/Microsoft.Quantum.Arrays/Windows.md +47 -0
- package/docs/Microsoft.Quantum.Arrays/Zipped.md +50 -0
- package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +35 -0
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +42 -0
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +41 -0
- package/docs/Microsoft.Quantum.Canon/ApplyP.md +39 -0
- package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +41 -0
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +47 -0
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +45 -0
- package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +34 -0
- package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +38 -0
- package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +43 -0
- package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +43 -0
- package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +43 -0
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +31 -0
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +31 -0
- package/docs/Microsoft.Quantum.Canon/CX.md +50 -0
- package/docs/Microsoft.Quantum.Canon/CY.md +44 -0
- package/docs/Microsoft.Quantum.Canon/CZ.md +44 -0
- package/docs/Microsoft.Quantum.Canon/Fst.md +20 -0
- package/docs/Microsoft.Quantum.Canon/Snd.md +20 -0
- package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +25 -0
- package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +36 -0
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +35 -0
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +25 -0
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +30 -0
- package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +30 -0
- package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +30 -0
- package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +30 -0
- package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +21 -0
- package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +36 -0
- package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +21 -0
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +30 -0
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +34 -0
- package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +30 -0
- package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +32 -0
- package/docs/Microsoft.Quantum.Core/Length.md +28 -0
- package/docs/Microsoft.Quantum.Core/RangeEnd.md +38 -0
- package/docs/Microsoft.Quantum.Core/RangeReverse.md +32 -0
- package/docs/Microsoft.Quantum.Core/RangeStart.md +36 -0
- package/docs/Microsoft.Quantum.Core/RangeStep.md +33 -0
- package/docs/Microsoft.Quantum.Core/Repeated.md +36 -0
- package/docs/Microsoft.Quantum.Diagnostics/CheckAllZero.md +18 -0
- package/docs/Microsoft.Quantum.Diagnostics/CheckOperationsAreEqual.md +47 -0
- package/docs/Microsoft.Quantum.Diagnostics/CheckZero.md +18 -0
- package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +18 -0
- package/docs/Microsoft.Quantum.Diagnostics/Fact.md +20 -0
- package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +35 -0
- package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +47 -0
- package/docs/Microsoft.Quantum.Intrinsic/Exp.md +40 -0
- package/docs/Microsoft.Quantum.Intrinsic/H.md +34 -0
- package/docs/Microsoft.Quantum.Intrinsic/I.md +25 -0
- package/docs/Microsoft.Quantum.Intrinsic/M.md +46 -0
- package/docs/Microsoft.Quantum.Intrinsic/Measure.md +56 -0
- package/docs/Microsoft.Quantum.Intrinsic/Message.md +30 -0
- package/docs/Microsoft.Quantum.Intrinsic/R.md +42 -0
- package/docs/Microsoft.Quantum.Intrinsic/R1.md +41 -0
- package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +57 -0
- package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +58 -0
- package/docs/Microsoft.Quantum.Intrinsic/Reset.md +27 -0
- package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +27 -0
- package/docs/Microsoft.Quantum.Intrinsic/Rx.md +44 -0
- package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +42 -0
- package/docs/Microsoft.Quantum.Intrinsic/Ry.md +44 -0
- package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +42 -0
- package/docs/Microsoft.Quantum.Intrinsic/Rz.md +44 -0
- package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +42 -0
- package/docs/Microsoft.Quantum.Intrinsic/S.md +36 -0
- package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +49 -0
- package/docs/Microsoft.Quantum.Intrinsic/T.md +36 -0
- package/docs/Microsoft.Quantum.Intrinsic/X.md +36 -0
- package/docs/Microsoft.Quantum.Intrinsic/Y.md +36 -0
- package/docs/Microsoft.Quantum.Intrinsic/Z.md +36 -0
- package/docs/Microsoft.Quantum.Logical/Xor.md +38 -0
- package/docs/Microsoft.Quantum.Math/AbsComplex.md +30 -0
- package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +30 -0
- package/docs/Microsoft.Quantum.Math/AbsD.md +21 -0
- package/docs/Microsoft.Quantum.Math/AbsI.md +21 -0
- package/docs/Microsoft.Quantum.Math/AbsL.md +20 -0
- package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +30 -0
- package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +30 -0
- package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +40 -0
- package/docs/Microsoft.Quantum.Math/ArcCos.md +21 -0
- package/docs/Microsoft.Quantum.Math/ArcCosh.md +21 -0
- package/docs/Microsoft.Quantum.Math/ArcSin.md +21 -0
- package/docs/Microsoft.Quantum.Math/ArcSinh.md +21 -0
- package/docs/Microsoft.Quantum.Math/ArcTan.md +21 -0
- package/docs/Microsoft.Quantum.Math/ArcTan2.md +21 -0
- package/docs/Microsoft.Quantum.Math/ArcTanh.md +21 -0
- package/docs/Microsoft.Quantum.Math/ArgComplex.md +30 -0
- package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +28 -0
- package/docs/Microsoft.Quantum.Math/Binom.md +34 -0
- package/docs/Microsoft.Quantum.Math/BitSizeI.md +23 -0
- package/docs/Microsoft.Quantum.Math/BitSizeL.md +23 -0
- package/docs/Microsoft.Quantum.Math/Ceiling.md +23 -0
- package/docs/Microsoft.Quantum.Math/Complex.md +31 -0
- package/docs/Microsoft.Quantum.Math/ComplexPolar.md +29 -0
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +25 -0
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +25 -0
- package/docs/Microsoft.Quantum.Math/Cos.md +21 -0
- package/docs/Microsoft.Quantum.Math/Cosh.md +21 -0
- package/docs/Microsoft.Quantum.Math/DivRemI.md +21 -0
- package/docs/Microsoft.Quantum.Math/DivRemL.md +21 -0
- package/docs/Microsoft.Quantum.Math/DividedByC.md +30 -0
- package/docs/Microsoft.Quantum.Math/DividedByCP.md +30 -0
- package/docs/Microsoft.Quantum.Math/E.md +28 -0
- package/docs/Microsoft.Quantum.Math/ExpModI.md +23 -0
- package/docs/Microsoft.Quantum.Math/ExpModL.md +23 -0
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +23 -0
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +23 -0
- package/docs/Microsoft.Quantum.Math/FactorialI.md +38 -0
- package/docs/Microsoft.Quantum.Math/FactorialL.md +32 -0
- package/docs/Microsoft.Quantum.Math/Floor.md +23 -0
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +23 -0
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +23 -0
- package/docs/Microsoft.Quantum.Math/HammingWeightI.md +21 -0
- package/docs/Microsoft.Quantum.Math/InverseModI.md +25 -0
- package/docs/Microsoft.Quantum.Math/InverseModL.md +25 -0
- package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +34 -0
- package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +34 -0
- package/docs/Microsoft.Quantum.Math/IsInfinite.md +49 -0
- package/docs/Microsoft.Quantum.Math/IsNaN.md +30 -0
- package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +31 -0
- package/docs/Microsoft.Quantum.Math/Lg.md +21 -0
- package/docs/Microsoft.Quantum.Math/Log.md +21 -0
- package/docs/Microsoft.Quantum.Math/Log10.md +21 -0
- package/docs/Microsoft.Quantum.Math/LogFactorialD.md +35 -0
- package/docs/Microsoft.Quantum.Math/LogGammaD.md +39 -0
- package/docs/Microsoft.Quantum.Math/LogOf2.md +24 -0
- package/docs/Microsoft.Quantum.Math/Max.md +28 -0
- package/docs/Microsoft.Quantum.Math/MaxD.md +21 -0
- package/docs/Microsoft.Quantum.Math/MaxI.md +21 -0
- package/docs/Microsoft.Quantum.Math/MaxL.md +21 -0
- package/docs/Microsoft.Quantum.Math/Min.md +28 -0
- package/docs/Microsoft.Quantum.Math/MinD.md +21 -0
- package/docs/Microsoft.Quantum.Math/MinI.md +21 -0
- package/docs/Microsoft.Quantum.Math/MinL.md +21 -0
- package/docs/Microsoft.Quantum.Math/MinusC.md +30 -0
- package/docs/Microsoft.Quantum.Math/MinusCP.md +30 -0
- package/docs/Microsoft.Quantum.Math/ModulusI.md +23 -0
- package/docs/Microsoft.Quantum.Math/ModulusL.md +23 -0
- package/docs/Microsoft.Quantum.Math/NegationC.md +28 -0
- package/docs/Microsoft.Quantum.Math/NegationCP.md +28 -0
- package/docs/Microsoft.Quantum.Math/PI.md +28 -0
- package/docs/Microsoft.Quantum.Math/PNorm.md +34 -0
- package/docs/Microsoft.Quantum.Math/PNormalized.md +39 -0
- package/docs/Microsoft.Quantum.Math/PlusC.md +30 -0
- package/docs/Microsoft.Quantum.Math/PlusCP.md +30 -0
- package/docs/Microsoft.Quantum.Math/PowC.md +32 -0
- package/docs/Microsoft.Quantum.Math/PowCP.md +32 -0
- package/docs/Microsoft.Quantum.Math/RealMod.md +38 -0
- package/docs/Microsoft.Quantum.Math/Round.md +23 -0
- package/docs/Microsoft.Quantum.Math/SignD.md +21 -0
- package/docs/Microsoft.Quantum.Math/SignI.md +21 -0
- package/docs/Microsoft.Quantum.Math/SignL.md +21 -0
- package/docs/Microsoft.Quantum.Math/Sin.md +21 -0
- package/docs/Microsoft.Quantum.Math/Sinh.md +21 -0
- package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +30 -0
- package/docs/Microsoft.Quantum.Math/Sqrt.md +21 -0
- package/docs/Microsoft.Quantum.Math/SquaredNorm.md +32 -0
- package/docs/Microsoft.Quantum.Math/Tan.md +21 -0
- package/docs/Microsoft.Quantum.Math/Tanh.md +21 -0
- package/docs/Microsoft.Quantum.Math/TimesC.md +30 -0
- package/docs/Microsoft.Quantum.Math/TimesCP.md +30 -0
- package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +23 -0
- package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +23 -0
- package/docs/Microsoft.Quantum.Math/Truncate.md +23 -0
- package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +28 -0
- package/docs/Microsoft.Quantum.Measurement/MResetX.md +37 -0
- package/docs/Microsoft.Quantum.Measurement/MResetY.md +37 -0
- package/docs/Microsoft.Quantum.Measurement/MResetZ.md +37 -0
- package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +36 -0
- package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +30 -0
- package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +36 -0
- package/docs/Microsoft.Quantum.Random/DrawRandomDouble.md +40 -0
- package/docs/Microsoft.Quantum.Random/DrawRandomInt.md +40 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +35 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +39 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +36 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +25 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +25 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +32 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +29 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +25 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +25 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +25 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +25 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +25 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +32 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +27 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +27 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +27 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +27 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +36 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +27 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +36 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +34 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +37 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +34 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +34 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +35 -0
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +68 -0
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +65 -0
- package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +53 -0
- package/docs/toc.yml +305 -0
- package/lib/node/qsc_wasm.cjs +40 -13
- package/lib/node/qsc_wasm.d.cts +15 -0
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +17 -0
- package/lib/web/qsc_wasm.js +38 -11
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +4 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.BigIntAsBoolArray
|
|
3
|
+
title: BigIntAsBoolArray function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: BigIntAsBoolArray
|
|
9
|
+
qsharp.summary: Produces a binary representation of a non-negative BigInt, using the
|
|
10
|
+
little-endian representation for the returned array.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# BigIntAsBoolArray function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function BigIntAsBoolArray(number : BigInt, bits : Int) : Bool[]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Produces a binary representation of a non-negative BigInt, using the
|
|
23
|
+
little-endian representation for the returned array.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### number
|
|
27
|
+
A non-negative BigInt to be converted to an array of Boolean values.
|
|
28
|
+
### bits
|
|
29
|
+
The number of bits in the binary representation of `number`.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
An array of Boolean values representing `number`.
|
|
33
|
+
|
|
34
|
+
## Remarks
|
|
35
|
+
The input `bits` must be non-negative.
|
|
36
|
+
The input `number` must be between 0 and 2^bits - 1.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.BoolArrayAsBigInt
|
|
3
|
+
title: BoolArrayAsBigInt function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: BoolArrayAsBigInt
|
|
9
|
+
qsharp.summary: Converts an array of Boolean values into a non-negative BigInt, interpreting the
|
|
10
|
+
array as a binary representation in little-endian format.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# BoolArrayAsBigInt function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function BoolArrayAsBigInt(boolArray : Bool[]) : BigInt
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Converts an array of Boolean values into a non-negative BigInt, interpreting the
|
|
23
|
+
array as a binary representation in little-endian format.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### boolArray
|
|
27
|
+
An array of Boolean values representing the binary digits of a BigInt.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
A BigInt represented by `boolArray`.
|
|
31
|
+
|
|
32
|
+
## Remarks
|
|
33
|
+
The function interprets the array in little-endian format, where the first
|
|
34
|
+
element of the array represents the least significant bit.
|
|
35
|
+
The input `boolArray` should not be empty.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.BoolArrayAsInt
|
|
3
|
+
title: BoolArrayAsInt function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: BoolArrayAsInt
|
|
9
|
+
qsharp.summary: Produces a non-negative integer from a string of bits in little endian format.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# BoolArrayAsInt function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function BoolArrayAsInt(bits : Bool[]) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Produces a non-negative integer from a string of bits in little endian format.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### bits
|
|
25
|
+
Bits in binary representation of number.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.BoolArrayAsResultArray
|
|
3
|
+
title: BoolArrayAsResultArray function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: BoolArrayAsResultArray
|
|
9
|
+
qsharp.summary: Converts a `Bool[]` type to a `Result[]` type, where `true`
|
|
10
|
+
is mapped to `One` and `false` is mapped to `Zero`.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# BoolArrayAsResultArray function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function BoolArrayAsResultArray(input : Bool[]) : Result[]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Converts a `Bool[]` type to a `Result[]` type, where `true`
|
|
23
|
+
is mapped to `One` and `false` is mapped to `Zero`.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### input
|
|
27
|
+
`Bool[]` to be converted.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
A `Result[]` representing the `input`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.BoolAsResult
|
|
3
|
+
title: BoolAsResult function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: BoolAsResult
|
|
9
|
+
qsharp.summary: Converts a `Bool` type to a `Result` type, where `true` is mapped to
|
|
10
|
+
`One` and `false` is mapped to `Zero`.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# BoolAsResult function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function BoolAsResult(input : Bool) : Result
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Converts a `Bool` type to a `Result` type, where `true` is mapped to
|
|
23
|
+
`One` and `false` is mapped to `Zero`.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### input
|
|
27
|
+
`Bool` to be converted.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
A `Result` representing the `input`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.ComplexAsComplexPolar
|
|
3
|
+
title: ComplexAsComplexPolar function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: ComplexAsComplexPolar
|
|
9
|
+
qsharp.summary: Converts a complex number of type `Complex` to a complex
|
|
10
|
+
number of type `ComplexPolar`.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ComplexAsComplexPolar function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function ComplexAsComplexPolar(input : Complex) : ComplexPolar
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Converts a complex number of type `Complex` to a complex
|
|
23
|
+
number of type `ComplexPolar`.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### input
|
|
27
|
+
Complex number c = x + y𝑖.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
Complex number c = r⋅e^(t𝑖).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.ComplexPolarAsComplex
|
|
3
|
+
title: ComplexPolarAsComplex function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: ComplexPolarAsComplex
|
|
9
|
+
qsharp.summary: Converts a complex number of type `ComplexPolar` to a complex
|
|
10
|
+
number of type `Complex`.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ComplexPolarAsComplex function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function ComplexPolarAsComplex(input : ComplexPolar) : Complex
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Converts a complex number of type `ComplexPolar` to a complex
|
|
23
|
+
number of type `Complex`.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### input
|
|
27
|
+
Complex number c = r⋅e^(t𝑖).
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
Complex number c = x + y𝑖.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.IntAsBigInt
|
|
3
|
+
title: IntAsBigInt function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: IntAsBigInt
|
|
9
|
+
qsharp.summary: Converts a given integer to an equivalent big integer.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# IntAsBigInt function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function IntAsBigInt(number : Int) : BigInt
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Converts a given integer to an equivalent big integer.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.IntAsBoolArray
|
|
3
|
+
title: IntAsBoolArray function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: IntAsBoolArray
|
|
9
|
+
qsharp.summary: Produces a binary representation of a non-negative integer, using the
|
|
10
|
+
little-endian representation for the returned array.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# IntAsBoolArray function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function IntAsBoolArray(number : Int, bits : Int) : Bool[]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Produces a binary representation of a non-negative integer, using the
|
|
23
|
+
little-endian representation for the returned array.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### number
|
|
27
|
+
A non-negative integer to be converted to an array of Boolean values.
|
|
28
|
+
### bits
|
|
29
|
+
The number of bits in the binary representation of `number`.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
An array of Boolean values representing `number`.
|
|
33
|
+
|
|
34
|
+
## Remarks
|
|
35
|
+
The input `bits` must be non-negative.
|
|
36
|
+
The input `number` must be between 0 and 2^bits - 1.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.IntAsDouble
|
|
3
|
+
title: IntAsDouble function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: IntAsDouble
|
|
9
|
+
qsharp.summary: Converts a given integer to an equivalent double-precision floating-point number.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# IntAsDouble function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function IntAsDouble(number : Int) : Double
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Converts a given integer to an equivalent double-precision floating-point number.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.ResultArrayAsBoolArray
|
|
3
|
+
title: ResultArrayAsBoolArray function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: ResultArrayAsBoolArray
|
|
9
|
+
qsharp.summary: Converts a `Result[]` type to a `Bool[]` type, where `One`
|
|
10
|
+
is mapped to `true` and `Zero` is mapped to `false`.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ResultArrayAsBoolArray function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function ResultArrayAsBoolArray(input : Result[]) : Bool[]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Converts a `Result[]` type to a `Bool[]` type, where `One`
|
|
23
|
+
is mapped to `true` and `Zero` is mapped to `false`.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### input
|
|
27
|
+
`Result[]` to be converted.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
A `Bool[]` representing the `input`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.ResultArrayAsInt
|
|
3
|
+
title: ResultArrayAsInt function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: ResultArrayAsInt
|
|
9
|
+
qsharp.summary: Produces a non-negative integer from a string of Results in little-endian format.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ResultArrayAsInt function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ResultArrayAsInt(results : Result[]) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Produces a non-negative integer from a string of Results in little-endian format.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### results
|
|
25
|
+
Results in binary representation of number.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
A non-negative integer
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
```qsharp
|
|
32
|
+
// The following returns 1
|
|
33
|
+
let int1 = ResultArrayAsInt([One,Zero])
|
|
34
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Convert.ResultAsBool
|
|
3
|
+
title: ResultAsBool function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Convert
|
|
8
|
+
qsharp.name: ResultAsBool
|
|
9
|
+
qsharp.summary: Converts a `Result` type to a `Bool` type, where `One` is mapped to
|
|
10
|
+
`true` and `Zero` is mapped to `false`.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ResultAsBool function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function ResultAsBool(input : Result) : Bool
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Converts a `Result` type to a `Bool` type, where `One` is mapped to
|
|
23
|
+
`true` and `Zero` is mapped to `false`.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### input
|
|
27
|
+
`Result` to be converted.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
A `Bool` representing the `input`.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Core.IsRangeEmpty
|
|
3
|
+
title: IsRangeEmpty function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Core
|
|
8
|
+
qsharp.name: IsRangeEmpty
|
|
9
|
+
qsharp.summary: Returns true if and only if the input range is empty.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# IsRangeEmpty function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function IsRangeEmpty(rng : Range) : Bool
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns true if and only if the input range is empty.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### rng
|
|
25
|
+
Any range
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
True, if and only if `rng` is empty
|
|
29
|
+
|
|
30
|
+
## Remark
|
|
31
|
+
This function needs to check at most one range index
|
|
32
|
+
to determine whether the range is empty.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Core.Length
|
|
3
|
+
title: Length function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Core
|
|
8
|
+
qsharp.name: Length
|
|
9
|
+
qsharp.summary: Returns the number of elements in an array.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Length function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function Length<'T>(a : 'T[]) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the number of elements in an array.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### a
|
|
25
|
+
Input array.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
The total count of elements in an array.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Core.RangeEnd
|
|
3
|
+
title: RangeEnd function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Core
|
|
8
|
+
qsharp.name: RangeEnd
|
|
9
|
+
qsharp.summary: Returns the defined end value of the given range,
|
|
10
|
+
which is not necessarily the last element in the sequence.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# RangeEnd function
|
|
14
|
+
|
|
15
|
+
Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core)
|
|
16
|
+
|
|
17
|
+
```qsharp
|
|
18
|
+
function RangeEnd(r : Range) : Int
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
Returns the defined end value of the given range,
|
|
23
|
+
which is not necessarily the last element in the sequence.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
### r
|
|
27
|
+
Input range.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
The defined end value of the given range.
|
|
31
|
+
|
|
32
|
+
## Remarks
|
|
33
|
+
A range expression's first element is `start`,
|
|
34
|
+
its second element is `start+step`, third element is `start+step+step`, etc.,
|
|
35
|
+
until `end` is passed.
|
|
36
|
+
|
|
37
|
+
Note that the defined end value of a range can differ from the last element in the sequence specified by the range;
|
|
38
|
+
for example, in a range 0 .. 2 .. 5 the last element is 4 but the end value is 5.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Core.RangeReverse
|
|
3
|
+
title: RangeReverse function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Core
|
|
8
|
+
qsharp.name: RangeReverse
|
|
9
|
+
qsharp.summary: Returns a new range which is the reverse of the input range.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# RangeReverse function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function RangeReverse(r : Range) : Range
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns a new range which is the reverse of the input range.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### r
|
|
25
|
+
Input range.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
A new range that is the reverse of the given range.
|
|
29
|
+
|
|
30
|
+
## Remarks
|
|
31
|
+
Note that the reverse of a range is not simply `end`..`-step`..`start`, because
|
|
32
|
+
the actual last element of a range may not be the same as `end`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Core.RangeStart
|
|
3
|
+
title: RangeStart function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Core
|
|
8
|
+
qsharp.name: RangeStart
|
|
9
|
+
qsharp.summary: Returns the defined start value of the given range.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# RangeStart function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function RangeStart(r : Range) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the defined start value of the given range.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### r
|
|
25
|
+
Input range.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
The defined start value of the given range.
|
|
29
|
+
|
|
30
|
+
## Remarks
|
|
31
|
+
A range expression's first element is `start`,
|
|
32
|
+
its second element is `start+step`, third element is `start+step+step`, etc.,
|
|
33
|
+
until `end` is passed.
|
|
34
|
+
|
|
35
|
+
Note that the defined start value of a range is the same as the first element of the sequence,
|
|
36
|
+
unless the range specifies an empty sequence (for example, 2 .. 1).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Core.RangeStep
|
|
3
|
+
title: RangeStep function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Core
|
|
8
|
+
qsharp.name: RangeStep
|
|
9
|
+
qsharp.summary: Returns the integer that specifies how the next value of a range is calculated.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# RangeStep function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function RangeStep(r : Range) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the integer that specifies how the next value of a range is calculated.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### r
|
|
25
|
+
Input range.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
The defined step value of the given range.
|
|
29
|
+
|
|
30
|
+
## Remarks
|
|
31
|
+
A range expression's first element is `start`,
|
|
32
|
+
its second element is `start+step`, third element is `start+step+step`, etc.,
|
|
33
|
+
until `end` is passed.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Core.Repeated
|
|
3
|
+
title: Repeated function
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Core
|
|
8
|
+
qsharp.name: Repeated
|
|
9
|
+
qsharp.summary: Creates an array of given length with all elements equal to given value.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Repeated function
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function Repeated<'T>(value : 'T, length : Int) : 'T[]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Creates an array of given length with all elements equal to given value.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### value
|
|
25
|
+
The value of each element of the new array.
|
|
26
|
+
### length
|
|
27
|
+
Length of the new array.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
A new array of length `length`, such that every element is `value`.
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
The following code creates an array of 3 Boolean values, each equal to `true`:
|
|
34
|
+
```qsharp
|
|
35
|
+
let array = Repeated(true, 3);
|
|
36
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Microsoft.Quantum.Diagnostics.CheckAllZero
|
|
3
|
+
title: CheckAllZero operation
|
|
4
|
+
ms.date: 02/16/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: opeartion
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Diagnostics
|
|
8
|
+
qsharp.name: CheckAllZero
|
|
9
|
+
qsharp.summary:
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# CheckAllZero operation
|
|
13
|
+
|
|
14
|
+
Namespace: [Microsoft.Quantum.Diagnostics](xref:Microsoft.Quantum.Diagnostics)
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
operation CheckAllZero(qubits : Qubit[]) : Bool
|
|
18
|
+
```
|