qsharp-lang 1.1.3 → 1.1.5-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/browser.d.ts +3 -3
- package/dist/browser.js +12 -58
- package/dist/compiler/compiler.d.ts +4 -2
- package/dist/compiler/compiler.js +14 -1
- package/dist/compiler/events.d.ts +1 -1
- package/dist/compiler/worker-browser.d.ts +1 -1
- package/dist/compiler/worker-browser.js +3 -40
- package/dist/compiler/worker-node.js +3 -39
- package/dist/debug-service/debug-service.d.ts +5 -3
- package/dist/debug-service/debug-service.js +18 -1
- package/dist/debug-service/worker-browser.d.ts +1 -1
- package/dist/debug-service/worker-browser.js +3 -29
- package/dist/debug-service/worker-node.js +3 -28
- package/dist/katas-content.generated.js +419 -408
- package/dist/language-service/language-service.d.ts +10 -2
- package/dist/language-service/language-service.js +30 -0
- package/dist/language-service/worker-browser.d.ts +1 -1
- package/dist/language-service/worker-browser.js +3 -29
- package/dist/language-service/worker-node.js +3 -28
- package/dist/main.d.ts +2 -2
- package/dist/main.js +7 -42
- package/dist/samples.generated.js +1 -1
- package/dist/workers/browser.d.ts +21 -0
- package/dist/workers/browser.js +67 -0
- package/dist/{worker-proxy.d.ts → workers/common.d.ts} +26 -9
- package/dist/{worker-proxy.js → workers/common.js} +33 -4
- package/dist/workers/node.d.ts +20 -0
- package/dist/workers/node.js +55 -0
- package/docs/Microsoft.Quantum.Arrays/All.md +42 -0
- package/docs/Microsoft.Quantum.Arrays/Any.md +41 -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 +42 -0
- package/docs/Microsoft.Quantum.Arrays/Diagonal.md +43 -0
- package/docs/Microsoft.Quantum.Arrays/DrawMany.md +43 -0
- package/docs/Microsoft.Quantum.Arrays/Enumerated.md +44 -0
- package/docs/Microsoft.Quantum.Arrays/Excluding.md +46 -0
- package/docs/Microsoft.Quantum.Arrays/Filtered.md +42 -0
- package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +45 -0
- package/docs/Microsoft.Quantum.Arrays/Flattened.md +38 -0
- package/docs/Microsoft.Quantum.Arrays/Fold.md +46 -0
- package/docs/Microsoft.Quantum.Arrays/ForEach.md +41 -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 +39 -0
- package/docs/Microsoft.Quantum.Arrays/IndexRange.md +40 -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 +42 -0
- package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +42 -0
- package/docs/Microsoft.Quantum.Arrays/Mapped.md +41 -0
- package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +52 -0
- package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +46 -0
- package/docs/Microsoft.Quantum.Arrays/Most.md +33 -0
- package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +32 -0
- package/docs/Microsoft.Quantum.Arrays/Padded.md +49 -0
- package/docs/Microsoft.Quantum.Arrays/Partitioned.md +44 -0
- package/docs/Microsoft.Quantum.Arrays/Rest.md +33 -0
- package/docs/Microsoft.Quantum.Arrays/Reversed.md +33 -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 +51 -0
- package/docs/Microsoft.Quantum.Arrays/Subarray.md +49 -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 +46 -0
- package/docs/Microsoft.Quantum.Arrays/Unzipped.md +45 -0
- package/docs/Microsoft.Quantum.Arrays/Where.md +35 -0
- package/docs/Microsoft.Quantum.Arrays/Windows.md +47 -0
- package/docs/Microsoft.Quantum.Arrays/Zipped.md +49 -0
- package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +35 -0
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +41 -0
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +40 -0
- package/docs/Microsoft.Quantum.Canon/ApplyP.md +38 -0
- package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +40 -0
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +46 -0
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +44 -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 +42 -0
- package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +42 -0
- package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +42 -0
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +30 -0
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +30 -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 +35 -0
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +34 -0
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +25 -0
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +29 -0
- package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +29 -0
- package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +29 -0
- package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +29 -0
- package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +21 -0
- package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +35 -0
- package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +21 -0
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +29 -0
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +34 -0
- package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +29 -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 +37 -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 +45 -0
- package/docs/Microsoft.Quantum.Intrinsic/Measure.md +55 -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 +51 -0
- package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +53 -0
- package/docs/Microsoft.Quantum.Intrinsic/Reset.md +26 -0
- package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +26 -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 +29 -0
- package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +29 -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 +29 -0
- package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +29 -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 +29 -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 +22 -0
- package/docs/Microsoft.Quantum.Math/BitSizeL.md +22 -0
- package/docs/Microsoft.Quantum.Math/Ceiling.md +22 -0
- package/docs/Microsoft.Quantum.Math/Complex.md +29 -0
- package/docs/Microsoft.Quantum.Math/ComplexPolar.md +28 -0
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +23 -0
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +23 -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 +22 -0
- package/docs/Microsoft.Quantum.Math/ExpModL.md +22 -0
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +22 -0
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +22 -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 +22 -0
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +22 -0
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +22 -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 +48 -0
- package/docs/Microsoft.Quantum.Math/IsNaN.md +29 -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 +34 -0
- package/docs/Microsoft.Quantum.Math/LogGammaD.md +38 -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 +22 -0
- package/docs/Microsoft.Quantum.Math/ModulusL.md +22 -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 +31 -0
- package/docs/Microsoft.Quantum.Math/PNormalized.md +35 -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 +31 -0
- package/docs/Microsoft.Quantum.Math/PowCP.md +31 -0
- package/docs/Microsoft.Quantum.Math/RealMod.md +38 -0
- package/docs/Microsoft.Quantum.Math/Round.md +22 -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 +22 -0
- package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +22 -0
- package/docs/Microsoft.Quantum.Math/Truncate.md +22 -0
- package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +27 -0
- package/docs/Microsoft.Quantum.Measurement/MResetX.md +35 -0
- package/docs/Microsoft.Quantum.Measurement/MResetY.md +35 -0
- package/docs/Microsoft.Quantum.Measurement/MResetZ.md +35 -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 +34 -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 +33 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +37 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +31 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +23 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +29 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +22 -0
- package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +22 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +28 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +22 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +22 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +22 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +22 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +22 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +23 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +31 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +27 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +26 -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 +26 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +35 -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 +33 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +33 -0
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +35 -0
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +66 -0
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +64 -0
- package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +53 -0
- package/docs/toc.yml +307 -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
- package/dist/compiler/worker-proxy.d.ts +0 -7
- package/dist/compiler/worker-proxy.js +0 -18
- package/dist/debug-service/worker-proxy.d.ts +0 -7
- package/dist/debug-service/worker-proxy.js +0 -22
- package/dist/language-service/worker-proxy.d.ts +0 -6
- package/dist/language-service/worker-proxy.js +0 -27
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ArgComplex
|
|
3
|
+
title: ArgComplex function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ArgComplex
|
|
9
|
+
qsharp.summary: Returns the phase of a complex number of type `Complex`.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ArgComplex function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ArgComplex(input : Complex) : Double
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the phase of a complex number of type
|
|
22
|
+
`Complex`.
|
|
23
|
+
|
|
24
|
+
## Input
|
|
25
|
+
### input
|
|
26
|
+
Complex number c = x + y𝑖.
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
Phase Arg(c) = ArcTan(y,x) ∈ (-𝜋,𝜋].
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ArgComplexPolar
|
|
3
|
+
title: ArgComplexPolar function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ArgComplexPolar
|
|
9
|
+
qsharp.summary: Returns the phase of a complex number of type `ComplexPolar`.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ArgComplexPolar function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ArgComplexPolar(input : ComplexPolar) : Double
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the phase of a complex number of type `ComplexPolar`.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### input
|
|
25
|
+
Complex number c = r⋅𝑒^(t𝑖).
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
Phase Arg(c) = t.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.Binom
|
|
3
|
+
title: Binom function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: Binom
|
|
9
|
+
qsharp.summary: Returns the approximate binomial coefficient of two integers.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Binom function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function Binom(n : Int, k : Int) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the approximate binomial coefficient of two integers.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
Given two integers n and k, returns the binomial coefficient
|
|
25
|
+
binom(n, k), also known as n-choose-k. Computed approximately.
|
|
26
|
+
|
|
27
|
+
## Input
|
|
28
|
+
### n
|
|
29
|
+
The first of the two integers to compute the binomial coefficient of.
|
|
30
|
+
### k
|
|
31
|
+
The second of the two integers to compute the binomial coefficient of.
|
|
32
|
+
|
|
33
|
+
## Output
|
|
34
|
+
The binomial coefficient n-choose-k.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.BitSizeI
|
|
3
|
+
title: BitSizeI function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: BitSizeI
|
|
9
|
+
qsharp.summary: For a non-negative integer `a`, returns the number of bits required to represent `a`. NOTE: This function returns the smallest n such that a < 2^n.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# BitSizeI function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function BitSizeI(a : Int) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
For a non-negative integer `a`, returns the number of bits required to represent `a`.
|
|
22
|
+
NOTE: This function returns the smallest n such that a < 2^n.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.BitSizeL
|
|
3
|
+
title: BitSizeL function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: BitSizeL
|
|
9
|
+
qsharp.summary: For a non-negative integer `a`, returns the number of bits required to represent `a`. NOTE: This function returns the smallest n such that a < 2^n.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# BitSizeL function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function BitSizeL(a : BigInt) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
For a non-negative integer `a`, returns the number of bits required to represent `a`.
|
|
22
|
+
NOTE: This function returns the smallest n such that a < 2^n.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.Ceiling
|
|
3
|
+
title: Ceiling function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: Ceiling
|
|
9
|
+
qsharp.summary: Returns the smallest integer greater than or equal to the specified number. For example: Ceiling(3.1) = 4; Ceiling(-3.7) = -3
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Ceiling function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function Ceiling(value : Double) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the smallest integer greater than or equal to the specified number.
|
|
22
|
+
For example: Ceiling(3.1) = 4; Ceiling(-3.7) = -3
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.Complex
|
|
3
|
+
title: Complex user defined type
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: udt
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: Complex
|
|
9
|
+
qsharp.summary: Represents a complex number by its real and imaginary components. The first element of the tuple is the real component, the second one - the imaginary component.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Complex user defined type
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
newtype Complex = (Real: Double, Imag: Double)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Represents a complex number by its real and imaginary components.
|
|
22
|
+
The first element of the tuple is the real component,
|
|
23
|
+
the second one - the imaginary component.
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
The following snippet defines the imaginary unit 𝑖 = 0 + 1𝑖:
|
|
27
|
+
```qsharp
|
|
28
|
+
let imagUnit = Complex(0.0, 1.0);
|
|
29
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ComplexPolar
|
|
3
|
+
title: ComplexPolar user defined type
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: udt
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ComplexPolar
|
|
9
|
+
qsharp.summary: Represents a complex number in polar form. The polar representation of a complex number is c = r⋅𝑒^(t𝑖).
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ComplexPolar user defined type
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
newtype ComplexPolar = (Magnitude: Double, Argument: Double)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Represents a complex number in polar form.
|
|
22
|
+
The polar representation of a complex number is c = r⋅𝑒^(t𝑖).
|
|
23
|
+
|
|
24
|
+
## Named Items
|
|
25
|
+
### Magnitude
|
|
26
|
+
The absolute value r>0 of c.
|
|
27
|
+
### Argument
|
|
28
|
+
The phase t ∈ ℝ of c.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ContinuedFractionConvergentI
|
|
3
|
+
title: ContinuedFractionConvergentI function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ContinuedFractionConvergentI
|
|
9
|
+
qsharp.summary: Finds the continued fraction convergent closest to `fraction` with the denominator less or equal to `denominatorBound` Using process similar to this: https://nrich.maths.org/1397
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ContinuedFractionConvergentI function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ContinuedFractionConvergentI(fraction : (Int, Int), denominatorBound : Int) : (Int, Int)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Finds the continued fraction convergent closest to `fraction`
|
|
22
|
+
with the denominator less or equal to `denominatorBound`
|
|
23
|
+
Using process similar to this: https://nrich.maths.org/1397
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ContinuedFractionConvergentL
|
|
3
|
+
title: ContinuedFractionConvergentL function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ContinuedFractionConvergentL
|
|
9
|
+
qsharp.summary: Finds the continued fraction convergent closest to `fraction` with the denominator less or equal to `denominatorBound` Using process similar to this: https://nrich.maths.org/1397
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ContinuedFractionConvergentL function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ContinuedFractionConvergentL(fraction : (BigInt, BigInt), denominatorBound : BigInt) : (BigInt, BigInt)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Finds the continued fraction convergent closest to `fraction`
|
|
22
|
+
with the denominator less or equal to `denominatorBound`
|
|
23
|
+
Using process similar to this: https://nrich.maths.org/1397
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.Cos
|
|
3
|
+
title: Cos function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: Cos
|
|
9
|
+
qsharp.summary: Returns the cosine of the specified angle.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Cos function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function Cos(theta : Double) : Double
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the cosine of the specified angle.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.Cosh
|
|
3
|
+
title: Cosh function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: Cosh
|
|
9
|
+
qsharp.summary: Returns the hyperbolic cosine of the specified angle.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Cosh function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function Cosh(d : Double) : Double
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the hyperbolic cosine of the specified angle.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.DivRemI
|
|
3
|
+
title: DivRemI function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: DivRemI
|
|
9
|
+
qsharp.summary: Divides one Integer value by another, returns the result and the remainder as a tuple.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# DivRemI function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function DivRemI(dividend : Int, divisor : Int) : (Int, Int)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Divides one Integer value by another, returns the result and the remainder as a tuple.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.DivRemL
|
|
3
|
+
title: DivRemL function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: DivRemL
|
|
9
|
+
qsharp.summary: Divides one BigInteger value by another, returns the result and the remainder as a tuple.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# DivRemL function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function DivRemL(dividend : BigInt, divisor : BigInt) : (BigInt, BigInt)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Divides one BigInteger value by another, returns the result and the remainder as a tuple.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.DividedByC
|
|
3
|
+
title: DividedByC function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: DividedByC
|
|
9
|
+
qsharp.summary: Returns the quotient of two inputs of type `Complex`.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# DividedByC function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function DividedByC(a : Complex, b : Complex) : Complex
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the quotient of two inputs of type `Complex`.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### a
|
|
25
|
+
The first input a to be divided.
|
|
26
|
+
### b
|
|
27
|
+
The second input b to be divided.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
The quotient a / b.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.DividedByCP
|
|
3
|
+
title: DividedByCP function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: DividedByCP
|
|
9
|
+
qsharp.summary: Returns the quotient of two inputs of type `ComplexPolar`.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# DividedByCP function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function DividedByCP(a : ComplexPolar, b : ComplexPolar) : ComplexPolar
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the quotient of two inputs of type `ComplexPolar`.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### a
|
|
25
|
+
The first input a to be divided.
|
|
26
|
+
### b
|
|
27
|
+
The second input b to be divided.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
The quotient a / b.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.E
|
|
3
|
+
title: E function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: E
|
|
9
|
+
qsharp.summary: Returns the natural logarithmic base to double-precision.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# E function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function E() : Double
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the natural logarithmic base to double-precision.
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
A double-precision approximation of the natural logarithmic base,
|
|
25
|
+
e ≈ 2.7182818284590452354.
|
|
26
|
+
|
|
27
|
+
## See Also
|
|
28
|
+
- Microsoft.Quantum.Math.PI
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ExpModI
|
|
3
|
+
title: ExpModI function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ExpModI
|
|
9
|
+
qsharp.summary: Returns an integer raised to a given power, with respect to a given modulus. I.e. (expBase^power) % modulus.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ExpModI function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ExpModI(expBase : Int, power : Int, modulus : Int) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns an integer raised to a given power, with respect to a given
|
|
22
|
+
modulus. I.e. (expBase^power) % modulus.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ExpModL
|
|
3
|
+
title: ExpModL function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ExpModL
|
|
9
|
+
qsharp.summary: Returns an integer raised to a given power, with respect to a given modulus. I.e. (expBase^power) % modulus.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ExpModL function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ExpModL(expBase : BigInt, power : BigInt, modulus : BigInt) : BigInt
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns an integer raised to a given power, with respect to a given
|
|
22
|
+
modulus. I.e. (expBase^power) % modulus.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ExtendedGreatestCommonDivisorI
|
|
3
|
+
title: ExtendedGreatestCommonDivisorI function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ExtendedGreatestCommonDivisorI
|
|
9
|
+
qsharp.summary: Returns a tuple (u,v) such that u*a+v*b=GCD(a,b) Note: GCD is always positive except that GCD(0,0)=0.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ExtendedGreatestCommonDivisorI function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ExtendedGreatestCommonDivisorI(a : Int, b : Int) : (Int, Int)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns a tuple (u,v) such that u*a+v*b=GCD(a,b)
|
|
22
|
+
Note: GCD is always positive except that GCD(0,0)=0.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.ExtendedGreatestCommonDivisorL
|
|
3
|
+
title: ExtendedGreatestCommonDivisorL function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: ExtendedGreatestCommonDivisorL
|
|
9
|
+
qsharp.summary: Returns a tuple (u,v) such that u*a+v*b=GCD(a,b) Note: GCD is always positive except that GCD(0,0)=0.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ExtendedGreatestCommonDivisorL function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function ExtendedGreatestCommonDivisorL(a : BigInt, b : BigInt) : (BigInt, BigInt)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns a tuple (u,v) such that u*a+v*b=GCD(a,b)
|
|
22
|
+
Note: GCD is always positive except that GCD(0,0)=0.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.FactorialI
|
|
3
|
+
title: FactorialI function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: FactorialI
|
|
9
|
+
qsharp.summary: Returns the factorial of a given number.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# FactorialI function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function FactorialI(n : Int) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the factorial of a given number.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
Returns the factorial of a given nonnegative integer n, where 0 ≤ n ≤ 20.
|
|
25
|
+
|
|
26
|
+
## Input
|
|
27
|
+
### n
|
|
28
|
+
The number to take the factorial of.
|
|
29
|
+
|
|
30
|
+
## Output
|
|
31
|
+
The factorial of `n`.
|
|
32
|
+
|
|
33
|
+
## Remarks
|
|
34
|
+
For inputs greater than 20, please use `Microsoft.Quantum.Math.FactorialL`.
|
|
35
|
+
|
|
36
|
+
## See Also
|
|
37
|
+
- Microsoft.Quantum.Math.FactorialL
|
|
38
|
+
- Microsoft.Quantum.Math.ApproximateFactorial
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.FactorialL
|
|
3
|
+
title: FactorialL function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: FactorialL
|
|
9
|
+
qsharp.summary: Returns the factorial of a given number.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# FactorialL function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function FactorialL(n : Int) : BigInt
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the factorial of a given number.
|
|
22
|
+
|
|
23
|
+
## Input
|
|
24
|
+
### n
|
|
25
|
+
The number to take the factorial of.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
The factorial of `n`.
|
|
29
|
+
|
|
30
|
+
## See Also
|
|
31
|
+
- Microsoft.Quantum.Math.FactorialI
|
|
32
|
+
- Microsoft.Quantum.Math.ApproximateFactorial
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.Floor
|
|
3
|
+
title: Floor function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: Floor
|
|
9
|
+
qsharp.summary: Returns the largest integer less than or equal to the specified number. For example: Floor(3.7) = 3; Floor(-3.1) = -4
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Floor function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function Floor(value : Double) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Returns the largest integer less than or equal to the specified number.
|
|
22
|
+
For example: Floor(3.7) = 3; Floor(-3.1) = -4
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.GreatestCommonDivisorI
|
|
3
|
+
title: GreatestCommonDivisorI function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: GreatestCommonDivisorI
|
|
9
|
+
qsharp.summary: Computes the greatest common divisor of two integers. Note: GCD is always positive except that GCD(0,0)=0.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# GreatestCommonDivisorI function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function GreatestCommonDivisorI(a : Int, b : Int) : Int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Computes the greatest common divisor of two integers.
|
|
22
|
+
Note: GCD is always positive except that GCD(0,0)=0.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Microsoft.Quantum.Math.GreatestCommonDivisorL
|
|
3
|
+
title: GreatestCommonDivisorL function
|
|
4
|
+
ms.date: 02/23/2024 12:00:00 AM
|
|
5
|
+
ms.topic: managed-reference
|
|
6
|
+
qsharp.kind: function
|
|
7
|
+
qsharp.namespace: Microsoft.Quantum.Math
|
|
8
|
+
qsharp.name: GreatestCommonDivisorL
|
|
9
|
+
qsharp.summary: Computes the greatest common divisor of two integers. Note: GCD is always positive except that GCD(0,0)=0.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# GreatestCommonDivisorL function
|
|
13
|
+
|
|
14
|
+
Namespace: Microsoft.Quantum.Math
|
|
15
|
+
|
|
16
|
+
```qsharp
|
|
17
|
+
function GreatestCommonDivisorL(a : BigInt, b : BigInt) : BigInt
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
Computes the greatest common divisor of two integers.
|
|
22
|
+
Note: GCD is always positive except that GCD(0,0)=0.
|