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.
Files changed (271) hide show
  1. package/dist/katas-content.generated.js +133 -122
  2. package/dist/language-service/language-service.d.ts +3 -1
  3. package/dist/language-service/language-service.js +3 -0
  4. package/dist/language-service/worker-proxy.js +1 -0
  5. package/docs/Microsoft.Quantum.Arrays/All.md +44 -0
  6. package/docs/Microsoft.Quantum.Arrays/Any.md +43 -0
  7. package/docs/Microsoft.Quantum.Arrays/Chunks.md +34 -0
  8. package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +46 -0
  9. package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +47 -0
  10. package/docs/Microsoft.Quantum.Arrays/Count.md +44 -0
  11. package/docs/Microsoft.Quantum.Arrays/Diagonal.md +43 -0
  12. package/docs/Microsoft.Quantum.Arrays/DrawMany.md +44 -0
  13. package/docs/Microsoft.Quantum.Arrays/Enumerated.md +45 -0
  14. package/docs/Microsoft.Quantum.Arrays/Excluding.md +47 -0
  15. package/docs/Microsoft.Quantum.Arrays/Filtered.md +44 -0
  16. package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +46 -0
  17. package/docs/Microsoft.Quantum.Arrays/Flattened.md +38 -0
  18. package/docs/Microsoft.Quantum.Arrays/Fold.md +47 -0
  19. package/docs/Microsoft.Quantum.Arrays/ForEach.md +43 -0
  20. package/docs/Microsoft.Quantum.Arrays/Head.md +32 -0
  21. package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +32 -0
  22. package/docs/Microsoft.Quantum.Arrays/IndexOf.md +40 -0
  23. package/docs/Microsoft.Quantum.Arrays/IndexRange.md +41 -0
  24. package/docs/Microsoft.Quantum.Arrays/Interleaved.md +49 -0
  25. package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +28 -0
  26. package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +42 -0
  27. package/docs/Microsoft.Quantum.Arrays/IsSorted.md +43 -0
  28. package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +42 -0
  29. package/docs/Microsoft.Quantum.Arrays/Mapped.md +43 -0
  30. package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +54 -0
  31. package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +48 -0
  32. package/docs/Microsoft.Quantum.Arrays/Most.md +34 -0
  33. package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +32 -0
  34. package/docs/Microsoft.Quantum.Arrays/Padded.md +50 -0
  35. package/docs/Microsoft.Quantum.Arrays/Partitioned.md +44 -0
  36. package/docs/Microsoft.Quantum.Arrays/Rest.md +34 -0
  37. package/docs/Microsoft.Quantum.Arrays/Reversed.md +34 -0
  38. package/docs/Microsoft.Quantum.Arrays/SequenceI.md +41 -0
  39. package/docs/Microsoft.Quantum.Arrays/SequenceL.md +41 -0
  40. package/docs/Microsoft.Quantum.Arrays/Sorted.md +52 -0
  41. package/docs/Microsoft.Quantum.Arrays/Subarray.md +51 -0
  42. package/docs/Microsoft.Quantum.Arrays/Swapped.md +40 -0
  43. package/docs/Microsoft.Quantum.Arrays/Tail.md +32 -0
  44. package/docs/Microsoft.Quantum.Arrays/Transposed.md +47 -0
  45. package/docs/Microsoft.Quantum.Arrays/Unzipped.md +46 -0
  46. package/docs/Microsoft.Quantum.Arrays/Where.md +36 -0
  47. package/docs/Microsoft.Quantum.Arrays/Windows.md +47 -0
  48. package/docs/Microsoft.Quantum.Arrays/Zipped.md +50 -0
  49. package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +35 -0
  50. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +42 -0
  51. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +41 -0
  52. package/docs/Microsoft.Quantum.Canon/ApplyP.md +39 -0
  53. package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +41 -0
  54. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +47 -0
  55. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +45 -0
  56. package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +34 -0
  57. package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +38 -0
  58. package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +43 -0
  59. package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +43 -0
  60. package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +43 -0
  61. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +31 -0
  62. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +31 -0
  63. package/docs/Microsoft.Quantum.Canon/CX.md +50 -0
  64. package/docs/Microsoft.Quantum.Canon/CY.md +44 -0
  65. package/docs/Microsoft.Quantum.Canon/CZ.md +44 -0
  66. package/docs/Microsoft.Quantum.Canon/Fst.md +20 -0
  67. package/docs/Microsoft.Quantum.Canon/Snd.md +20 -0
  68. package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +25 -0
  69. package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +36 -0
  70. package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +35 -0
  71. package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +25 -0
  72. package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +30 -0
  73. package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +30 -0
  74. package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +30 -0
  75. package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +30 -0
  76. package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +21 -0
  77. package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +36 -0
  78. package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +21 -0
  79. package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +30 -0
  80. package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +34 -0
  81. package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +30 -0
  82. package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +32 -0
  83. package/docs/Microsoft.Quantum.Core/Length.md +28 -0
  84. package/docs/Microsoft.Quantum.Core/RangeEnd.md +38 -0
  85. package/docs/Microsoft.Quantum.Core/RangeReverse.md +32 -0
  86. package/docs/Microsoft.Quantum.Core/RangeStart.md +36 -0
  87. package/docs/Microsoft.Quantum.Core/RangeStep.md +33 -0
  88. package/docs/Microsoft.Quantum.Core/Repeated.md +36 -0
  89. package/docs/Microsoft.Quantum.Diagnostics/CheckAllZero.md +18 -0
  90. package/docs/Microsoft.Quantum.Diagnostics/CheckOperationsAreEqual.md +47 -0
  91. package/docs/Microsoft.Quantum.Diagnostics/CheckZero.md +18 -0
  92. package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +18 -0
  93. package/docs/Microsoft.Quantum.Diagnostics/Fact.md +20 -0
  94. package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +35 -0
  95. package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +47 -0
  96. package/docs/Microsoft.Quantum.Intrinsic/Exp.md +40 -0
  97. package/docs/Microsoft.Quantum.Intrinsic/H.md +34 -0
  98. package/docs/Microsoft.Quantum.Intrinsic/I.md +25 -0
  99. package/docs/Microsoft.Quantum.Intrinsic/M.md +46 -0
  100. package/docs/Microsoft.Quantum.Intrinsic/Measure.md +56 -0
  101. package/docs/Microsoft.Quantum.Intrinsic/Message.md +30 -0
  102. package/docs/Microsoft.Quantum.Intrinsic/R.md +42 -0
  103. package/docs/Microsoft.Quantum.Intrinsic/R1.md +41 -0
  104. package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +57 -0
  105. package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +58 -0
  106. package/docs/Microsoft.Quantum.Intrinsic/Reset.md +27 -0
  107. package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +27 -0
  108. package/docs/Microsoft.Quantum.Intrinsic/Rx.md +44 -0
  109. package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +42 -0
  110. package/docs/Microsoft.Quantum.Intrinsic/Ry.md +44 -0
  111. package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +42 -0
  112. package/docs/Microsoft.Quantum.Intrinsic/Rz.md +44 -0
  113. package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +42 -0
  114. package/docs/Microsoft.Quantum.Intrinsic/S.md +36 -0
  115. package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +49 -0
  116. package/docs/Microsoft.Quantum.Intrinsic/T.md +36 -0
  117. package/docs/Microsoft.Quantum.Intrinsic/X.md +36 -0
  118. package/docs/Microsoft.Quantum.Intrinsic/Y.md +36 -0
  119. package/docs/Microsoft.Quantum.Intrinsic/Z.md +36 -0
  120. package/docs/Microsoft.Quantum.Logical/Xor.md +38 -0
  121. package/docs/Microsoft.Quantum.Math/AbsComplex.md +30 -0
  122. package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +30 -0
  123. package/docs/Microsoft.Quantum.Math/AbsD.md +21 -0
  124. package/docs/Microsoft.Quantum.Math/AbsI.md +21 -0
  125. package/docs/Microsoft.Quantum.Math/AbsL.md +20 -0
  126. package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +30 -0
  127. package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +30 -0
  128. package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +40 -0
  129. package/docs/Microsoft.Quantum.Math/ArcCos.md +21 -0
  130. package/docs/Microsoft.Quantum.Math/ArcCosh.md +21 -0
  131. package/docs/Microsoft.Quantum.Math/ArcSin.md +21 -0
  132. package/docs/Microsoft.Quantum.Math/ArcSinh.md +21 -0
  133. package/docs/Microsoft.Quantum.Math/ArcTan.md +21 -0
  134. package/docs/Microsoft.Quantum.Math/ArcTan2.md +21 -0
  135. package/docs/Microsoft.Quantum.Math/ArcTanh.md +21 -0
  136. package/docs/Microsoft.Quantum.Math/ArgComplex.md +30 -0
  137. package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +28 -0
  138. package/docs/Microsoft.Quantum.Math/Binom.md +34 -0
  139. package/docs/Microsoft.Quantum.Math/BitSizeI.md +23 -0
  140. package/docs/Microsoft.Quantum.Math/BitSizeL.md +23 -0
  141. package/docs/Microsoft.Quantum.Math/Ceiling.md +23 -0
  142. package/docs/Microsoft.Quantum.Math/Complex.md +31 -0
  143. package/docs/Microsoft.Quantum.Math/ComplexPolar.md +29 -0
  144. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +25 -0
  145. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +25 -0
  146. package/docs/Microsoft.Quantum.Math/Cos.md +21 -0
  147. package/docs/Microsoft.Quantum.Math/Cosh.md +21 -0
  148. package/docs/Microsoft.Quantum.Math/DivRemI.md +21 -0
  149. package/docs/Microsoft.Quantum.Math/DivRemL.md +21 -0
  150. package/docs/Microsoft.Quantum.Math/DividedByC.md +30 -0
  151. package/docs/Microsoft.Quantum.Math/DividedByCP.md +30 -0
  152. package/docs/Microsoft.Quantum.Math/E.md +28 -0
  153. package/docs/Microsoft.Quantum.Math/ExpModI.md +23 -0
  154. package/docs/Microsoft.Quantum.Math/ExpModL.md +23 -0
  155. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +23 -0
  156. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +23 -0
  157. package/docs/Microsoft.Quantum.Math/FactorialI.md +38 -0
  158. package/docs/Microsoft.Quantum.Math/FactorialL.md +32 -0
  159. package/docs/Microsoft.Quantum.Math/Floor.md +23 -0
  160. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +23 -0
  161. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +23 -0
  162. package/docs/Microsoft.Quantum.Math/HammingWeightI.md +21 -0
  163. package/docs/Microsoft.Quantum.Math/InverseModI.md +25 -0
  164. package/docs/Microsoft.Quantum.Math/InverseModL.md +25 -0
  165. package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +34 -0
  166. package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +34 -0
  167. package/docs/Microsoft.Quantum.Math/IsInfinite.md +49 -0
  168. package/docs/Microsoft.Quantum.Math/IsNaN.md +30 -0
  169. package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +31 -0
  170. package/docs/Microsoft.Quantum.Math/Lg.md +21 -0
  171. package/docs/Microsoft.Quantum.Math/Log.md +21 -0
  172. package/docs/Microsoft.Quantum.Math/Log10.md +21 -0
  173. package/docs/Microsoft.Quantum.Math/LogFactorialD.md +35 -0
  174. package/docs/Microsoft.Quantum.Math/LogGammaD.md +39 -0
  175. package/docs/Microsoft.Quantum.Math/LogOf2.md +24 -0
  176. package/docs/Microsoft.Quantum.Math/Max.md +28 -0
  177. package/docs/Microsoft.Quantum.Math/MaxD.md +21 -0
  178. package/docs/Microsoft.Quantum.Math/MaxI.md +21 -0
  179. package/docs/Microsoft.Quantum.Math/MaxL.md +21 -0
  180. package/docs/Microsoft.Quantum.Math/Min.md +28 -0
  181. package/docs/Microsoft.Quantum.Math/MinD.md +21 -0
  182. package/docs/Microsoft.Quantum.Math/MinI.md +21 -0
  183. package/docs/Microsoft.Quantum.Math/MinL.md +21 -0
  184. package/docs/Microsoft.Quantum.Math/MinusC.md +30 -0
  185. package/docs/Microsoft.Quantum.Math/MinusCP.md +30 -0
  186. package/docs/Microsoft.Quantum.Math/ModulusI.md +23 -0
  187. package/docs/Microsoft.Quantum.Math/ModulusL.md +23 -0
  188. package/docs/Microsoft.Quantum.Math/NegationC.md +28 -0
  189. package/docs/Microsoft.Quantum.Math/NegationCP.md +28 -0
  190. package/docs/Microsoft.Quantum.Math/PI.md +28 -0
  191. package/docs/Microsoft.Quantum.Math/PNorm.md +34 -0
  192. package/docs/Microsoft.Quantum.Math/PNormalized.md +39 -0
  193. package/docs/Microsoft.Quantum.Math/PlusC.md +30 -0
  194. package/docs/Microsoft.Quantum.Math/PlusCP.md +30 -0
  195. package/docs/Microsoft.Quantum.Math/PowC.md +32 -0
  196. package/docs/Microsoft.Quantum.Math/PowCP.md +32 -0
  197. package/docs/Microsoft.Quantum.Math/RealMod.md +38 -0
  198. package/docs/Microsoft.Quantum.Math/Round.md +23 -0
  199. package/docs/Microsoft.Quantum.Math/SignD.md +21 -0
  200. package/docs/Microsoft.Quantum.Math/SignI.md +21 -0
  201. package/docs/Microsoft.Quantum.Math/SignL.md +21 -0
  202. package/docs/Microsoft.Quantum.Math/Sin.md +21 -0
  203. package/docs/Microsoft.Quantum.Math/Sinh.md +21 -0
  204. package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +30 -0
  205. package/docs/Microsoft.Quantum.Math/Sqrt.md +21 -0
  206. package/docs/Microsoft.Quantum.Math/SquaredNorm.md +32 -0
  207. package/docs/Microsoft.Quantum.Math/Tan.md +21 -0
  208. package/docs/Microsoft.Quantum.Math/Tanh.md +21 -0
  209. package/docs/Microsoft.Quantum.Math/TimesC.md +30 -0
  210. package/docs/Microsoft.Quantum.Math/TimesCP.md +30 -0
  211. package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +23 -0
  212. package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +23 -0
  213. package/docs/Microsoft.Quantum.Math/Truncate.md +23 -0
  214. package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +28 -0
  215. package/docs/Microsoft.Quantum.Measurement/MResetX.md +37 -0
  216. package/docs/Microsoft.Quantum.Measurement/MResetY.md +37 -0
  217. package/docs/Microsoft.Quantum.Measurement/MResetZ.md +37 -0
  218. package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +36 -0
  219. package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +30 -0
  220. package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +36 -0
  221. package/docs/Microsoft.Quantum.Random/DrawRandomDouble.md +40 -0
  222. package/docs/Microsoft.Quantum.Random/DrawRandomInt.md +40 -0
  223. package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +35 -0
  224. package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +23 -0
  225. package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +39 -0
  226. package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +36 -0
  227. package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +23 -0
  228. package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +25 -0
  229. package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +22 -0
  230. package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +23 -0
  231. package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +25 -0
  232. package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +32 -0
  233. package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +23 -0
  234. package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +23 -0
  235. package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +23 -0
  236. package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +23 -0
  237. package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +29 -0
  238. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +23 -0
  239. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +25 -0
  240. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +23 -0
  241. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +25 -0
  242. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +23 -0
  243. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +25 -0
  244. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +23 -0
  245. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +25 -0
  246. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +23 -0
  247. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +25 -0
  248. package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +32 -0
  249. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +27 -0
  250. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +27 -0
  251. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +27 -0
  252. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +27 -0
  253. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +36 -0
  254. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +27 -0
  255. package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +36 -0
  256. package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +34 -0
  257. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +37 -0
  258. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +34 -0
  259. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +34 -0
  260. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +35 -0
  261. package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +68 -0
  262. package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +65 -0
  263. package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +53 -0
  264. package/docs/toc.yml +305 -0
  265. package/lib/node/qsc_wasm.cjs +40 -13
  266. package/lib/node/qsc_wasm.d.cts +15 -0
  267. package/lib/node/qsc_wasm_bg.wasm +0 -0
  268. package/lib/web/qsc_wasm.d.ts +17 -0
  269. package/lib/web/qsc_wasm.js +38 -11
  270. package/lib/web/qsc_wasm_bg.wasm +0 -0
  271. package/package.json +4 -2
