qsharp-lang 1.10.2-dev → 1.10.3-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 +3 -3
- package/dist/katas-content.generated.md.js +3 -3
- package/dist/samples.generated.js +23 -18
- package/docs/Microsoft.Quantum.Core/Length.md +4 -5
- package/docs/Microsoft.Quantum.Core/Repeated.md +4 -5
- package/docs/Microsoft.Quantum.Core/index.md +18 -0
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/AddLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfEqualL.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfEqualLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfGreaterL.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfGreaterLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfGreaterOrEqualL.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfGreaterOrEqualLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfLessL.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfLessLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfLessOrEqualL.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ApplyIfLessOrEqualLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/FourierTDIncByLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/IncByI.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/IncByIUsingIncByLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/IncByL.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/IncByLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/IncByLEUsingAddLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/IncByLUsingIncByLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/LookAheadDKRSAddLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/MAJ.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/ReflectAboutInteger.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/RippleCarryCGAddLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/RippleCarryCGIncByLE.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.Arithmetic → Std.Arithmetic}/RippleCarryTTKIncByLE.md +5 -4
- package/docs/Std.Arithmetic/index.md +40 -0
- package/docs/Std.Arrays/All.md +2 -1
- package/docs/Std.Arrays/Any.md +2 -1
- package/docs/Std.Arrays/Chunks.md +2 -1
- package/docs/Std.Arrays/CircularlyShifted.md +2 -1
- package/docs/Std.Arrays/ColumnAt.md +2 -1
- package/docs/Std.Arrays/Count.md +2 -1
- package/docs/Std.Arrays/Diagonal.md +2 -1
- package/docs/Std.Arrays/DrawMany.md +2 -1
- package/docs/Std.Arrays/Enumerated.md +2 -1
- package/docs/Std.Arrays/Excluding.md +2 -1
- package/docs/Std.Arrays/Filtered.md +2 -1
- package/docs/Std.Arrays/FlatMapped.md +2 -1
- package/docs/Std.Arrays/Flattened.md +2 -1
- package/docs/Std.Arrays/Fold.md +2 -1
- package/docs/Std.Arrays/ForEach.md +2 -1
- package/docs/Std.Arrays/Head.md +2 -1
- package/docs/Std.Arrays/HeadAndRest.md +2 -1
- package/docs/Std.Arrays/IndexOf.md +2 -1
- package/docs/Std.Arrays/IndexRange.md +2 -1
- package/docs/Std.Arrays/Interleaved.md +2 -1
- package/docs/Std.Arrays/IsEmpty.md +2 -1
- package/docs/Std.Arrays/IsRectangularArray.md +2 -1
- package/docs/Std.Arrays/IsSorted.md +2 -1
- package/docs/Std.Arrays/IsSquareArray.md +2 -1
- package/docs/Std.Arrays/Mapped.md +2 -1
- package/docs/Std.Arrays/MappedByIndex.md +2 -1
- package/docs/Std.Arrays/MappedOverRange.md +2 -1
- package/docs/Std.Arrays/Most.md +2 -1
- package/docs/Std.Arrays/MostAndTail.md +2 -1
- package/docs/Std.Arrays/Padded.md +2 -1
- package/docs/Std.Arrays/Partitioned.md +2 -1
- package/docs/Std.Arrays/Rest.md +2 -1
- package/docs/Std.Arrays/Reversed.md +2 -1
- package/docs/Std.Arrays/SequenceI.md +2 -1
- package/docs/Std.Arrays/SequenceL.md +2 -1
- package/docs/Std.Arrays/Sorted.md +2 -1
- package/docs/Std.Arrays/Subarray.md +2 -1
- package/docs/Std.Arrays/Swapped.md +2 -1
- package/docs/Std.Arrays/Tail.md +2 -1
- package/docs/Std.Arrays/Transposed.md +2 -1
- package/docs/Std.Arrays/Unzipped.md +2 -1
- package/docs/Std.Arrays/Where.md +2 -1
- package/docs/Std.Arrays/Windows.md +2 -1
- package/docs/Std.Arrays/Zipped.md +2 -1
- package/docs/Std.Arrays/index.md +60 -0
- package/docs/Std.Canon/ApplyCNOTChain.md +2 -1
- package/docs/Std.Canon/ApplyControlledOnBitString.md +2 -1
- package/docs/Std.Canon/ApplyControlledOnInt.md +2 -1
- package/docs/Std.Canon/ApplyP.md +2 -1
- package/docs/Std.Canon/ApplyPauli.md +2 -1
- package/docs/Std.Canon/ApplyPauliFromBitString.md +2 -1
- package/docs/Std.Canon/ApplyPauliFromInt.md +2 -1
- package/docs/Std.Canon/ApplyQFT.md +2 -1
- package/docs/Std.Canon/ApplyToEach.md +2 -1
- package/docs/Std.Canon/ApplyToEachA.md +2 -1
- package/docs/Std.Canon/ApplyToEachC.md +2 -1
- package/docs/Std.Canon/ApplyToEachCA.md +2 -1
- package/docs/Std.Canon/ApplyXorInPlace.md +2 -1
- package/docs/Std.Canon/ApplyXorInPlaceL.md +2 -1
- package/docs/Std.Canon/CX.md +2 -1
- package/docs/Std.Canon/CY.md +2 -1
- package/docs/Std.Canon/CZ.md +2 -1
- package/docs/Std.Canon/Fst.md +2 -1
- package/docs/Std.Canon/Relabel.md +2 -1
- package/docs/Std.Canon/Snd.md +2 -1
- package/docs/Std.Canon/SwapReverseRegister.md +2 -1
- package/docs/Std.Canon/index.md +37 -0
- package/docs/Std.Convert/BigIntAsBoolArray.md +2 -1
- package/docs/Std.Convert/BoolArrayAsBigInt.md +2 -1
- package/docs/Std.Convert/BoolArrayAsInt.md +2 -1
- package/docs/Std.Convert/BoolArrayAsResultArray.md +2 -1
- package/docs/Std.Convert/BoolAsResult.md +2 -1
- package/docs/Std.Convert/ComplexAsComplexPolar.md +2 -1
- package/docs/Std.Convert/ComplexPolarAsComplex.md +2 -1
- package/docs/Std.Convert/DoubleAsStringWithPrecision.md +2 -1
- package/docs/Std.Convert/IntAsBigInt.md +2 -1
- package/docs/Std.Convert/IntAsBoolArray.md +2 -1
- package/docs/Std.Convert/IntAsDouble.md +2 -1
- package/docs/Std.Convert/ResultArrayAsBoolArray.md +2 -1
- package/docs/Std.Convert/ResultArrayAsInt.md +2 -1
- package/docs/Std.Convert/ResultAsBool.md +2 -1
- package/docs/Std.Convert/index.md +30 -0
- package/docs/Std.Core/Length.md +2 -1
- package/docs/Std.Core/Repeated.md +2 -1
- package/docs/Std.Core/index.md +18 -0
- package/docs/Std.Diagnostics/ApplyIdleNoise.md +34 -0
- package/docs/Std.Diagnostics/BitFlipNoise.md +23 -0
- package/docs/Std.Diagnostics/CheckAllZero.md +38 -0
- package/docs/Std.Diagnostics/CheckOperationsAreEqual.md +49 -0
- package/docs/Std.Diagnostics/CheckZero.md +38 -0
- package/docs/Std.Diagnostics/ConfigurePauliNoise.md +38 -0
- package/docs/Std.Diagnostics/DepolarizingNoise.md +23 -0
- package/docs/Std.Diagnostics/DumpMachine.md +2 -1
- package/docs/Std.Diagnostics/DumpOperation.md +3 -2
- package/docs/Std.Diagnostics/DumpRegister.md +2 -1
- package/docs/Std.Diagnostics/Fact.md +2 -1
- package/docs/Std.Diagnostics/NoNoise.md +23 -0
- package/docs/Std.Diagnostics/PhaseFlipNoise.md +23 -0
- package/docs/Std.Diagnostics/StartCountingFunction.md +44 -0
- package/docs/Std.Diagnostics/StartCountingOperation.md +53 -0
- package/docs/Std.Diagnostics/StartCountingQubits.md +39 -0
- package/docs/Std.Diagnostics/StopCountingFunction.md +34 -0
- package/docs/Std.Diagnostics/StopCountingOperation.md +34 -0
- package/docs/Std.Diagnostics/StopCountingQubits.md +30 -0
- package/docs/Std.Diagnostics/index.md +35 -0
- package/docs/Std.Intrinsic/AND.md +3 -2
- package/docs/Std.Intrinsic/CCNOT.md +2 -1
- package/docs/Std.Intrinsic/CNOT.md +2 -1
- package/docs/Std.Intrinsic/Exp.md +2 -1
- package/docs/Std.Intrinsic/H.md +2 -1
- package/docs/Std.Intrinsic/I.md +2 -1
- package/docs/Std.Intrinsic/M.md +2 -1
- package/docs/Std.Intrinsic/Measure.md +2 -1
- package/docs/Std.Intrinsic/Message.md +2 -1
- package/docs/Std.Intrinsic/R.md +2 -1
- package/docs/Std.Intrinsic/R1.md +3 -2
- package/docs/Std.Intrinsic/R1Frac.md +3 -2
- package/docs/Std.Intrinsic/RFrac.md +2 -1
- package/docs/Std.Intrinsic/Reset.md +3 -2
- package/docs/Std.Intrinsic/ResetAll.md +3 -2
- package/docs/Std.Intrinsic/Rx.md +2 -1
- package/docs/Std.Intrinsic/Rxx.md +2 -1
- package/docs/Std.Intrinsic/Ry.md +2 -1
- package/docs/Std.Intrinsic/Ryy.md +2 -1
- package/docs/Std.Intrinsic/Rz.md +2 -1
- package/docs/Std.Intrinsic/Rzz.md +2 -1
- package/docs/Std.Intrinsic/S.md +2 -1
- package/docs/Std.Intrinsic/SWAP.md +2 -1
- package/docs/Std.Intrinsic/T.md +2 -1
- package/docs/Std.Intrinsic/X.md +2 -1
- package/docs/Std.Intrinsic/Y.md +2 -1
- package/docs/Std.Intrinsic/Z.md +2 -1
- package/docs/Std.Intrinsic/index.md +43 -0
- package/docs/Std.Logical/Xor.md +2 -1
- package/docs/Std.Logical/index.md +17 -0
- package/docs/Std.Math/AbsComplex.md +2 -1
- package/docs/Std.Math/AbsComplexPolar.md +2 -1
- package/docs/Std.Math/AbsD.md +2 -1
- package/docs/Std.Math/AbsI.md +2 -1
- package/docs/Std.Math/AbsL.md +6 -2
- package/docs/Std.Math/AbsSquaredComplex.md +2 -1
- package/docs/Std.Math/AbsSquaredComplexPolar.md +2 -1
- package/docs/Std.Math/ApproximateFactorial.md +2 -1
- package/docs/Std.Math/ArcCos.md +2 -1
- package/docs/Std.Math/ArcCosh.md +2 -1
- package/docs/Std.Math/ArcSin.md +2 -1
- package/docs/Std.Math/ArcSinh.md +2 -1
- package/docs/Std.Math/ArcTan.md +2 -1
- package/docs/Std.Math/ArcTan2.md +2 -1
- package/docs/Std.Math/ArcTanh.md +2 -1
- package/docs/Std.Math/ArgComplex.md +2 -1
- package/docs/Std.Math/ArgComplexPolar.md +2 -1
- package/docs/Std.Math/Binom.md +2 -1
- package/docs/Std.Math/BitSizeI.md +2 -1
- package/docs/Std.Math/BitSizeL.md +2 -1
- package/docs/Std.Math/Ceiling.md +2 -1
- package/docs/Std.Math/Complex.md +2 -1
- package/docs/Std.Math/ComplexPolar.md +2 -1
- package/docs/Std.Math/ContinuedFractionConvergentI.md +2 -1
- package/docs/Std.Math/ContinuedFractionConvergentL.md +2 -1
- package/docs/Std.Math/Cos.md +2 -1
- package/docs/Std.Math/Cosh.md +2 -1
- package/docs/Std.Math/DivRemI.md +2 -1
- package/docs/Std.Math/DivRemL.md +2 -1
- package/docs/Std.Math/DividedByC.md +2 -1
- package/docs/Std.Math/DividedByCP.md +2 -1
- package/docs/Std.Math/E.md +2 -1
- package/docs/Std.Math/ExpModI.md +2 -1
- package/docs/Std.Math/ExpModL.md +2 -1
- package/docs/Std.Math/ExtendedGreatestCommonDivisorI.md +2 -1
- package/docs/Std.Math/ExtendedGreatestCommonDivisorL.md +2 -1
- package/docs/Std.Math/FactorialI.md +2 -1
- package/docs/Std.Math/FactorialL.md +2 -1
- package/docs/Std.Math/Floor.md +2 -1
- package/docs/Std.Math/GreatestCommonDivisorI.md +2 -1
- package/docs/Std.Math/GreatestCommonDivisorL.md +2 -1
- package/docs/Std.Math/HammingWeightI.md +2 -1
- package/docs/Std.Math/InverseModI.md +2 -1
- package/docs/Std.Math/InverseModL.md +2 -1
- package/docs/Std.Math/IsCoprimeI.md +2 -1
- package/docs/Std.Math/IsCoprimeL.md +2 -1
- package/docs/Std.Math/IsInfinite.md +2 -1
- package/docs/Std.Math/IsNaN.md +2 -1
- package/docs/Std.Math/LargestFixedPoint.md +2 -1
- package/docs/Std.Math/Lg.md +2 -1
- package/docs/Std.Math/Log.md +2 -1
- package/docs/Std.Math/Log10.md +2 -1
- package/docs/Std.Math/LogFactorialD.md +2 -1
- package/docs/Std.Math/LogGammaD.md +2 -1
- package/docs/Std.Math/LogOf2.md +2 -1
- package/docs/Std.Math/Max.md +2 -1
- package/docs/Std.Math/MaxD.md +2 -1
- package/docs/Std.Math/MaxI.md +2 -1
- package/docs/Std.Math/MaxL.md +2 -1
- package/docs/Std.Math/Min.md +2 -1
- package/docs/Std.Math/MinD.md +2 -1
- package/docs/Std.Math/MinI.md +2 -1
- package/docs/Std.Math/MinL.md +2 -1
- package/docs/Std.Math/MinusC.md +2 -1
- package/docs/Std.Math/MinusCP.md +2 -1
- package/docs/Std.Math/ModulusI.md +2 -1
- package/docs/Std.Math/ModulusL.md +2 -1
- package/docs/Std.Math/NegationC.md +2 -1
- package/docs/Std.Math/NegationCP.md +2 -1
- package/docs/Std.Math/PI.md +2 -1
- package/docs/Std.Math/PNorm.md +3 -2
- package/docs/Std.Math/PNormalized.md +3 -2
- package/docs/Std.Math/PlusC.md +2 -1
- package/docs/Std.Math/PlusCP.md +2 -1
- package/docs/Std.Math/PowC.md +2 -1
- package/docs/Std.Math/PowCP.md +2 -1
- package/docs/Std.Math/RealMod.md +2 -1
- package/docs/Std.Math/Round.md +2 -1
- package/docs/Std.Math/SignD.md +2 -1
- package/docs/Std.Math/SignI.md +2 -1
- package/docs/Std.Math/SignL.md +2 -1
- package/docs/Std.Math/Sin.md +2 -1
- package/docs/Std.Math/Sinh.md +2 -1
- package/docs/Std.Math/SmallestFixedPoint.md +2 -1
- package/docs/Std.Math/Sqrt.md +2 -1
- package/docs/Std.Math/SquaredNorm.md +2 -1
- package/docs/Std.Math/Tan.md +2 -1
- package/docs/Std.Math/Tanh.md +2 -1
- package/docs/Std.Math/TimesC.md +2 -1
- package/docs/Std.Math/TimesCP.md +2 -1
- package/docs/Std.Math/TrailingZeroCountI.md +2 -1
- package/docs/Std.Math/TrailingZeroCountL.md +2 -1
- package/docs/Std.Math/Truncate.md +2 -1
- package/docs/Std.Math/index.md +109 -0
- package/docs/Std.Measurement/MResetEachZ.md +2 -1
- package/docs/Std.Measurement/MResetX.md +2 -1
- package/docs/Std.Measurement/MResetY.md +2 -1
- package/docs/Std.Measurement/MResetZ.md +2 -1
- package/docs/Std.Measurement/MeasureAllZ.md +2 -1
- package/docs/Std.Measurement/MeasureEachZ.md +2 -1
- package/docs/Std.Measurement/MeasureInteger.md +2 -1
- package/docs/Std.Measurement/index.md +23 -0
- package/docs/Std.Random/DrawRandomBool.md +38 -0
- package/docs/Std.Random/DrawRandomDouble.md +40 -0
- package/docs/Std.Random/DrawRandomInt.md +40 -0
- package/docs/Std.Random/index.md +19 -0
- package/docs/Std.Range/IsRangeEmpty.md +2 -1
- package/docs/Std.Range/RangeEnd.md +2 -1
- package/docs/Std.Range/RangeReverse.md +2 -1
- package/docs/Std.Range/RangeStart.md +2 -1
- package/docs/Std.Range/RangeStep.md +2 -1
- package/docs/Std.Range/index.md +21 -0
- package/docs/Std.ResourceEstimation/AccountForEstimates.md +2 -1
- package/docs/Std.ResourceEstimation/AuxQubitCount.md +2 -1
- package/docs/Std.ResourceEstimation/BeginEstimateCaching.md +2 -1
- package/docs/Std.ResourceEstimation/BeginRepeatEstimates.md +2 -1
- package/docs/Std.ResourceEstimation/CczCount.md +2 -1
- package/docs/Std.ResourceEstimation/EndEstimateCaching.md +2 -1
- package/docs/Std.ResourceEstimation/EndRepeatEstimates.md +2 -1
- package/docs/Std.ResourceEstimation/MeasurementCount.md +2 -1
- package/docs/Std.ResourceEstimation/PSSPCLayout.md +2 -1
- package/docs/Std.ResourceEstimation/RepeatEstimates.md +2 -1
- package/docs/Std.ResourceEstimation/RotationCount.md +2 -1
- package/docs/Std.ResourceEstimation/RotationDepth.md +2 -1
- package/docs/Std.ResourceEstimation/SingleVariant.md +2 -1
- package/docs/Std.ResourceEstimation/TCount.md +2 -1
- package/docs/Std.ResourceEstimation/index.md +30 -0
- package/docs/{Microsoft.Quantum.Unstable.StatePreparation → Std.StatePreparation}/ApproximatelyPreparePureStateCP.md +5 -4
- package/docs/{Microsoft.Quantum.Unstable.StatePreparation → Std.StatePreparation}/PreparePureStateD.md +6 -5
- package/docs/Std.StatePreparation/index.md +18 -0
- package/docs/{Microsoft.Quantum.Unstable.TableLookup → Std.TableLookup}/Select.md +5 -4
- package/docs/Std.TableLookup/index.md +17 -0
- package/docs/index.md +32 -0
- package/docs/toc.yml +76 -38
- package/lib/node/qsc_wasm.cjs +1 -1
- package/lib/node/qsc_wasm.d.cts +1 -1
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +1 -1
- package/lib/web/qsc_wasm.js +1 -1
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Std.Arrays-toc
|
|
3
|
+
title: Std.Arrays namespace
|
|
4
|
+
description: Table of contents for the Q# Arrays namespace
|
|
5
|
+
author: {AUTHOR}
|
|
6
|
+
ms.author: {MS_AUTHOR}
|
|
7
|
+
ms.date: 11/15/2024
|
|
8
|
+
ms.topic: landing-page
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Std.Arrays
|
|
12
|
+
|
|
13
|
+
The Std.Arrays namespace contains the following items:
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| [All](xref:Qdk.Std.Arrays.All) | Given an array and a predicate that is defined for the elements of the array, and checks if all elements of the array satisfy the predicate. |
|
|
18
|
+
| [Any](xref:Qdk.Std.Arrays.Any) | Given an array and a predicate that is defined for the elements of the array, checks if at least one element of the array satisfies the predicate. |
|
|
19
|
+
| [Chunks](xref:Qdk.Std.Arrays.Chunks) | Splits an array into multiple parts of equal length. |
|
|
20
|
+
| [CircularlyShifted](xref:Qdk.Std.Arrays.CircularlyShifted) | Shift an array circularly left or right by a specific step size. |
|
|
21
|
+
| [ColumnAt](xref:Qdk.Std.Arrays.ColumnAt) | Extracts a column from a matrix. |
|
|
22
|
+
| [Count](xref:Qdk.Std.Arrays.Count) | Given an array and a predicate that is defined for the elements of the array, returns the number of elements an array that consists of those elements that satisfy the predicate. |
|
|
23
|
+
| [Diagonal](xref:Qdk.Std.Arrays.Diagonal) | Returns an array of diagonal elements of a 2-dimensional array |
|
|
24
|
+
| [DrawMany](xref:Qdk.Std.Arrays.DrawMany) | Repeats an operation for a given number of samples, collecting its outputs in an array. |
|
|
25
|
+
| [Enumerated](xref:Qdk.Std.Arrays.Enumerated) | Given an array, returns a new array containing elements of the original array along with the indices of each element. |
|
|
26
|
+
| [Excluding](xref:Qdk.Std.Arrays.Excluding) | Returns an array containing the elements of another array, excluding elements at a given list of indices. |
|
|
27
|
+
| [Filtered](xref:Qdk.Std.Arrays.Filtered) | Given an array and a predicate that is defined for the elements of the array, returns an array that consists of those elements that satisfy the predicate. |
|
|
28
|
+
| [FlatMapped](xref:Qdk.Std.Arrays.FlatMapped) | Given an array and a function that maps an array element to some output array, returns the concatenated output arrays for each array element. |
|
|
29
|
+
| [Flattened](xref:Qdk.Std.Arrays.Flattened) | Given an array of arrays, returns the concatenation of all arrays. |
|
|
30
|
+
| [Fold](xref:Qdk.Std.Arrays.Fold) | Iterates a function `f` through an array `array`, returning `f(...f(f(initialState, array[0]), array[1]), ...)`. |
|
|
31
|
+
| [ForEach](xref:Qdk.Std.Arrays.ForEach) | Given an array and an operation that is defined for the elements of the array, returns a new array that consists of the images of the original array under the operation. |
|
|
32
|
+
| [Head](xref:Qdk.Std.Arrays.Head) | Returns the first element of the array. |
|
|
33
|
+
| [HeadAndRest](xref:Qdk.Std.Arrays.HeadAndRest) | Returns a tuple of first and all remaining elements of the array. |
|
|
34
|
+
| [IndexOf](xref:Qdk.Std.Arrays.IndexOf) | Returns the first index of the first element in an array that satisfies a given predicate. If no such element exists, returns -1. |
|
|
35
|
+
| [IndexRange](xref:Qdk.Std.Arrays.IndexRange) | Given an array, returns a range over the indices of that array, suitable for use in a for loop. |
|
|
36
|
+
| [Interleaved](xref:Qdk.Std.Arrays.Interleaved) | Interleaves two arrays of (almost) same size. |
|
|
37
|
+
| [IsEmpty](xref:Qdk.Std.Arrays.IsEmpty) | Returns true if and only if an array is empty. |
|
|
38
|
+
| [IsRectangularArray](xref:Qdk.Std.Arrays.IsRectangularArray) | Returns whether a 2-dimensional array has a rectangular shape |
|
|
39
|
+
| [IsSorted](xref:Qdk.Std.Arrays.IsSorted) | Given an array, returns whether that array is sorted as defined by a given comparison function. |
|
|
40
|
+
| [IsSquareArray](xref:Qdk.Std.Arrays.IsSquareArray) | Returns whether a 2-dimensional array has a square shape |
|
|
41
|
+
| [Mapped](xref:Qdk.Std.Arrays.Mapped) | Given an array and a function that is defined for the elements of the array, returns a new array that consists of the images of the original array under the function. |
|
|
42
|
+
| [MappedByIndex](xref:Qdk.Std.Arrays.MappedByIndex) | Given an array and a function that is defined for the indexed elements of the array, returns a new array that consists of the images of the original array under the function. |
|
|
43
|
+
| [MappedOverRange](xref:Qdk.Std.Arrays.MappedOverRange) | Given a range and a function that takes an integer as input, returns a new array that consists of the images of the range values under the function. |
|
|
44
|
+
| [Most](xref:Qdk.Std.Arrays.Most) | Creates an array that is equal to an input array except that the last array element is dropped. |
|
|
45
|
+
| [MostAndTail](xref:Qdk.Std.Arrays.MostAndTail) | Returns a tuple of all but one and the last element of the array. |
|
|
46
|
+
| [Padded](xref:Qdk.Std.Arrays.Padded) | Returns an array padded at with specified values up to a specified length. |
|
|
47
|
+
| [Partitioned](xref:Qdk.Std.Arrays.Partitioned) | Splits an array into multiple parts. |
|
|
48
|
+
| [Rest](xref:Qdk.Std.Arrays.Rest) | Creates an array that is equal to an input array except that the first array element is dropped. |
|
|
49
|
+
| [Reversed](xref:Qdk.Std.Arrays.Reversed) | Create an array that contains the same elements as an input array but in reversed order. |
|
|
50
|
+
| [SequenceI](xref:Qdk.Std.Arrays.SequenceI) | Get an array of integers in a given interval. |
|
|
51
|
+
| [SequenceL](xref:Qdk.Std.Arrays.SequenceL) | Get an array of integers in a given interval. |
|
|
52
|
+
| [Sorted](xref:Qdk.Std.Arrays.Sorted) | Given an array, returns the elements of that array sorted by a given comparison function. |
|
|
53
|
+
| [Subarray](xref:Qdk.Std.Arrays.Subarray) | Takes an array and a list of locations and produces a new array formed from the elements of the original array that match the given locations. |
|
|
54
|
+
| [Swapped](xref:Qdk.Std.Arrays.Swapped) | Applies a swap of two elements in an array. |
|
|
55
|
+
| [Tail](xref:Qdk.Std.Arrays.Tail) | Returns the last element of the array. |
|
|
56
|
+
| [Transposed](xref:Qdk.Std.Arrays.Transposed) | Returns the transpose of a matrix represented as an array of arrays. |
|
|
57
|
+
| [Unzipped](xref:Qdk.Std.Arrays.Unzipped) | Given an array of 2-tuples, returns a tuple of two arrays, each containing the elements of the tuples of the input array. |
|
|
58
|
+
| [Where](xref:Qdk.Std.Arrays.Where) | Given a predicate and an array, returns the indices of that array where the predicate is true. |
|
|
59
|
+
| [Windows](xref:Qdk.Std.Arrays.Windows) | Returns all consecutive subarrays of length `size`. |
|
|
60
|
+
| [Zipped](xref:Qdk.Std.Arrays.Zipped) | Given two arrays, returns a new array of pairs such that each pair contains an element from each original array. |
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyCNOTChain
|
|
3
3
|
title: ApplyCNOTChain operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyCNOTChain operation: Computes the parity of a register of qubits in-place."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyControlledOnBitString
|
|
3
3
|
title: ApplyControlledOnBitString operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyControlledOnBitString operation: Applies `oracle` on `target` when `controlRegister` is in the state specified by `bits`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyControlledOnInt
|
|
3
3
|
title: ApplyControlledOnInt operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyControlledOnInt operation: Applies a unitary operation on the target if the control register state corresponds to a specified nonnegative integer."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
package/docs/Std.Canon/ApplyP.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyP
|
|
3
3
|
title: ApplyP operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyP operation: Given a single-qubit Pauli operator, applies the corresponding operation to a single qubit."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyPauli
|
|
3
3
|
title: ApplyPauli operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyPauli operation: Given a multi-qubit Pauli operator, applies the corresponding operation to a quantum register."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyPauliFromBitString
|
|
3
3
|
title: ApplyPauliFromBitString operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyPauliFromBitString operation: Applies a Pauli operator on each qubit in an array if the corresponding bit of a Boolean array matches a given input."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyPauliFromInt
|
|
3
3
|
title: ApplyPauliFromInt operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyPauliFromInt operation: Applies a Pauli operator on each qubit in an array if the corresponding bit of a Little-endian integer matches a given input."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyQFT
|
|
3
3
|
title: ApplyQFT operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyQFT operation: Applies the rotations of Quantum Fourier Transform (QFT) to a little-endian quantum register."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyToEach
|
|
3
3
|
title: ApplyToEach operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyToEach operation: Applies an operation to each element in a register."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyToEachA
|
|
3
3
|
title: ApplyToEachA operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyToEachA operation: Applies an operation to each element in a register. The modifier `A` indicates that the single-element operation is adjointable."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyToEachC
|
|
3
3
|
title: ApplyToEachC operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyToEachC operation: Applies an operation to each element in a register. The modifier `C` indicates that the single-element operation is controllable."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyToEachCA
|
|
3
3
|
title: ApplyToEachCA operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyToEachCA operation: Applies an operation to each element in a register. The modifier `CA` indicates that the single-element operation is controllable and adjointable."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyXorInPlace
|
|
3
3
|
title: ApplyXorInPlace operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyXorInPlace operation: Applies a bitwise-XOR operation between a classical integer and an integer represented by a register of qubits."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.ApplyXorInPlaceL
|
|
3
3
|
title: ApplyXorInPlaceL operation
|
|
4
|
-
|
|
4
|
+
description: "Q# ApplyXorInPlaceL operation: Applies a bitwise-XOR operation between a classical integer and an integer represented by a register of qubits."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
package/docs/Std.Canon/CX.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.CX
|
|
3
3
|
title: CX operation
|
|
4
|
-
|
|
4
|
+
description: "Q# CX operation: Applies the controlled-X (CX) gate to a pair of qubits."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
package/docs/Std.Canon/CY.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.CY
|
|
3
3
|
title: CY operation
|
|
4
|
-
|
|
4
|
+
description: "Q# CY operation: Applies the controlled-Y (CY) gate to a pair of qubits."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
package/docs/Std.Canon/CZ.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.CZ
|
|
3
3
|
title: CZ operation
|
|
4
|
-
|
|
4
|
+
description: "Q# CZ operation: Applies the controlled-Z (CZ) gate to a pair of qubits."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
package/docs/Std.Canon/Fst.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.Relabel
|
|
3
3
|
title: Relabel operation
|
|
4
|
-
|
|
4
|
+
description: "Q# Relabel operation: Relabels the qubits in the `current` array with the qubits in the `updated` array. The `updated` array must be a valid permutation of the `current` array."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
package/docs/Std.Canon/Snd.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Canon.SwapReverseRegister
|
|
3
3
|
title: SwapReverseRegister operation
|
|
4
|
-
|
|
4
|
+
description: "Q# SwapReverseRegister operation: Uses SWAP gates to reverse the order of the qubits in a register."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: operation
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Std.Canon-toc
|
|
3
|
+
title: Std.Canon namespace
|
|
4
|
+
description: Table of contents for the Q# Canon namespace
|
|
5
|
+
author: {AUTHOR}
|
|
6
|
+
ms.author: {MS_AUTHOR}
|
|
7
|
+
ms.date: 11/15/2024
|
|
8
|
+
ms.topic: landing-page
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Std.Canon
|
|
12
|
+
|
|
13
|
+
The Std.Canon namespace contains the following items:
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| [ApplyCNOTChain](xref:Qdk.Std.Canon.ApplyCNOTChain) | Computes the parity of a register of qubits in-place. |
|
|
18
|
+
| [ApplyControlledOnBitString](xref:Qdk.Std.Canon.ApplyControlledOnBitString) | Applies `oracle` on `target` when `controlRegister` is in the state specified by `bits`. |
|
|
19
|
+
| [ApplyControlledOnInt](xref:Qdk.Std.Canon.ApplyControlledOnInt) | Applies a unitary operation on the target if the control register state corresponds to a specified nonnegative integer. |
|
|
20
|
+
| [ApplyP](xref:Qdk.Std.Canon.ApplyP) | Given a single-qubit Pauli operator, applies the corresponding operation to a single qubit. |
|
|
21
|
+
| [ApplyPauli](xref:Qdk.Std.Canon.ApplyPauli) | Given a multi-qubit Pauli operator, applies the corresponding operation to a quantum register. |
|
|
22
|
+
| [ApplyPauliFromBitString](xref:Qdk.Std.Canon.ApplyPauliFromBitString) | Applies a Pauli operator on each qubit in an array if the corresponding bit of a Boolean array matches a given input. |
|
|
23
|
+
| [ApplyPauliFromInt](xref:Qdk.Std.Canon.ApplyPauliFromInt) | Applies a Pauli operator on each qubit in an array if the corresponding bit of a Little-endian integer matches a given input. |
|
|
24
|
+
| [ApplyQFT](xref:Qdk.Std.Canon.ApplyQFT) | Applies the rotations of Quantum Fourier Transform (QFT) to a little-endian quantum register. |
|
|
25
|
+
| [ApplyToEach](xref:Qdk.Std.Canon.ApplyToEach) | Applies an operation to each element in a register. |
|
|
26
|
+
| [ApplyToEachA](xref:Qdk.Std.Canon.ApplyToEachA) | Applies an operation to each element in a register. The modifier `A` indicates that the single-element operation is adjointable. |
|
|
27
|
+
| [ApplyToEachC](xref:Qdk.Std.Canon.ApplyToEachC) | Applies an operation to each element in a register. The modifier `C` indicates that the single-element operation is controllable. |
|
|
28
|
+
| [ApplyToEachCA](xref:Qdk.Std.Canon.ApplyToEachCA) | Applies an operation to each element in a register. The modifier `CA` indicates that the single-element operation is controllable and adjointable. |
|
|
29
|
+
| [ApplyXorInPlace](xref:Qdk.Std.Canon.ApplyXorInPlace) | Applies a bitwise-XOR operation between a classical integer and an integer represented by a register of qubits. |
|
|
30
|
+
| [ApplyXorInPlaceL](xref:Qdk.Std.Canon.ApplyXorInPlaceL) | Applies a bitwise-XOR operation between a classical integer and an integer represented by a register of qubits. |
|
|
31
|
+
| [CX](xref:Qdk.Std.Canon.CX) | Applies the controlled-X (CX) gate to a pair of qubits. |
|
|
32
|
+
| [CY](xref:Qdk.Std.Canon.CY) | Applies the controlled-Y (CY) gate to a pair of qubits. |
|
|
33
|
+
| [CZ](xref:Qdk.Std.Canon.CZ) | Applies the controlled-Z (CZ) gate to a pair of qubits. |
|
|
34
|
+
| [Fst](xref:Qdk.Std.Canon.Fst) | Given a pair, returns its first element. |
|
|
35
|
+
| [Relabel](xref:Qdk.Std.Canon.Relabel) | Relabels the qubits in the `current` array with the qubits in the `updated` array. The `updated` array must be a valid permutation of the `current` array. |
|
|
36
|
+
| [Snd](xref:Qdk.Std.Canon.Snd) | Given a pair, returns its second element. |
|
|
37
|
+
| [SwapReverseRegister](xref:Qdk.Std.Canon.SwapReverseRegister) | Uses SWAP gates to reverse the order of the qubits in a register. |
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.BigIntAsBoolArray
|
|
3
3
|
title: BigIntAsBoolArray function
|
|
4
|
-
|
|
4
|
+
description: "Q# BigIntAsBoolArray function: Produces a binary representation of a non-negative BigInt, using the little-endian representation for the returned array."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.BoolArrayAsBigInt
|
|
3
3
|
title: BoolArrayAsBigInt function
|
|
4
|
-
|
|
4
|
+
description: "Q# BoolArrayAsBigInt function: Converts an array of Boolean values into a non-negative BigInt, interpreting the array as a binary representation in little-endian format."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.BoolArrayAsInt
|
|
3
3
|
title: BoolArrayAsInt function
|
|
4
|
-
|
|
4
|
+
description: "Q# BoolArrayAsInt function: Produces a non-negative integer from a string of bits in little-endian format. `bits[0]` represents the least significant bit."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.BoolArrayAsResultArray
|
|
3
3
|
title: BoolArrayAsResultArray function
|
|
4
|
-
|
|
4
|
+
description: "Q# BoolArrayAsResultArray function: Converts a `Bool[]` type to a `Result[]` type, where `true` is mapped to `One` and `false` is mapped to `Zero`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.BoolAsResult
|
|
3
3
|
title: BoolAsResult function
|
|
4
|
-
|
|
4
|
+
description: "Q# BoolAsResult function: Converts a `Bool` type to a `Result` type, where `true` is mapped to `One` and `false` is mapped to `Zero`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.ComplexAsComplexPolar
|
|
3
3
|
title: ComplexAsComplexPolar function
|
|
4
|
-
|
|
4
|
+
description: "Q# ComplexAsComplexPolar function: Converts a complex number of type `Complex` to a complex number of type `ComplexPolar`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.ComplexPolarAsComplex
|
|
3
3
|
title: ComplexPolarAsComplex function
|
|
4
|
-
|
|
4
|
+
description: "Q# ComplexPolarAsComplex function: Converts a complex number of type `ComplexPolar` to a complex number of type `Complex`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.DoubleAsStringWithPrecision
|
|
3
3
|
title: DoubleAsStringWithPrecision function
|
|
4
|
-
|
|
4
|
+
description: "Q# DoubleAsStringWithPrecision function: Converts a given double-precision floating-point number to a string representation with desired precision, rounding if required."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.IntAsBigInt
|
|
3
3
|
title: IntAsBigInt function
|
|
4
|
-
|
|
4
|
+
description: "Q# IntAsBigInt function: Converts a given integer `number` to an equivalent big integer."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.IntAsBoolArray
|
|
3
3
|
title: IntAsBoolArray function
|
|
4
|
-
|
|
4
|
+
description: "Q# IntAsBoolArray function: Produces a binary representation of a non-negative integer, using the little-endian representation for the returned array."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.IntAsDouble
|
|
3
3
|
title: IntAsDouble function
|
|
4
|
-
|
|
4
|
+
description: "Q# IntAsDouble function: Converts a given integer `number` to an equivalent double-precision floating-point number."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.ResultArrayAsBoolArray
|
|
3
3
|
title: ResultArrayAsBoolArray function
|
|
4
|
-
|
|
4
|
+
description: "Q# ResultArrayAsBoolArray function: Converts a `Result[]` type to a `Bool[]` type, where `One` is mapped to `true` and `Zero` is mapped to `false`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.ResultArrayAsInt
|
|
3
3
|
title: ResultArrayAsInt function
|
|
4
|
-
|
|
4
|
+
description: "Q# ResultArrayAsInt function: Produces a non-negative integer from a string of Results in little-endian format."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Convert.ResultAsBool
|
|
3
3
|
title: ResultAsBool function
|
|
4
|
-
|
|
4
|
+
description: "Q# ResultAsBool function: Converts a `Result` type to a `Bool` type, where `One` is mapped to `true` and `Zero` is mapped to `false`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Std__
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Std.Convert-toc
|
|
3
|
+
title: Std.Convert namespace
|
|
4
|
+
description: Table of contents for the Q# Convert namespace
|
|
5
|
+
author: {AUTHOR}
|
|
6
|
+
ms.author: {MS_AUTHOR}
|
|
7
|
+
ms.date: 11/15/2024
|
|
8
|
+
ms.topic: landing-page
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Std.Convert
|
|
12
|
+
|
|
13
|
+
The Std.Convert namespace contains the following items:
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| [BigIntAsBoolArray](xref:Qdk.Std.Convert.BigIntAsBoolArray) | Produces a binary representation of a non-negative BigInt, using the little-endian representation for the returned array. |
|
|
18
|
+
| [BoolArrayAsBigInt](xref:Qdk.Std.Convert.BoolArrayAsBigInt) | Converts an array of Boolean values into a non-negative BigInt, interpreting the array as a binary representation in little-endian format. |
|
|
19
|
+
| [BoolArrayAsInt](xref:Qdk.Std.Convert.BoolArrayAsInt) | Produces a non-negative integer from a string of bits in little-endian format. `bits[0]` represents the least significant bit. |
|
|
20
|
+
| [BoolArrayAsResultArray](xref:Qdk.Std.Convert.BoolArrayAsResultArray) | Converts a `Bool[]` type to a `Result[]` type, where `true` is mapped to `One` and `false` is mapped to `Zero`. |
|
|
21
|
+
| [BoolAsResult](xref:Qdk.Std.Convert.BoolAsResult) | Converts a `Bool` type to a `Result` type, where `true` is mapped to `One` and `false` is mapped to `Zero`. |
|
|
22
|
+
| [ComplexAsComplexPolar](xref:Qdk.Std.Convert.ComplexAsComplexPolar) | Converts a complex number of type `Complex` to a complex number of type `ComplexPolar`. |
|
|
23
|
+
| [ComplexPolarAsComplex](xref:Qdk.Std.Convert.ComplexPolarAsComplex) | Converts a complex number of type `ComplexPolar` to a complex number of type `Complex`. |
|
|
24
|
+
| [DoubleAsStringWithPrecision](xref:Qdk.Std.Convert.DoubleAsStringWithPrecision) | Converts a given double-precision floating-point number to a string representation with desired precision, rounding if required. |
|
|
25
|
+
| [IntAsBigInt](xref:Qdk.Std.Convert.IntAsBigInt) | Converts a given integer `number` to an equivalent big integer. |
|
|
26
|
+
| [IntAsBoolArray](xref:Qdk.Std.Convert.IntAsBoolArray) | Produces a binary representation of a non-negative integer, using the little-endian representation for the returned array. |
|
|
27
|
+
| [IntAsDouble](xref:Qdk.Std.Convert.IntAsDouble) | Converts a given integer `number` to an equivalent double-precision floating-point number. |
|
|
28
|
+
| [ResultArrayAsBoolArray](xref:Qdk.Std.Convert.ResultArrayAsBoolArray) | Converts a `Result[]` type to a `Bool[]` type, where `One` is mapped to `true` and `Zero` is mapped to `false`. |
|
|
29
|
+
| [ResultArrayAsInt](xref:Qdk.Std.Convert.ResultArrayAsInt) | Produces a non-negative integer from a string of Results in little-endian format. |
|
|
30
|
+
| [ResultAsBool](xref:Qdk.Std.Convert.ResultAsBool) | Converts a `Result` type to a `Bool` type, where `One` is mapped to `true` and `Zero` is mapped to `false`. |
|
package/docs/Std.Core/Length.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Core.Length
|
|
3
3
|
title: Length function
|
|
4
|
-
|
|
4
|
+
description: "Q# Length function: Returns the number of elements in the input array `a`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Core__
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
uid: Qdk.Std.Core.Repeated
|
|
3
3
|
title: Repeated function
|
|
4
|
-
|
|
4
|
+
description: "Q# Repeated function: Creates an array of given `length` with all elements equal to given `value`. `length` must be a non-negative integer."
|
|
5
|
+
ms.date: 11/15/2024
|
|
5
6
|
ms.topic: managed-reference
|
|
6
7
|
qsharp.kind: function
|
|
7
8
|
qsharp.package: __Core__
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Std.Core-toc
|
|
3
|
+
title: Std.Core namespace
|
|
4
|
+
description: Table of contents for the Q# Core namespace
|
|
5
|
+
author: {AUTHOR}
|
|
6
|
+
ms.author: {MS_AUTHOR}
|
|
7
|
+
ms.date: 11/15/2024
|
|
8
|
+
ms.topic: landing-page
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Std.Core
|
|
12
|
+
|
|
13
|
+
The Std.Core namespace contains the following items:
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| [Length](xref:Qdk.Std.Core.Length) | Returns the number of elements in the input array `a`. |
|
|
18
|
+
| [Repeated](xref:Qdk.Std.Core.Repeated) | Creates an array of given `length` with all elements equal to given `value`. `length` must be a non-negative integer. |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Std.Diagnostics.ApplyIdleNoise
|
|
3
|
+
title: ApplyIdleNoise operation
|
|
4
|
+
description: "Q# ApplyIdleNoise operation: Applies configured noise to a qubit."
|
|
5
|
+
ms.date: 11/15/2024
|
|
6
|
+
ms.topic: managed-reference
|
|
7
|
+
qsharp.kind: operation
|
|
8
|
+
qsharp.package: __Std__
|
|
9
|
+
qsharp.namespace: Std.Diagnostics
|
|
10
|
+
qsharp.name: ApplyIdleNoise
|
|
11
|
+
qsharp.summary: "Applies configured noise to a qubit."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# ApplyIdleNoise operation
|
|
15
|
+
|
|
16
|
+
Fully qualified name: Std.Diagnostics.ApplyIdleNoise
|
|
17
|
+
|
|
18
|
+
```qsharp
|
|
19
|
+
operation ApplyIdleNoise(qubit : Qubit) : Unit
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Summary
|
|
23
|
+
Applies configured noise to a qubit.
|
|
24
|
+
|
|
25
|
+
## Description
|
|
26
|
+
This operation applies configured noise to a qubit during simulation. For example,
|
|
27
|
+
if configured noise is a bit-flip noise with 5% probability, the X gate will be applied
|
|
28
|
+
with 5% probability. If no noise is configured, no noise is applied.
|
|
29
|
+
This is useful to simulate noise during idle periods. It could also be used to
|
|
30
|
+
apply noise immediately after qubit allocation.
|
|
31
|
+
|
|
32
|
+
## Input
|
|
33
|
+
### qubit
|
|
34
|
+
The qubit to which noise is applied.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
uid: Qdk.Std.Diagnostics.BitFlipNoise
|
|
3
|
+
title: BitFlipNoise function
|
|
4
|
+
description: "Q# BitFlipNoise function: The bit flip noise with probability `p`."
|
|
5
|
+
ms.date: 11/15/2024
|
|
6
|
+
ms.topic: managed-reference
|
|
7
|
+
qsharp.kind: function
|
|
8
|
+
qsharp.package: __Std__
|
|
9
|
+
qsharp.namespace: Std.Diagnostics
|
|
10
|
+
qsharp.name: BitFlipNoise
|
|
11
|
+
qsharp.summary: "The bit flip noise with probability `p`."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# BitFlipNoise function
|
|
15
|
+
|
|
16
|
+
Fully qualified name: Std.Diagnostics.BitFlipNoise
|
|
17
|
+
|
|
18
|
+
```qsharp
|
|
19
|
+
function BitFlipNoise(p : Double) : (Double, Double, Double)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Summary
|
|
23
|
+
The bit flip noise with probability `p`.
|