qsharp-lang 1.3.6-dev → 1.4.1-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 (276) hide show
  1. package/dist/compiler/compiler.d.ts +4 -4
  2. package/dist/compiler/compiler.js +4 -4
  3. package/dist/katas-content.generated.js +2078 -496
  4. package/dist/samples.generated.js +3 -3
  5. package/docs/Microsoft.Quantum.Arrays/All.md +1 -1
  6. package/docs/Microsoft.Quantum.Arrays/Any.md +1 -1
  7. package/docs/Microsoft.Quantum.Arrays/Chunks.md +1 -1
  8. package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +1 -1
  9. package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +1 -1
  10. package/docs/Microsoft.Quantum.Arrays/Count.md +2 -2
  11. package/docs/Microsoft.Quantum.Arrays/Diagonal.md +1 -1
  12. package/docs/Microsoft.Quantum.Arrays/DrawMany.md +1 -1
  13. package/docs/Microsoft.Quantum.Arrays/Enumerated.md +1 -1
  14. package/docs/Microsoft.Quantum.Arrays/Excluding.md +1 -1
  15. package/docs/Microsoft.Quantum.Arrays/Filtered.md +1 -1
  16. package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +1 -1
  17. package/docs/Microsoft.Quantum.Arrays/Flattened.md +1 -1
  18. package/docs/Microsoft.Quantum.Arrays/Fold.md +1 -1
  19. package/docs/Microsoft.Quantum.Arrays/ForEach.md +1 -1
  20. package/docs/Microsoft.Quantum.Arrays/Head.md +1 -1
  21. package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +1 -1
  22. package/docs/Microsoft.Quantum.Arrays/IndexOf.md +1 -1
  23. package/docs/Microsoft.Quantum.Arrays/IndexRange.md +1 -1
  24. package/docs/Microsoft.Quantum.Arrays/Interleaved.md +1 -1
  25. package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +1 -1
  26. package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +1 -1
  27. package/docs/Microsoft.Quantum.Arrays/IsSorted.md +1 -1
  28. package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +1 -1
  29. package/docs/Microsoft.Quantum.Arrays/Mapped.md +1 -1
  30. package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +1 -1
  31. package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +1 -1
  32. package/docs/Microsoft.Quantum.Arrays/Most.md +1 -1
  33. package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +1 -1
  34. package/docs/Microsoft.Quantum.Arrays/Padded.md +1 -1
  35. package/docs/Microsoft.Quantum.Arrays/Partitioned.md +1 -1
  36. package/docs/Microsoft.Quantum.Arrays/Rest.md +1 -1
  37. package/docs/Microsoft.Quantum.Arrays/Reversed.md +1 -1
  38. package/docs/Microsoft.Quantum.Arrays/SequenceI.md +1 -1
  39. package/docs/Microsoft.Quantum.Arrays/SequenceL.md +1 -1
  40. package/docs/Microsoft.Quantum.Arrays/Sorted.md +1 -1
  41. package/docs/Microsoft.Quantum.Arrays/Subarray.md +1 -1
  42. package/docs/Microsoft.Quantum.Arrays/Swapped.md +1 -1
  43. package/docs/Microsoft.Quantum.Arrays/Tail.md +1 -1
  44. package/docs/Microsoft.Quantum.Arrays/Transposed.md +1 -1
  45. package/docs/Microsoft.Quantum.Arrays/Unzipped.md +1 -1
  46. package/docs/Microsoft.Quantum.Arrays/Where.md +1 -1
  47. package/docs/Microsoft.Quantum.Arrays/Windows.md +1 -1
  48. package/docs/Microsoft.Quantum.Arrays/Zipped.md +1 -1
  49. package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +1 -1
  50. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +23 -12
  51. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +1 -1
  52. package/docs/Microsoft.Quantum.Canon/ApplyP.md +1 -1
  53. package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +1 -1
  54. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +1 -1
  55. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +1 -1
  56. package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +1 -1
  57. package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +1 -1
  58. package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +1 -1
  59. package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +1 -1
  60. package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +1 -1
  61. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +1 -1
  62. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +1 -1
  63. package/docs/Microsoft.Quantum.Canon/CX.md +1 -1
  64. package/docs/Microsoft.Quantum.Canon/CY.md +7 -5
  65. package/docs/Microsoft.Quantum.Canon/CZ.md +7 -5
  66. package/docs/Microsoft.Quantum.Canon/Fst.md +1 -1
  67. package/docs/Microsoft.Quantum.Canon/Snd.md +1 -1
  68. package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +1 -1
  69. package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +1 -1
  70. package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +1 -1
  71. package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +4 -3
  72. package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +1 -1
  73. package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +1 -1
  74. package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +1 -1
  75. package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +1 -1
  76. package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +3 -3
  77. package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +1 -1
  78. package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +17 -3
  79. package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +1 -1
  80. package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +1 -1
  81. package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +1 -1
  82. package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +1 -1
  83. package/docs/Microsoft.Quantum.Core/Length.md +9 -4
  84. package/docs/Microsoft.Quantum.Core/RangeEnd.md +1 -1
  85. package/docs/Microsoft.Quantum.Core/RangeReverse.md +1 -1
  86. package/docs/Microsoft.Quantum.Core/RangeStart.md +6 -1
  87. package/docs/Microsoft.Quantum.Core/RangeStep.md +1 -1
  88. package/docs/Microsoft.Quantum.Core/Repeated.md +11 -4
  89. package/docs/Microsoft.Quantum.Diagnostics/CheckAllZero.md +1 -1
  90. package/docs/Microsoft.Quantum.Diagnostics/CheckOperationsAreEqual.md +1 -1
  91. package/docs/Microsoft.Quantum.Diagnostics/CheckZero.md +1 -1
  92. package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +1 -1
  93. package/docs/Microsoft.Quantum.Diagnostics/DumpRegister.md +1 -1
  94. package/docs/Microsoft.Quantum.Diagnostics/Fact.md +1 -1
  95. package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +1 -1
  96. package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +1 -1
  97. package/docs/Microsoft.Quantum.Intrinsic/Exp.md +1 -1
  98. package/docs/Microsoft.Quantum.Intrinsic/H.md +1 -1
  99. package/docs/Microsoft.Quantum.Intrinsic/I.md +1 -1
  100. package/docs/Microsoft.Quantum.Intrinsic/M.md +1 -1
  101. package/docs/Microsoft.Quantum.Intrinsic/Measure.md +1 -1
  102. package/docs/Microsoft.Quantum.Intrinsic/Message.md +1 -1
  103. package/docs/Microsoft.Quantum.Intrinsic/R.md +1 -1
  104. package/docs/Microsoft.Quantum.Intrinsic/R1.md +1 -1
  105. package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +1 -1
  106. package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +1 -1
  107. package/docs/Microsoft.Quantum.Intrinsic/Reset.md +1 -1
  108. package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +1 -1
  109. package/docs/Microsoft.Quantum.Intrinsic/Rx.md +1 -1
  110. package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +1 -1
  111. package/docs/Microsoft.Quantum.Intrinsic/Ry.md +1 -1
  112. package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +1 -1
  113. package/docs/Microsoft.Quantum.Intrinsic/Rz.md +1 -1
  114. package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +1 -1
  115. package/docs/Microsoft.Quantum.Intrinsic/S.md +1 -1
  116. package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +1 -1
  117. package/docs/Microsoft.Quantum.Intrinsic/T.md +1 -1
  118. package/docs/Microsoft.Quantum.Intrinsic/X.md +1 -1
  119. package/docs/Microsoft.Quantum.Intrinsic/Y.md +1 -1
  120. package/docs/Microsoft.Quantum.Intrinsic/Z.md +1 -1
  121. package/docs/Microsoft.Quantum.Logical/Xor.md +7 -4
  122. package/docs/Microsoft.Quantum.Math/AbsComplex.md +1 -1
  123. package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +1 -1
  124. package/docs/Microsoft.Quantum.Math/AbsD.md +1 -1
  125. package/docs/Microsoft.Quantum.Math/AbsI.md +1 -1
  126. package/docs/Microsoft.Quantum.Math/AbsL.md +1 -1
  127. package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +1 -1
  128. package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +1 -1
  129. package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +1 -1
  130. package/docs/Microsoft.Quantum.Math/ArcCos.md +1 -1
  131. package/docs/Microsoft.Quantum.Math/ArcCosh.md +1 -1
  132. package/docs/Microsoft.Quantum.Math/ArcSin.md +1 -1
  133. package/docs/Microsoft.Quantum.Math/ArcSinh.md +1 -1
  134. package/docs/Microsoft.Quantum.Math/ArcTan.md +1 -1
  135. package/docs/Microsoft.Quantum.Math/ArcTan2.md +1 -1
  136. package/docs/Microsoft.Quantum.Math/ArcTanh.md +1 -1
  137. package/docs/Microsoft.Quantum.Math/ArgComplex.md +1 -1
  138. package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +1 -1
  139. package/docs/Microsoft.Quantum.Math/Binom.md +1 -1
  140. package/docs/Microsoft.Quantum.Math/BitSizeI.md +1 -1
  141. package/docs/Microsoft.Quantum.Math/BitSizeL.md +1 -1
  142. package/docs/Microsoft.Quantum.Math/Ceiling.md +1 -1
  143. package/docs/Microsoft.Quantum.Math/Complex.md +1 -1
  144. package/docs/Microsoft.Quantum.Math/ComplexPolar.md +1 -1
  145. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +1 -1
  146. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +1 -1
  147. package/docs/Microsoft.Quantum.Math/Cos.md +1 -1
  148. package/docs/Microsoft.Quantum.Math/Cosh.md +1 -1
  149. package/docs/Microsoft.Quantum.Math/DivRemI.md +1 -1
  150. package/docs/Microsoft.Quantum.Math/DivRemL.md +1 -1
  151. package/docs/Microsoft.Quantum.Math/DividedByC.md +1 -1
  152. package/docs/Microsoft.Quantum.Math/DividedByCP.md +1 -1
  153. package/docs/Microsoft.Quantum.Math/E.md +10 -6
  154. package/docs/Microsoft.Quantum.Math/ExpModI.md +1 -1
  155. package/docs/Microsoft.Quantum.Math/ExpModL.md +1 -1
  156. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +1 -1
  157. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +1 -1
  158. package/docs/Microsoft.Quantum.Math/FactorialI.md +1 -1
  159. package/docs/Microsoft.Quantum.Math/FactorialL.md +1 -1
  160. package/docs/Microsoft.Quantum.Math/Floor.md +1 -1
  161. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +1 -1
  162. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +1 -1
  163. package/docs/Microsoft.Quantum.Math/HammingWeightI.md +1 -1
  164. package/docs/Microsoft.Quantum.Math/InverseModI.md +1 -1
  165. package/docs/Microsoft.Quantum.Math/InverseModL.md +1 -1
  166. package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +1 -1
  167. package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +1 -1
  168. package/docs/Microsoft.Quantum.Math/IsInfinite.md +1 -1
  169. package/docs/Microsoft.Quantum.Math/IsNaN.md +1 -1
  170. package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +1 -1
  171. package/docs/Microsoft.Quantum.Math/Lg.md +1 -1
  172. package/docs/Microsoft.Quantum.Math/Log.md +1 -1
  173. package/docs/Microsoft.Quantum.Math/Log10.md +1 -1
  174. package/docs/Microsoft.Quantum.Math/LogFactorialD.md +1 -1
  175. package/docs/Microsoft.Quantum.Math/LogGammaD.md +1 -1
  176. package/docs/Microsoft.Quantum.Math/LogOf2.md +9 -5
  177. package/docs/Microsoft.Quantum.Math/Max.md +1 -1
  178. package/docs/Microsoft.Quantum.Math/MaxD.md +1 -1
  179. package/docs/Microsoft.Quantum.Math/MaxI.md +1 -1
  180. package/docs/Microsoft.Quantum.Math/MaxL.md +1 -1
  181. package/docs/Microsoft.Quantum.Math/Min.md +1 -1
  182. package/docs/Microsoft.Quantum.Math/MinD.md +1 -1
  183. package/docs/Microsoft.Quantum.Math/MinI.md +1 -1
  184. package/docs/Microsoft.Quantum.Math/MinL.md +1 -1
  185. package/docs/Microsoft.Quantum.Math/MinusC.md +1 -1
  186. package/docs/Microsoft.Quantum.Math/MinusCP.md +1 -1
  187. package/docs/Microsoft.Quantum.Math/ModulusI.md +1 -1
  188. package/docs/Microsoft.Quantum.Math/ModulusL.md +1 -1
  189. package/docs/Microsoft.Quantum.Math/NegationC.md +1 -1
  190. package/docs/Microsoft.Quantum.Math/NegationCP.md +1 -1
  191. package/docs/Microsoft.Quantum.Math/PI.md +11 -6
  192. package/docs/Microsoft.Quantum.Math/PNorm.md +1 -1
  193. package/docs/Microsoft.Quantum.Math/PNormalized.md +1 -1
  194. package/docs/Microsoft.Quantum.Math/PlusC.md +1 -1
  195. package/docs/Microsoft.Quantum.Math/PlusCP.md +1 -1
  196. package/docs/Microsoft.Quantum.Math/PowC.md +1 -1
  197. package/docs/Microsoft.Quantum.Math/PowCP.md +1 -1
  198. package/docs/Microsoft.Quantum.Math/RealMod.md +1 -1
  199. package/docs/Microsoft.Quantum.Math/Round.md +3 -3
  200. package/docs/Microsoft.Quantum.Math/SignD.md +1 -1
  201. package/docs/Microsoft.Quantum.Math/SignI.md +1 -1
  202. package/docs/Microsoft.Quantum.Math/SignL.md +1 -1
  203. package/docs/Microsoft.Quantum.Math/Sin.md +1 -1
  204. package/docs/Microsoft.Quantum.Math/Sinh.md +1 -1
  205. package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +1 -1
  206. package/docs/Microsoft.Quantum.Math/Sqrt.md +1 -1
  207. package/docs/Microsoft.Quantum.Math/SquaredNorm.md +1 -1
  208. package/docs/Microsoft.Quantum.Math/Tan.md +1 -1
  209. package/docs/Microsoft.Quantum.Math/Tanh.md +1 -1
  210. package/docs/Microsoft.Quantum.Math/TimesC.md +1 -1
  211. package/docs/Microsoft.Quantum.Math/TimesCP.md +1 -1
  212. package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +1 -1
  213. package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +1 -1
  214. package/docs/Microsoft.Quantum.Math/Truncate.md +1 -1
  215. package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +6 -1
  216. package/docs/Microsoft.Quantum.Measurement/MResetX.md +1 -1
  217. package/docs/Microsoft.Quantum.Measurement/MResetY.md +1 -1
  218. package/docs/Microsoft.Quantum.Measurement/MResetZ.md +1 -1
  219. package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +7 -6
  220. package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +19 -3
  221. package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +1 -1
  222. package/docs/Microsoft.Quantum.Random/DrawRandomDouble.md +4 -6
  223. package/docs/Microsoft.Quantum.Random/DrawRandomInt.md +4 -6
  224. package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +1 -1
  225. package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +1 -1
  226. package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +1 -1
  227. package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +1 -2
  228. package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +1 -1
  229. package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +1 -1
  230. package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +1 -2
  231. package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +1 -1
  232. package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +1 -1
  233. package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +1 -2
  234. package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +1 -1
  235. package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +1 -1
  236. package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +1 -1
  237. package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +1 -1
  238. package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +1 -1
  239. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +1 -1
  240. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +1 -1
  241. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +1 -1
  242. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +1 -1
  243. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +1 -1
  244. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +1 -1
  245. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +1 -1
  246. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +1 -1
  247. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +1 -1
  248. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +1 -1
  249. package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +3 -3
  250. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +1 -1
  251. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +1 -1
  252. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +1 -1
  253. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +1 -1
  254. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +4 -4
  255. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +1 -1
  256. package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +4 -4
  257. package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +1 -1
  258. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +3 -5
  259. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +3 -3
  260. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +3 -3
  261. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +4 -5
  262. package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +3 -3
  263. package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +3 -3
  264. package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +8 -8
  265. package/lib/node/qsc_wasm.cjs +35 -21
  266. package/lib/node/qsc_wasm.d.cts +7 -4
  267. package/lib/node/qsc_wasm_bg.wasm +0 -0
  268. package/lib/web/qsc_wasm.d.ts +9 -6
  269. package/lib/web/qsc_wasm.js +35 -21
  270. package/lib/web/qsc_wasm_bg.wasm +0 -0
  271. package/package.json +1 -1
  272. package/ux/estimatesPanel.tsx +1 -2
  273. package/ux/index.ts +1 -0
  274. package/ux/qsharp-ux.css +8 -0
  275. package/ux/reTable.tsx +7 -11
  276. package/ux/renderers.tsx +32 -0
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  uid: Qdk.Microsoft.Quantum.Unstable.StatePreparation.ApproximatelyPreparePureStateCP
3
3
  title: ApproximatelyPreparePureStateCP operation