@@ -0,0 +1,23 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.ApplyIfLessOrEqualL
3
+ title: ApplyIfLessOrEqualL 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.Unstable.Arithmetic
8
+ qsharp.name: ApplyIfLessOrEqualL
9
+ qsharp.summary: Computes `if (c <= x) { action(target) }`, that is, applies `action` to `target`
10
+ if a BigInt value `c` is less or equal to the little-endian qubit register `x`
11
+ ---
12
+
13
+ # ApplyIfLessOrEqualL operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
16
+
17
+ ```qsharp
18
+ operation ApplyIfLessOrEqualL<'T>(action : ('T => Unit is Adj + Ctl), c : BigInt, x : Qubit[], target : 'T) : Unit is Adj + Ctl
19
+ ```
20
+
21
+ ## Summary
22
+ Computes `if (c <= x) { action(target) }`, that is, applies `action` to `target`
23
+ if a BigInt value `c` is less or equal to the little-endian qubit register `x`
@@ -0,0 +1,25 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.ApplyIfLessOrEqualLE
3
+ title: ApplyIfLessOrEqualLE 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.Unstable.Arithmetic
8
+ qsharp.name: ApplyIfLessOrEqualLE
9
+ qsharp.summary: Computes `if x <= y { action(target) }`, that is, applies `action` to `target`
10
+ if register `x` is less or equal to the register `y`.
11
+ Both qubit registers should be in a little-endian format.
12
+ ---
13
+
14
+ # ApplyIfLessOrEqualLE operation
15
+
16
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
17
+
18
+ ```qsharp
19
+ operation ApplyIfLessOrEqualLE<'T>(action : ('T => Unit is Adj + Ctl), x : Qubit[], y : Qubit[], target : 'T) : Unit is Adj + Ctl
20
+ ```
21
+
22
+ ## Summary
23
+ Computes `if x <= y { action(target) }`, that is, applies `action` to `target`
24
+ if register `x` is less or equal to the register `y`.
25
+ Both qubit registers should be in a little-endian format.
@@ -0,0 +1,32 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.FourierTDIncByLE
3
+ title: FourierTDIncByLE 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.Unstable.Arithmetic
8
+ qsharp.name: FourierTDIncByLE
9
+ qsharp.summary: Increments a little-endian register ys by a little-endian register xs
10
+ using Quantum Fourier Transform.
11
+ ---
12
+
13
+ # FourierTDIncByLE operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
16
+
17
+ ```qsharp
18
+ operation FourierTDIncByLE(xs : Qubit[], ys : Qubit[]) : Unit is Adj + Ctl
19
+ ```
20
+
21
+ ## Summary
22
+ Increments a little-endian register ys by a little-endian register xs
23
+ using Quantum Fourier Transform.
24
+
25
+ ## Description
26
+ Computes ys += xs modulo 2ⁿ, where xs and ys are little-endian registers,
27
+ and Length(xs) = Length(ys) = n.
28
+ This operation uses Quantum Fourier Transform.
29
+
30
+ ## Reference
31
+ - [arXiv:quant-ph/0008033](https://arxiv.org/abs/quant-ph/0008033)
32
+ "Addition on a Quantum Computer" by Thomas G. Draper
@@ -0,0 +1,27 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.IncByI
3
+ title: IncByI 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.Unstable.Arithmetic
8
+ qsharp.name: IncByI
9
+ qsharp.summary: Increments a little-endian register ys by an integer number c
10
+ ---
11
+
12
+ # IncByI operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
15
+
16
+ ```qsharp
17
+ operation IncByI(c : Int, ys : Qubit[]) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ Increments a little-endian register ys by an integer number c
22
+
23
+ ## Description
24
+ Computes ys += c modulo 2ⁿ, where ys is a little-endian register,
25
+ Length(ys) = n > 0, c is a Int number, 0 ≤ c < 2ⁿ.
26
+ NOTE: Use IncByIUsingIncByLE directly if the choice of implementation
27
+ is important.
@@ -0,0 +1,27 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.IncByIUsingIncByLE
3
+ title: IncByIUsingIncByLE 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.Unstable.Arithmetic
8
+ qsharp.name: IncByIUsingIncByLE
9
+ qsharp.summary: Increments a little-endian register ys by an Int number c
10
+ using provided adder.
11
+ ---
12
+
13
+ # IncByIUsingIncByLE operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
16
+
17
+ ```qsharp
18
+ operation IncByIUsingIncByLE(adder : ((Qubit[], Qubit[]) => Unit is Adj + Ctl), c : Int, ys : Qubit[]) : Unit is Adj + Ctl
19
+ ```
20
+
21
+ ## Summary
22
+ Increments a little-endian register ys by an Int number c
23
+ using provided adder.
24
+
25
+ ## Description
26
+ Computes ys += c modulo 2ⁿ, where ys is a little-endian register
27
+ Length(ys) = n > 0, c is an Int number, 0 ≤ c < 2ⁿ.
@@ -0,0 +1,27 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.IncByL
3
+ title: IncByL 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.Unstable.Arithmetic
8
+ qsharp.name: IncByL
9
+ qsharp.summary: Increments a little-endian register ys by a BigInt number c
10
+ ---
11
+
12
+ # IncByL operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
15
+
16
+ ```qsharp
17
+ operation IncByL(c : BigInt, ys : Qubit[]) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ Increments a little-endian register ys by a BigInt number c
22
+
23
+ ## Description
24
+ Computes ys += c modulo 2ⁿ, where ys is a little-endian register,
25
+ Length(ys) = n > 0, c is a BigInt number, 0 ≤ c < 2ⁿ.
26
+ NOTE: Use IncByLUsingIncByLE directly if the choice of implementation
27
+ is important.
@@ -0,0 +1,27 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.IncByLE
3
+ title: IncByLE 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.Unstable.Arithmetic
8
+ qsharp.name: IncByLE
9
+ qsharp.summary: Increments a little-endian register ys by a little-endian register xs
10
+ ---
11
+
12
+ # IncByLE operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
15
+
16
+ ```qsharp
17
+ operation IncByLE(xs : Qubit[], ys : Qubit[]) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ Increments a little-endian register ys by a little-endian register xs
22
+
23
+ ## Description
24
+ Computes ys += xs modulo 2ⁿ, where xs and ys are little-endian registers,
25
+ and Length(xs) ≤ Length(ys) = n.
26
+ NOTE: Use operations like RippleCarryCGIncByLE directly if
27
+ the choice of implementation is important.
@@ -0,0 +1,36 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.IncByLEUsingAddLE
3
+ title: IncByLEUsingAddLE 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.Unstable.Arithmetic
8
+ qsharp.name: IncByLEUsingAddLE
9
+ qsharp.summary: Generic operation to turn two out-place adders into one in-place adder
10
+ ---
11
+
12
+ # IncByLEUsingAddLE operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
15
+
16
+ ```qsharp
17
+ operation IncByLEUsingAddLE(forwardAdder : ((Qubit[], Qubit[], Qubit[]) => Unit is Adj), backwardAdder : ((Qubit[], Qubit[], Qubit[]) => Unit is Adj), xs : Qubit[], ys : Qubit[]) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ Generic operation to turn two out-place adders into one in-place adder
22
+
23
+ ## Description
24
+ This implementation allows to specify two distinct adders for forward
25
+ and backward direction. The forward adder is always applied in its
26
+ body variant, whereas the backward adder is always applied in its adjoint
27
+ variant. Therefore, it's possible to, for example, use the ripple-carry
28
+ out-of-place adder in backwards direction to require no T gates.
29
+
30
+ The controlled variant is also optimized in a way that everything but
31
+ the adders is controlled,
32
+
33
+ ## Reference
34
+ - [arXiv:2012.01624](https://arxiv.org/abs/2012.01624)
35
+ "Quantum block lookahead adders and the wait for magic states"
36
+ by by Craig Gidney.
@@ -0,0 +1,27 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.IncByLUsingIncByLE
3
+ title: IncByLUsingIncByLE 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.Unstable.Arithmetic
8
+ qsharp.name: IncByLUsingIncByLE
9
+ qsharp.summary: Increments a little-endian register ys by a BigInt number c
10
+ using provided adder.
11
+ ---
12
+
13
+ # IncByLUsingIncByLE operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
16
+
17
+ ```qsharp
18
+ operation IncByLUsingIncByLE(adder : ((Qubit[], Qubit[]) => Unit is Adj + Ctl), c : BigInt, ys : Qubit[]) : Unit is Adj + Ctl
19
+ ```
20
+
21
+ ## Summary
22
+ Increments a little-endian register ys by a BigInt number c
23
+ using provided adder.
24
+
25
+ ## Description
26
+ Computes ys += c modulo 2ⁿ, where ys is a little-endian register
27
+ Length(ys) = n > 0, c is a BigInt number, 0 ≤ c < 2ⁿ.
@@ -0,0 +1,36 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.LookAheadDKRSAddLE
3
+ title: LookAheadDKRSAddLE 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.Unstable.Arithmetic
8
+ qsharp.name: LookAheadDKRSAddLE
9
+ qsharp.summary: Sets a zero-initialized little-endian register zs to the sum of
10
+ little-endian registers xs and ys using the carry-lookahead algorithm.
11
+ ---
12
+
13
+ # LookAheadDKRSAddLE operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
16
+
17
+ ```qsharp
18
+ operation LookAheadDKRSAddLE(xs : Qubit[], ys : Qubit[], zs : Qubit[]) : Unit is Adj
19
+ ```
20
+
21
+ ## Summary
22
+ Sets a zero-initialized little-endian register zs to the sum of
23
+ little-endian registers xs and ys using the carry-lookahead algorithm.
24
+
25
+ ## Description
26
+ Computes zs := xs + ys + zs[0] modulo 2ⁿ, where xs, ys, and zs are
27
+ little-endian registers, Length(xs) = Length(ys) ≤ Length(zs) = n,
28
+ assuming zs is 0-initialized, except for maybe zs[0], which can be
29
+ in |0> or |1> state and can be used as carry-in.
30
+ NOTE: `zs[Length(xs)]` can be used as carry-out, if `zs` is longer than `xs`.
31
+ This operation uses the carry-lookahead algorithm.
32
+
33
+ ## Reference
34
+ - [arXiv:quant-ph/0406142](https://arxiv.org/abs/quant-ph/0406142)
35
+ "A logarithmic-depth quantum carry-lookahead adder" by
36
+ Thomas G. Draper, Samuel A. Kutin, Eric M. Rains, Krysta M. Svore
@@ -0,0 +1,34 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.MAJ
3
+ title: MAJ 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.Unstable.Arithmetic
8
+ qsharp.name: MAJ
9
+ qsharp.summary: This applies the in-place majority operation to 3 qubits.
10
+ ---
11
+
12
+ # MAJ operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
15
+
16
+ ```qsharp
17
+ operation MAJ(x : Qubit, y : Qubit, z : Qubit) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ This applies the in-place majority operation to 3 qubits.
22
+
23
+ ## Description
24
+ Assuming the state of the input qubits are |x⟩, |y⟩ and |z⟩, then
25
+ this operation performs the following transformation:
26
+ |x⟩|y⟩|z⟩ ↦ |x ⊕ z⟩|y ⊕ z⟩MAJ(x, y, z).
27
+
28
+ ## Input
29
+ ### x
30
+ The first input qubit.
31
+ ### y
32
+ The second input qubit.
33
+ ### z
34
+ A qubit onto which the majority function will be applied.
@@ -0,0 +1,37 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.ReflectAboutInteger
3
+ title: ReflectAboutInteger 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.Unstable.Arithmetic
8
+ qsharp.name: ReflectAboutInteger
9
+ qsharp.summary: Reflects a quantum register about a given classical integer.
10
+ ---
11
+
12
+ # ReflectAboutInteger operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
15
+
16
+ ```qsharp
17
+ operation ReflectAboutInteger(index : Int, reg : Qubit[]) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ Reflects a quantum register about a given classical integer.
22
+
23
+ ## Description
24
+ Given a quantum register initially in the state ∑ᵢ(αᵢ|i⟩),
25
+ where each |i⟩ is a basis state representing an integer i,
26
+ reflects the state of the register about the basis state |j⟩
27
+ for a given integer j: ∑ᵢ(-1)^(δᵢⱼ)(αᵢ|i⟩)
28
+
29
+ ## Input
30
+ ### index
31
+ The classical integer j indexing the basis state about which to reflect.
32
+ ### reg
33
+ Little-endian quantum register to reflect.
34
+
35
+ ## Remarks
36
+ This operation is implemented in-place, without explicit allocation of
37
+ additional auxiliary qubits.
@@ -0,0 +1,34 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.RippleCarryCGAddLE
3
+ title: RippleCarryCGAddLE 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.Unstable.Arithmetic
8
+ qsharp.name: RippleCarryCGAddLE
9
+ qsharp.summary: Sets a zero-initialized little-endian register zs to the sum of
10
+ little-endian registers xs and ys using the ripple-carry algorithm.
11
+ ---
12
+
13
+ # RippleCarryCGAddLE operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
16
+
17
+ ```qsharp
18
+ operation RippleCarryCGAddLE(xs : Qubit[], ys : Qubit[], zs : Qubit[]) : Unit is Adj
19
+ ```
20
+
21
+ ## Summary
22
+ Sets a zero-initialized little-endian register zs to the sum of
23
+ little-endian registers xs and ys using the ripple-carry algorithm.
24
+
25
+ ## Description
26
+ Computes zs := xs + ys + zs[0] modulo 2ⁿ, where xs, ys, and zs are
27
+ little-endian registers, Length(xs) = Length(ys) ≤ Length(zs) = n,
28
+ assuming zs is 0-initialized, except for maybe zs[0], which can be
29
+ This operation uses the ripple-carry algorithm.
30
+ NOTE: `zs[Length(xs)]` can be used as carry-out, if `zs` is longer than `xs`.
31
+
32
+ ## Reference
33
+ - [arXiv:1709.06648](https://arxiv.org/pdf/1709.06648.pdf)
34
+ "Halving the cost of quantum addition" by Craig Gidney.
@@ -0,0 +1,34 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.RippleCarryCGIncByLE
3
+ title: RippleCarryCGIncByLE 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.Unstable.Arithmetic
8
+ qsharp.name: RippleCarryCGIncByLE
9
+ qsharp.summary: Increments a little-endian register ys by a little-endian register xs
10
+ using the ripple-carry algorithm.
11
+ ---
12
+
13
+ # RippleCarryCGIncByLE operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
16
+
17
+ ```qsharp
18
+ operation RippleCarryCGIncByLE(xs : Qubit[], ys : Qubit[]) : Unit is Adj + Ctl
19
+ ```
20
+
21
+ ## Summary
22
+ Increments a little-endian register ys by a little-endian register xs
23
+ using the ripple-carry algorithm.
24
+
25
+ ## Description
26
+ Computes ys += xs modulo 2ⁿ, where xs and ys are little-endian registers,
27
+ and Length(xs) ≤ Length(ys) = n.
28
+ Note that if Length(xs) != Length(ys), xs is padded with 0-initialized
29
+ qubits to match ys's length.
30
+ This operation uses the ripple-carry algorithm.
31
+
32
+ ## Reference
33
+ - [arXiv:1709.06648](https://arxiv.org/pdf/1709.06648.pdf)
34
+ "Halving the cost of quantum addition" by Craig Gidney.
@@ -0,0 +1,35 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.Arithmetic.RippleCarryTTKIncByLE
3
+ title: RippleCarryTTKIncByLE 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.Unstable.Arithmetic
8
+ qsharp.name: RippleCarryTTKIncByLE
9
+ qsharp.summary: Reversible, in-place ripple-carry addition of two integers.
10
+ ---
11
+
12
+ # RippleCarryTTKIncByLE operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.Arithmetic](xref:Microsoft.Quantum.Unstable.Arithmetic)
15
+
16
+ ```qsharp
17
+ operation RippleCarryTTKIncByLE(xs : Qubit[], ys : Qubit[]) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ Reversible, in-place ripple-carry addition of two integers.
22
+
23
+ ## Description
24
+ Computes ys += xs modulo 2ⁿ, where xs and ys are little-endian registers,
25
+ and Length(xs) ≤ Length(ys) = n.
26
+ This operation uses the ripple-carry algorithm.
27
+ Note that if Length(ys) >= Length(xs)+2, xs is padded with 0-initialized
28
+ qubits to match ys's length. The operation doesn't use any auxilliary
29
+ qubits otherwise.
30
+
31
+ ## References
32
+ - [arXiv:0910.2530](https://arxiv.org/abs/0910.2530)
33
+ "Quantum Addition Circuits and Unbounded Fan-Out"
34
+ by Yasuhiro Takahashi, Seiichiro Tani, Noboru Kunihiro
35
+
@@ -0,0 +1,68 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.StatePreparation.ApproximatelyPreparePureStateCP
3
+ title: ApproximatelyPreparePureStateCP 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.Unstable.StatePreparation
8
+ qsharp.name: ApproximatelyPreparePureStateCP
9
+ qsharp.summary: Given a set of coefficients and a big-endian quantum register,
10
+ prepares a state on that register described by the given coefficients,
11
+ up to a given approximation tolerance.
12
+ ---
13
+
14
+ # ApproximatelyPreparePureStateCP operation
15
+
16
+ Namespace: [Microsoft.Quantum.Unstable.StatePreparation](xref:Microsoft.Quantum.Unstable.StatePreparation)
17
+
18
+ ```qsharp
19
+ operation ApproximatelyPreparePureStateCP(tolerance : Double, coefficients : ComplexPolar[], qubits : Qubit[]) : Unit is Adj + Ctl
20
+ ```
21
+
22
+ ## Summary
23
+ Given a set of coefficients and a big-endian quantum register,
24
+ prepares a state on that register described by the given coefficients,
25
+ up to a given approximation tolerance.
26
+
27
+ ## Description
28
+ This operation prepares an arbitrary quantum
29
+ state |𝜓⟩ with complex coefficients rⱼ·𝒆^(𝒊·tⱼ) from
30
+ the n-qubit computational basis state |0...0⟩.
31
+ In particular, the action of this operation can be simulated by the
32
+ a unitary transformation U which acts on the all-zeros state as
33
+
34
+ $$
35
+ \begin{align}
36
+ U\ket{0...0}
37
+ & = \ket{\psi} \\\\
38
+ & = \frac{
39
+ \sum_{j=0}^{2^n-1} r_j e^{i t_j} \ket{j}
40
+ }{
41
+ \sqrt{\sum_{j=0}^{2^n-1} |r_j|^2}
42
+ }.
43
+ \end{align}
44
+ $$
45
+
46
+ ## Input
47
+ ### tolerance
48
+ The approximation tolerance to be used when preparing the given state.
49
+
50
+ ### coefficients
51
+ Array of up to 2ⁿ complex coefficients represented by their
52
+ absolute value and phase (rⱼ, tⱼ). The j-th coefficient
53
+ indexes the number state |j⟩ encoded in a big-endian format.
54
+
55
+ ### qubits
56
+ Qubit register encoding number states in a big-endian format. This is
57
+ expected to be initialized in the computational basis state
58
+ |0...0⟩.
59
+
60
+ ## Remarks
61
+ `coefficients` will be padded with
62
+ elements (rⱼ, tⱼ) = (0.0, 0.0) if fewer than 2ⁿ are
63
+ specified.
64
+
65
+ ## References
66
+ - Synthesis of Quantum Logic Circuits
67
+ Vivek V. Shende, Stephen S. Bullock, Igor L. Markov
68
+ https://arxiv.org/abs/quant-ph/0406176
@@ -0,0 +1,65 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.StatePreparation.PreparePureStateD
3
+ title: PreparePureStateD 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.Unstable.StatePreparation
8
+ qsharp.name: PreparePureStateD
9
+ qsharp.summary: Given a set of coefficients and a big-endian quantum register,
10
+ prepares a state on that register described by the given coefficients.
11
+ ---
12
+
13
+ # PreparePureStateD operation
14
+
15
+ Namespace: [Microsoft.Quantum.Unstable.StatePreparation](xref:Microsoft.Quantum.Unstable.StatePreparation)
16
+
17
+ ```qsharp
18
+ operation PreparePureStateD(coefficients : Double[], qubits : Qubit[]) : Unit is Adj + Ctl
19
+ ```
20
+
21
+ ## Summary
22
+ Given a set of coefficients and a big-endian quantum register,
23
+ prepares a state on that register described by the given coefficients.
24
+
25
+ ## Description
26
+ This operation prepares an arbitrary quantum
27
+ state |𝜓⟩ with coefficients 𝑎ⱼ from
28
+ the n-qubit computational basis state |0...0⟩.
29
+
30
+ The action of U on the all-zeros state is given by
31
+ $$
32
+ \begin{align}
33
+ U \ket{0\cdots 0} = \ket{\psi} = \frac{\sum_{j=0}^{2^n-1}\alpha_j \ket{j}}{\sqrt{\sum_{j=0}^{2^n-1}|\alpha_j|^2}}.
34
+ \end{align}
35
+ $$
36
+
37
+ ## Input
38
+ ### coefficients
39
+ Array of up to 2ⁿ real coefficients. The j-th coefficient
40
+ indexes the number state |j⟩ encoded in big-endian format.
41
+
42
+ ### qubits
43
+ Qubit register encoding number states in a big-endian format. This is
44
+ expected to be initialized in the computational basis state |0...0⟩.
45
+
46
+ ## Remarks
47
+ `coefficients` will be normalized and padded with
48
+ elements 𝑎ⱼ = 0.0 if fewer than 2ⁿ are specified.
49
+
50
+ ## Example
51
+ The following snippet prepares the quantum state |𝜓⟩=√(1/8)|0⟩+√(7/8)|2⟩=√(1/8)|00⟩+√(7/8)|10⟩
52
+ in the qubit register `qubits`.
53
+ ```qsharp
54
+ let amplitudes = [Sqrt(0.125), 0.0, Sqrt(0.875), 0.0];
55
+ use qubits = Qubit[2];
56
+ PreparePureStateD(amplitudes, qubits);
57
+ ```
58
+
59
+ ## References
60
+ - Synthesis of Quantum Logic Circuits
61
+ Vivek V. Shende, Stephen S. Bullock, Igor L. Markov
62
+ https://arxiv.org/abs/quant-ph/0406176
63
+
64
+ ## See Also
65
+ - Microsoft.Quantum.Unstable.StatePreparation.ApproximatelyPreparePureStateCP
@@ -0,0 +1,53 @@
1
+ ---
2
+ uid: Microsoft.Quantum.Unstable.TableLookup.Select
3
+ title: Select 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.Unstable.TableLookup
8
+ qsharp.name: Select
9
+ qsharp.summary: Performs table lookup using a SELECT network
10
+ ---
11
+
12
+ # Select operation
13
+
14
+ Namespace: [Microsoft.Quantum.Unstable.TableLookup](xref:Microsoft.Quantum.Unstable.TableLookup)
15
+
16
+ ```qsharp
17
+ operation Select(data : Bool[][], address : Qubit[], target : Qubit[]) : Unit is Adj + Ctl
18
+ ```
19
+
20
+ ## Summary
21
+ Performs table lookup using a SELECT network
22
+
23
+ ## Description
24
+ Assuming a zero-initialized `target` register, this operation will
25
+ initialize it with the bitstrings in `data` at indices according to the
26
+ computational values of the `address` register.
27
+
28
+ ## Input
29
+ ### data
30
+ The classical table lookup data which is prepared in `target` with
31
+ respect to the state in `address`. The length of data must be less than
32
+ 2ⁿ, where 𝑛 is the length of `address`. Each entry in data must have
33
+ the same length that must be equal to the length of `target`.
34
+ ### address
35
+ Address register
36
+ ### target
37
+ Zero-initialized target register
38
+
39
+ ## Remarks
40
+ The implementation of the SELECT network is based on unary encoding as
41
+ presented in [1]. The recursive implementation of that algorithm is
42
+ presented in [3]. The adjoint variant is optimized using a
43
+ measurement-based unlookup operation [3]. The controlled adjoint variant
44
+ is not optimized using this technique.
45
+
46
+ ## References
47
+ [1] [arXiv:1805.03662](https://arxiv.org/abs/1805.03662)
48
+ "Encoding Electronic Spectra in Quantum Circuits with Linear T
49
+ Complexity"
50
+ [2] [arXiv:1905.07682](https://arxiv.org/abs/1905.07682)
51
+ "Windowed arithmetic"
52
+ [3] [arXiv:2211.01133](https://arxiv.org/abs/2211.01133)
53
+ "Space-time optimized table lookup"