4
- ms.date: 04/17/2024 12:00:00 AM
4
+ ms.date: 05/06/2024 12:00:00 AM
5
5
  ms.topic: managed-reference
6
6
  qsharp.kind: operation
7
7
  qsharp.namespace: Microsoft.Quantum.Unstable.StatePreparation
@@ -61,6 +61,6 @@ elements (rⱼ, tⱼ) = (0.0, 0.0) if fewer than 2ⁿ are
61
61
  specified.
62
62
 
63
63
  ## References
64
- - Synthesis of Quantum Logic Circuits
64
+ - [arXiv:quant-ph/0406176](https://arxiv.org/abs/quant-ph/0406176)
65
+ "Synthesis of Quantum Logic Circuits",
65
66
  Vivek V. Shende, Stephen S. Bullock, Igor L. Markov
66
- https://arxiv.org/abs/quant-ph/0406176
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  uid: Qdk.Microsoft.Quantum.Unstable.StatePreparation.PreparePureStateD
3
3
  title: PreparePureStateD operation
4
- ms.date: 04/17/2024 12:00:00 AM
4
+ ms.date: 05/06/2024 12:00:00 AM
5
5
  ms.topic: managed-reference
6
6
  qsharp.kind: operation
7
7
  qsharp.namespace: Microsoft.Quantum.Unstable.StatePreparation
@@ -56,9 +56,9 @@ PreparePureStateD(amplitudes, qubits);
56
56
  ```
57
57
 
58
58
  ## References
59
- - Synthesis of Quantum Logic Circuits
59
+ - [arXiv:quant-ph/0406176](https://arxiv.org/abs/quant-ph/0406176)
60
+ "Synthesis of Quantum Logic Circuits",
60
61
  Vivek V. Shende, Stephen S. Bullock, Igor L. Markov
61
- https://arxiv.org/abs/quant-ph/0406176
62
62
 
63
63
  ## See Also
64
64
  - Microsoft.Quantum.Unstable.StatePreparation.ApproximatelyPreparePureStateCP
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  uid: Qdk.Microsoft.Quantum.Unstable.TableLookup.Select
3
3
  title: Select operation
4
- ms.date: 04/17/2024 12:00:00 AM
4
+ ms.date: 05/06/2024 12:00:00 AM
5
5
  ms.topic: managed-reference
6
6
  qsharp.kind: operation
7
7
  qsharp.namespace: Microsoft.Quantum.Unstable.TableLookup
@@ -44,10 +44,10 @@ measurement-based unlookup operation [3]. The controlled adjoint variant
44
44
  is not optimized using this technique.
45
45
 
46
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"
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"
@@ -455,60 +455,74 @@ module.exports.get_library_source_content = function(name) {
455
455
  /**
456
456
  * @param {string} code
457
457
  * @param {(string)[]} language_features
458
+ * @param {string} profile
458
459
  * @returns {string}
459
460
  */
460
- module.exports.get_ast = function(code, language_features) {
461
- let deferred3_0;
462
- let deferred3_1;
461
+ module.exports.get_ast = function(code, language_features, profile) {
462
+ let deferred5_0;
463
+ let deferred5_1;
463
464
  try {
464
465
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
465
466
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
466
467
  const len0 = WASM_VECTOR_LEN;
467
468
  const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
468
469
  const len1 = WASM_VECTOR_LEN;
469
- wasm.get_ast(retptr, ptr0, len0, ptr1, len1);
470
+ const ptr2 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
471
+ const len2 = WASM_VECTOR_LEN;
472
+ wasm.get_ast(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
470
473
  var r0 = getInt32Memory0()[retptr / 4 + 0];
471
474
  var r1 = getInt32Memory0()[retptr / 4 + 1];
472
- deferred3_0 = r0;
473
- deferred3_1 = r1;
474
- return getStringFromWasm0(r0, r1);
475
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
476
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
477
+ var ptr4 = r0;
478
+ var len4 = r1;
479
+ if (r3) {
480
+ ptr4 = 0; len4 = 0;
481
+ throw takeObject(r2);
482
+ }
483
+ deferred5_0 = ptr4;
484
+ deferred5_1 = len4;
485
+ return getStringFromWasm0(ptr4, len4);
475
486
  } finally {
476
487
  wasm.__wbindgen_add_to_stack_pointer(16);
477
- wasm.__wbindgen_export_4(deferred3_0, deferred3_1, 1);
488
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
478
489
  }
479
490
  };
480
491
 
481
492
  /**
482
493
  * @param {string} code
483
494
  * @param {(string)[]} language_features
495
+ * @param {string} profile
484
496
  * @returns {string}
485
497
  */
486
- module.exports.get_hir = function(code, language_features) {
487
- let deferred4_0;
488
- let deferred4_1;
498
+ module.exports.get_hir = function(code, language_features, profile) {
499
+ let deferred5_0;
500
+ let deferred5_1;
489
501
  try {
490
502
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
491
503
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
492
504
  const len0 = WASM_VECTOR_LEN;
493
505
  const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
494
506
  const len1 = WASM_VECTOR_LEN;
495
- wasm.get_hir(retptr, ptr0, len0, ptr1, len1);
507
+ const ptr2 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
508
+ const len2 = WASM_VECTOR_LEN;
509
+ wasm.get_hir(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
496
510
  var r0 = getInt32Memory0()[retptr / 4 + 0];
497
511
  var r1 = getInt32Memory0()[retptr / 4 + 1];
498
512
  var r2 = getInt32Memory0()[retptr / 4 + 2];
499
513
  var r3 = getInt32Memory0()[retptr / 4 + 3];
500
- var ptr3 = r0;
501
- var len3 = r1;
514
+ var ptr4 = r0;
515
+ var len4 = r1;
502
516
  if (r3) {
503
- ptr3 = 0; len3 = 0;
517
+ ptr4 = 0; len4 = 0;
504
518
  throw takeObject(r2);
505
519
  }
506
- deferred4_0 = ptr3;
507
- deferred4_1 = len3;
508
- return getStringFromWasm0(ptr3, len3);
520
+ deferred5_0 = ptr4;
521
+ deferred5_1 = len4;
522
+ return getStringFromWasm0(ptr4, len4);
509
523
  } finally {
510
524
  wasm.__wbindgen_add_to_stack_pointer(16);
511
- wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
525
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
512
526
  }
513
527
  };
514
528
 
@@ -1499,8 +1513,8 @@ module.exports.__wbindgen_memory = function() {
1499
1513
  return addHeapObject(ret);
1500
1514
  };
1501
1515
 
1502
- module.exports.__wbindgen_closure_wrapper710 = function(arg0, arg1, arg2) {
1503
- const ret = makeMutClosure(arg0, arg1, 298, __wbg_adapter_54);
1516
+ module.exports.__wbindgen_closure_wrapper747 = function(arg0, arg1, arg2) {
1517
+ const ret = makeMutClosure(arg0, arg1, 299, __wbg_adapter_54);
1504
1518
  return addHeapObject(ret);
1505
1519
  };
1506
1520
 
@@ -44,15 +44,17 @@ export function get_library_source_content(name: string): string | undefined;
44
44
  /**
45
45
  * @param {string} code
46
46
  * @param {(string)[]} language_features
47
+ * @param {string} profile
47
48
  * @returns {string}
48
49
  */
49
- export function get_ast(code: string, language_features: (string)[]): string;
50
+ export function get_ast(code: string, language_features: (string)[], profile: string): string;
50
51
  /**
51
52
  * @param {string} code
52
53
  * @param {(string)[]} language_features
54
+ * @param {string} profile
53
55
  * @returns {string}
54
56
  */
55
- export function get_hir(code: string, language_features: (string)[]): string;
57
+ export function get_hir(code: string, language_features: (string)[], profile: string): string;
56
58
  /**
57
59
  * @param {(Array<any>)[]} sources
58
60
  * @param {string} expr
@@ -220,8 +222,9 @@ export interface ICell {
220
222
  }
221
223
 
222
224
  export interface INotebookMetadata {
223
- targetProfile?: "base" | "quantinuum" | "unrestricted";
225
+ targetProfile?: "base" | "adaptive_ri" | "unrestricted";
224
226
  languageFeatures?: "v2-preview-syntax"[];
227
+ manifest?: string;
225
228
  }
226
229
 
227
230
  export interface IPosition {
@@ -246,7 +249,7 @@ export interface IDocFile {
246
249
  }
247
250
 
248
251
 
249
- export type TargetProfile = "base" | "quantinuum" |"unrestricted";
252
+ export type TargetProfile = "base" | "adaptive_ri" |"unrestricted";
250
253
 
251
254
 
252
255
  /**
Binary file
@@ -44,15 +44,17 @@ export function get_library_source_content(name: string): string | undefined;
44
44
  /**
45
45
  * @param {string} code
46
46
  * @param {(string)[]} language_features
47
+ * @param {string} profile
47
48
  * @returns {string}
48
49
  */
49
- export function get_ast(code: string, language_features: (string)[]): string;
50
+ export function get_ast(code: string, language_features: (string)[], profile: string): string;
50
51
  /**
51
52
  * @param {string} code
52
53
  * @param {(string)[]} language_features
54
+ * @param {string} profile
53
55
  * @returns {string}
54
56
  */
55
- export function get_hir(code: string, language_features: (string)[]): string;
57
+ export function get_hir(code: string, language_features: (string)[], profile: string): string;
56
58
  /**
57
59
  * @param {(Array<any>)[]} sources
58
60
  * @param {string} expr
@@ -220,8 +222,9 @@ export interface ICell {
220
222
  }
221
223
 
222
224
  export interface INotebookMetadata {
223
- targetProfile?: "base" | "quantinuum" | "unrestricted";
225
+ targetProfile?: "base" | "adaptive_ri" | "unrestricted";
224
226
  languageFeatures?: "v2-preview-syntax"[];
227
+ manifest?: string;
225
228
  }
226
229
 
227
230
  export interface IPosition {
@@ -246,7 +249,7 @@ export interface IDocFile {
246
249
  }
247
250
 
248
251
 
249
- export type TargetProfile = "base" | "quantinuum" |"unrestricted";
252
+ export type TargetProfile = "base" | "adaptive_ri" |"unrestricted";
250
253
 
251
254
 
252
255
  /**
@@ -470,8 +473,8 @@ export interface InitOutput {
470
473
  readonly get_estimates: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
471
474
  readonly get_circuit: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
472
475
  readonly get_library_source_content: (a: number, b: number, c: number) => void;
473
- readonly get_ast: (a: number, b: number, c: number, d: number, e: number) => void;
474
- readonly get_hir: (a: number, b: number, c: number, d: number, e: number) => void;
476
+ readonly get_ast: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
477
+ readonly get_hir: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
475
478
  readonly run: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
476
479
  readonly check_exercise_solution: (a: number, b: number, c: number, d: number) => number;
477
480
  readonly generate_docs: (a: number) => void;
@@ -452,60 +452,74 @@ export function get_library_source_content(name) {
452
452
  /**
453
453
  * @param {string} code
454
454
  * @param {(string)[]} language_features
455
+ * @param {string} profile
455
456
  * @returns {string}
456
457
  */
457
- export function get_ast(code, language_features) {
458
- let deferred3_0;
459
- let deferred3_1;
458
+ export function get_ast(code, language_features, profile) {
459
+ let deferred5_0;
460
+ let deferred5_1;
460
461
  try {
461
462
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
462
463
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
463
464
  const len0 = WASM_VECTOR_LEN;
464
465
  const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
465
466
  const len1 = WASM_VECTOR_LEN;
466
- wasm.get_ast(retptr, ptr0, len0, ptr1, len1);
467
+ const ptr2 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
468
+ const len2 = WASM_VECTOR_LEN;
469
+ wasm.get_ast(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
467
470
  var r0 = getInt32Memory0()[retptr / 4 + 0];
468
471
  var r1 = getInt32Memory0()[retptr / 4 + 1];
469
- deferred3_0 = r0;
470
- deferred3_1 = r1;
471
- return getStringFromWasm0(r0, r1);
472
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
473
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
474
+ var ptr4 = r0;
475
+ var len4 = r1;
476
+ if (r3) {
477
+ ptr4 = 0; len4 = 0;
478
+ throw takeObject(r2);
479
+ }
480
+ deferred5_0 = ptr4;
481
+ deferred5_1 = len4;
482
+ return getStringFromWasm0(ptr4, len4);
472
483
  } finally {
473
484
  wasm.__wbindgen_add_to_stack_pointer(16);
474
- wasm.__wbindgen_export_4(deferred3_0, deferred3_1, 1);
485
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
475
486
  }
476
487
  }
477
488
 
478
489
  /**
479
490
  * @param {string} code
480
491
  * @param {(string)[]} language_features
492
+ * @param {string} profile
481
493
  * @returns {string}
482
494
  */
483
- export function get_hir(code, language_features) {
484
- let deferred4_0;
485
- let deferred4_1;
495
+ export function get_hir(code, language_features, profile) {
496
+ let deferred5_0;
497
+ let deferred5_1;
486
498
  try {
487
499
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
488
500
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
489
501
  const len0 = WASM_VECTOR_LEN;
490
502
  const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
491
503
  const len1 = WASM_VECTOR_LEN;
492
- wasm.get_hir(retptr, ptr0, len0, ptr1, len1);
504
+ const ptr2 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
505
+ const len2 = WASM_VECTOR_LEN;
506
+ wasm.get_hir(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
493
507
  var r0 = getInt32Memory0()[retptr / 4 + 0];
494
508
  var r1 = getInt32Memory0()[retptr / 4 + 1];
495
509
  var r2 = getInt32Memory0()[retptr / 4 + 2];
496
510
  var r3 = getInt32Memory0()[retptr / 4 + 3];
497
- var ptr3 = r0;
498
- var len3 = r1;
511
+ var ptr4 = r0;
512
+ var len4 = r1;
499
513
  if (r3) {
500
- ptr3 = 0; len3 = 0;
514
+ ptr4 = 0; len4 = 0;
501
515
  throw takeObject(r2);
502
516
  }
503
- deferred4_0 = ptr3;
504
- deferred4_1 = len3;
505
- return getStringFromWasm0(ptr3, len3);
517
+ deferred5_0 = ptr4;
518
+ deferred5_1 = len4;
519
+ return getStringFromWasm0(ptr4, len4);
506
520
  } finally {
507
521
  wasm.__wbindgen_add_to_stack_pointer(16);
508
- wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
522
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
509
523
  }
510
524
  }
511
525
 
@@ -1447,8 +1461,8 @@ function __wbg_get_imports() {
1447
1461
  const ret = wasm.memory;
1448
1462
  return addHeapObject(ret);
1449
1463
  };
1450
- imports.wbg.__wbindgen_closure_wrapper710 = function(arg0, arg1, arg2) {
1451
- const ret = makeMutClosure(arg0, arg1, 298, __wbg_adapter_54);
1464
+ imports.wbg.__wbindgen_closure_wrapper747 = function(arg0, arg1, arg2) {
1465
+ const ret = makeMutClosure(arg0, arg1, 299, __wbg_adapter_54);
1452
1466
  return addHeapObject(ret);
1453
1467
  };
1454
1468
 
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qsharp-lang",
3
3
  "description": "qsharp language package for quantum development",
4
- "version": "1.3.6-dev",
4
+ "version": "1.4.1-dev",
5
5
  "license": "MIT",
6
6
  "engines": {
7
7
  "node": ">=16.17.0"
@@ -13,7 +13,6 @@ export function EstimatesPanel(props: {
13
13
  colors: string[];
14
14
  runNames: string[];
15
15
  calculating: boolean;
16
- renderer: (input: string) => string;
17
16
  onRowDeleted: (rowId: string) => void;
18
17
  }) {
19
18
  const [estimate, setEstimate] = useState<SingleEstimateResult | null>(null);
@@ -77,7 +76,7 @@ export function EstimatesPanel(props: {
77
76
  <summary style="font-size: 1.5em; font-weight: bold; margin: 24px 8px;">
78
77
  Resource Estimates
79
78
  </summary>
80
- <ReTable mdRenderer={props.renderer} estimatesData={estimate} />
79
+ <ReTable estimatesData={estimate} />
81
80
  </details>
82
81
  </>
83
82
  )}
package/ux/index.ts CHANGED
@@ -19,3 +19,4 @@ export { ScatterChart } from "./scatterChart.js";
19
19
  export { EstimatesOverview } from "./estimatesOverview.js";
20
20
  export { EstimatesPanel } from "./estimatesPanel.js";
21
21
  export { Circuit, CircuitPanel } from "./circuit.js";
22
+ export { setRenderer, Markdown } from "./renderers.js";
package/ux/qsharp-ux.css CHANGED
@@ -275,6 +275,14 @@ html {
275
275
  white-space: pre;
276
276
  }
277
277
 
278
+ .qir-output {
279
+ height: 40vh;
280
+ min-height: 400px;
281
+ width: 100%;
282
+ resize: none;
283
+ white-space: pre;
284
+ }
285
+
278
286
  /* Results output */
279
287
 
280
288
  .output-header {
package/ux/reTable.tsx CHANGED
@@ -4,11 +4,9 @@
4
4
  import { useState } from "preact/hooks";
5
5
  import { SingleEstimateResult } from "./data.js";
6
6
  import { CreateReport } from "./report.js";
7
+ import { Markdown } from "./renderers.js";
7
8
 
8
- export function ReTable(props: {
9
- mdRenderer: (input: string) => string;
10
- estimatesData: SingleEstimateResult;
11
- }) {
9
+ export function ReTable(props: { estimatesData: SingleEstimateResult }) {
12
10
  const [showDetail, setShowDetail] = useState(false);
13
11
  const toggleDetail = () => {
14
12
  setShowDetail(!showDetail);
@@ -45,9 +43,6 @@ export function ReTable(props: {
45
43
  if (typeof value === "object") {
46
44
  value = JSON.stringify(value);
47
45
  }
48
- const renderedExplanation = {
49
- __html: props.mdRenderer(entry.explanation),
50
- };
51
46
  return (
52
47
  <tr>
53
48
  <td className="estimate-cell title-cell">{entry.label}</td>
@@ -57,9 +52,9 @@ export function ReTable(props: {
57
52
  <>
58
53
  <strong>{entry.description}</strong>
59
54
  <hr />
60
- <div
55
+ <Markdown
61
56
  className="estimate-explanation"
62
- dangerouslySetInnerHTML={renderedExplanation}
57
+ markdown={entry.explanation}
63
58
  />
64
59
  </>
65
60
  ) : (
@@ -81,9 +76,10 @@ export function ReTable(props: {
81
76
  </summary>
82
77
  <ul className="estimate-table">
83
78
  {reportData.assumptions.map((assumption) => (
84
- <li
79
+ <Markdown
85
80
  className="estimate-assumption"
86
- dangerouslySetInnerHTML={{ __html: props.mdRenderer(assumption) }}
81
+ markdown={assumption}
82
+ tagName="li"
87
83
  />
88
84
  ))}
89
85
  </ul>
@@ -0,0 +1,32 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ import { createElement } from "preact";
5
+
6
+ // Default renderer to be replaced before components are first used.
7
+ // Expectation is that this will convert markdown and/or LaTeX to HTML.
8
+ let theRenderer = function (input: string): string {
9
+ const err = "ERROR: Rendered has not been set";
10
+ console.error(err);
11
+ return err + ". " + input;
12
+ };
13
+
14
+ export function setRenderer(renderer: (input: string) => string) {
15
+ theRenderer = renderer;
16
+ }
17
+
18
+ export function Markdown(props: {
19
+ markdown: string;
20
+ className?: string;
21
+ tagName?: string;
22
+ }) {
23
+ const tag = props.tagName || "div";
24
+ const nodeProps = {
25
+ className: props.className,
26
+ dangerouslySetInnerHTML: {
27
+ __html: theRenderer(props.markdown),
28
+ },
29
+ };
30
+
31
+ return createElement(tag, nodeProps);
32
+ }