qsharp-lang 1.1.4-dev → 1.1.6-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 (303) hide show
  1. package/dist/browser.d.ts +3 -3
  2. package/dist/browser.js +12 -58
  3. package/dist/compiler/compiler.d.ts +29 -9
  4. package/dist/compiler/compiler.js +42 -9
  5. package/dist/compiler/events.d.ts +1 -1
  6. package/dist/compiler/worker-browser.d.ts +1 -1
  7. package/dist/compiler/worker-browser.js +3 -40
  8. package/dist/compiler/worker-node.js +3 -39
  9. package/dist/debug-service/debug-service.d.ts +7 -5
  10. package/dist/debug-service/debug-service.js +20 -3
  11. package/dist/debug-service/worker-browser.d.ts +1 -1
  12. package/dist/debug-service/worker-browser.js +3 -29
  13. package/dist/debug-service/worker-node.js +3 -28
  14. package/dist/katas-content.generated.js +353 -353
  15. package/dist/language-service/language-service.d.ts +7 -1
  16. package/dist/language-service/language-service.js +27 -0
  17. package/dist/language-service/worker-browser.d.ts +1 -1
  18. package/dist/language-service/worker-browser.js +3 -29
  19. package/dist/language-service/worker-node.js +3 -28
  20. package/dist/main.d.ts +2 -2
  21. package/dist/main.js +7 -42
  22. package/dist/samples.generated.js +1 -1
  23. package/dist/workers/browser.d.ts +21 -0
  24. package/dist/workers/browser.js +67 -0
  25. package/dist/{worker-proxy.d.ts → workers/common.d.ts} +26 -9
  26. package/dist/{worker-proxy.js → workers/common.js} +33 -4
  27. package/dist/workers/node.d.ts +20 -0
  28. package/dist/workers/node.js +55 -0
  29. package/docs/Microsoft.Quantum.Arrays/All.md +4 -6
  30. package/docs/Microsoft.Quantum.Arrays/Any.md +4 -6
  31. package/docs/Microsoft.Quantum.Arrays/Chunks.md +4 -4
  32. package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +4 -4
  33. package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +4 -4
  34. package/docs/Microsoft.Quantum.Arrays/Count.md +4 -6
  35. package/docs/Microsoft.Quantum.Arrays/Diagonal.md +4 -4
  36. package/docs/Microsoft.Quantum.Arrays/DrawMany.md +5 -6
  37. package/docs/Microsoft.Quantum.Arrays/Enumerated.md +4 -5
  38. package/docs/Microsoft.Quantum.Arrays/Excluding.md +4 -5
  39. package/docs/Microsoft.Quantum.Arrays/Filtered.md +4 -6
  40. package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +4 -5
  41. package/docs/Microsoft.Quantum.Arrays/Flattened.md +4 -4
  42. package/docs/Microsoft.Quantum.Arrays/Fold.md +4 -5
  43. package/docs/Microsoft.Quantum.Arrays/ForEach.md +5 -7
  44. package/docs/Microsoft.Quantum.Arrays/Head.md +4 -4
  45. package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +4 -4
  46. package/docs/Microsoft.Quantum.Arrays/IndexOf.md +4 -5
  47. package/docs/Microsoft.Quantum.Arrays/IndexRange.md +4 -5
  48. package/docs/Microsoft.Quantum.Arrays/Interleaved.md +4 -4
  49. package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +4 -4
  50. package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +4 -4
  51. package/docs/Microsoft.Quantum.Arrays/IsSorted.md +4 -5
  52. package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +4 -4
  53. package/docs/Microsoft.Quantum.Arrays/Mapped.md +4 -6
  54. package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +4 -6
  55. package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +4 -6
  56. package/docs/Microsoft.Quantum.Arrays/Most.md +4 -5
  57. package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +4 -4
  58. package/docs/Microsoft.Quantum.Arrays/Padded.md +4 -5
  59. package/docs/Microsoft.Quantum.Arrays/Partitioned.md +4 -4
  60. package/docs/Microsoft.Quantum.Arrays/Rest.md +4 -5
  61. package/docs/Microsoft.Quantum.Arrays/Reversed.md +4 -5
  62. package/docs/Microsoft.Quantum.Arrays/SequenceI.md +4 -4
  63. package/docs/Microsoft.Quantum.Arrays/SequenceL.md +4 -4
  64. package/docs/Microsoft.Quantum.Arrays/Sorted.md +4 -5
  65. package/docs/Microsoft.Quantum.Arrays/Subarray.md +4 -6
  66. package/docs/Microsoft.Quantum.Arrays/Swapped.md +4 -4
  67. package/docs/Microsoft.Quantum.Arrays/Tail.md +4 -4
  68. package/docs/Microsoft.Quantum.Arrays/Transposed.md +4 -5
  69. package/docs/Microsoft.Quantum.Arrays/Unzipped.md +4 -5
  70. package/docs/Microsoft.Quantum.Arrays/Where.md +4 -5
  71. package/docs/Microsoft.Quantum.Arrays/Windows.md +4 -4
  72. package/docs/Microsoft.Quantum.Arrays/Zipped.md +4 -5
  73. package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +5 -5
  74. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +5 -6
  75. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +5 -6
  76. package/docs/Microsoft.Quantum.Canon/ApplyP.md +5 -6
  77. package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +5 -6
  78. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +5 -6
  79. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +5 -6
  80. package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +5 -5
  81. package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +5 -5
  82. package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +5 -6
  83. package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +5 -6
  84. package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +5 -6
  85. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +5 -6
  86. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +5 -6
  87. package/docs/Microsoft.Quantum.Canon/CX.md +5 -5
  88. package/docs/Microsoft.Quantum.Canon/CY.md +5 -5
  89. package/docs/Microsoft.Quantum.Canon/CZ.md +5 -5
  90. package/docs/Microsoft.Quantum.Canon/Fst.md +4 -4
  91. package/docs/Microsoft.Quantum.Canon/Snd.md +4 -4
  92. package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +5 -5
  93. package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +4 -5
  94. package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +4 -5
  95. package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +4 -4
  96. package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +4 -5
  97. package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +4 -5
  98. package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +4 -5
  99. package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +4 -5
  100. package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +4 -4
  101. package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +4 -5
  102. package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +4 -4
  103. package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +4 -5
  104. package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +4 -4
  105. package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +4 -5
  106. package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +4 -4
  107. package/docs/Microsoft.Quantum.Core/Length.md +4 -4
  108. package/docs/Microsoft.Quantum.Core/RangeEnd.md +4 -5
  109. package/docs/Microsoft.Quantum.Core/RangeReverse.md +4 -4
  110. package/docs/Microsoft.Quantum.Core/RangeStart.md +4 -4
  111. package/docs/Microsoft.Quantum.Core/RangeStep.md +4 -4
  112. package/docs/Microsoft.Quantum.Core/Repeated.md +4 -4
  113. package/docs/Microsoft.Quantum.Diagnostics/CheckAllZero.md +5 -5
  114. package/docs/Microsoft.Quantum.Diagnostics/CheckOperationsAreEqual.md +5 -5
  115. package/docs/Microsoft.Quantum.Diagnostics/CheckZero.md +5 -5
  116. package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +4 -4
  117. package/docs/Microsoft.Quantum.Diagnostics/Fact.md +4 -4
  118. package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +5 -5
  119. package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +5 -5
  120. package/docs/Microsoft.Quantum.Intrinsic/Exp.md +5 -5
  121. package/docs/Microsoft.Quantum.Intrinsic/H.md +11 -8
  122. package/docs/Microsoft.Quantum.Intrinsic/I.md +5 -5
  123. package/docs/Microsoft.Quantum.Intrinsic/M.md +5 -6
  124. package/docs/Microsoft.Quantum.Intrinsic/Measure.md +5 -6
  125. package/docs/Microsoft.Quantum.Intrinsic/Message.md +4 -4
  126. package/docs/Microsoft.Quantum.Intrinsic/R.md +5 -5
  127. package/docs/Microsoft.Quantum.Intrinsic/R1.md +5 -5
  128. package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +5 -11
  129. package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +5 -10
  130. package/docs/Microsoft.Quantum.Intrinsic/Reset.md +5 -6
  131. package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +5 -6
  132. package/docs/Microsoft.Quantum.Intrinsic/Rx.md +5 -5
  133. package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +5 -5
  134. package/docs/Microsoft.Quantum.Intrinsic/Ry.md +5 -5
  135. package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +5 -5
  136. package/docs/Microsoft.Quantum.Intrinsic/Rz.md +5 -5
  137. package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +5 -5
  138. package/docs/Microsoft.Quantum.Intrinsic/S.md +5 -5
  139. package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +5 -5
  140. package/docs/Microsoft.Quantum.Intrinsic/T.md +5 -5
  141. package/docs/Microsoft.Quantum.Intrinsic/X.md +5 -5
  142. package/docs/Microsoft.Quantum.Intrinsic/Y.md +5 -5
  143. package/docs/Microsoft.Quantum.Intrinsic/Z.md +5 -5
  144. package/docs/Microsoft.Quantum.Logical/Xor.md +4 -4
  145. package/docs/Microsoft.Quantum.Math/AbsComplex.md +4 -5
  146. package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +4 -5
  147. package/docs/Microsoft.Quantum.Math/AbsD.md +4 -4
  148. package/docs/Microsoft.Quantum.Math/AbsI.md +4 -4
  149. package/docs/Microsoft.Quantum.Math/AbsL.md +4 -4
  150. package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +4 -5
  151. package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +4 -5
  152. package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +4 -4
  153. package/docs/Microsoft.Quantum.Math/ArcCos.md +4 -4
  154. package/docs/Microsoft.Quantum.Math/ArcCosh.md +4 -4
  155. package/docs/Microsoft.Quantum.Math/ArcSin.md +4 -4
  156. package/docs/Microsoft.Quantum.Math/ArcSinh.md +4 -4
  157. package/docs/Microsoft.Quantum.Math/ArcTan.md +4 -4
  158. package/docs/Microsoft.Quantum.Math/ArcTan2.md +4 -4
  159. package/docs/Microsoft.Quantum.Math/ArcTanh.md +4 -4
  160. package/docs/Microsoft.Quantum.Math/ArgComplex.md +4 -5
  161. package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +4 -4
  162. package/docs/Microsoft.Quantum.Math/Binom.md +4 -4
  163. package/docs/Microsoft.Quantum.Math/BitSizeI.md +4 -5
  164. package/docs/Microsoft.Quantum.Math/BitSizeL.md +4 -5
  165. package/docs/Microsoft.Quantum.Math/Ceiling.md +4 -5
  166. package/docs/Microsoft.Quantum.Math/Complex.md +4 -6
  167. package/docs/Microsoft.Quantum.Math/ComplexPolar.md +4 -5
  168. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +4 -6
  169. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +4 -6
  170. package/docs/Microsoft.Quantum.Math/Cos.md +4 -4
  171. package/docs/Microsoft.Quantum.Math/Cosh.md +4 -4
  172. package/docs/Microsoft.Quantum.Math/DivRemI.md +4 -4
  173. package/docs/Microsoft.Quantum.Math/DivRemL.md +4 -4
  174. package/docs/Microsoft.Quantum.Math/DividedByC.md +4 -4
  175. package/docs/Microsoft.Quantum.Math/DividedByCP.md +4 -4
  176. package/docs/Microsoft.Quantum.Math/E.md +4 -4
  177. package/docs/Microsoft.Quantum.Math/ExpModI.md +4 -5
  178. package/docs/Microsoft.Quantum.Math/ExpModL.md +4 -5
  179. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +4 -5
  180. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +4 -5
  181. package/docs/Microsoft.Quantum.Math/FactorialI.md +4 -4
  182. package/docs/Microsoft.Quantum.Math/FactorialL.md +4 -4
  183. package/docs/Microsoft.Quantum.Math/Floor.md +4 -5
  184. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +4 -5
  185. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +4 -5
  186. package/docs/Microsoft.Quantum.Math/HammingWeightI.md +4 -4
  187. package/docs/Microsoft.Quantum.Math/InverseModI.md +4 -4
  188. package/docs/Microsoft.Quantum.Math/InverseModL.md +4 -4
  189. package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +4 -4
  190. package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +4 -4
  191. package/docs/Microsoft.Quantum.Math/IsInfinite.md +4 -5
  192. package/docs/Microsoft.Quantum.Math/IsNaN.md +4 -5
  193. package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +4 -4
  194. package/docs/Microsoft.Quantum.Math/Lg.md +4 -4
  195. package/docs/Microsoft.Quantum.Math/Log.md +4 -4
  196. package/docs/Microsoft.Quantum.Math/Log10.md +4 -4
  197. package/docs/Microsoft.Quantum.Math/LogFactorialD.md +4 -5
  198. package/docs/Microsoft.Quantum.Math/LogGammaD.md +4 -5
  199. package/docs/Microsoft.Quantum.Math/LogOf2.md +4 -4
  200. package/docs/Microsoft.Quantum.Math/Max.md +4 -4
  201. package/docs/Microsoft.Quantum.Math/MaxD.md +4 -4
  202. package/docs/Microsoft.Quantum.Math/MaxI.md +4 -4
  203. package/docs/Microsoft.Quantum.Math/MaxL.md +4 -4
  204. package/docs/Microsoft.Quantum.Math/Min.md +4 -4
  205. package/docs/Microsoft.Quantum.Math/MinD.md +4 -4
  206. package/docs/Microsoft.Quantum.Math/MinI.md +4 -4
  207. package/docs/Microsoft.Quantum.Math/MinL.md +4 -4
  208. package/docs/Microsoft.Quantum.Math/MinusC.md +4 -4
  209. package/docs/Microsoft.Quantum.Math/MinusCP.md +4 -4
  210. package/docs/Microsoft.Quantum.Math/ModulusI.md +4 -5
  211. package/docs/Microsoft.Quantum.Math/ModulusL.md +4 -5
  212. package/docs/Microsoft.Quantum.Math/NegationC.md +4 -4
  213. package/docs/Microsoft.Quantum.Math/NegationCP.md +4 -4
  214. package/docs/Microsoft.Quantum.Math/PI.md +4 -4
  215. package/docs/Microsoft.Quantum.Math/PNorm.md +4 -7
  216. package/docs/Microsoft.Quantum.Math/PNormalized.md +4 -8
  217. package/docs/Microsoft.Quantum.Math/PlusC.md +4 -4
  218. package/docs/Microsoft.Quantum.Math/PlusCP.md +4 -4
  219. package/docs/Microsoft.Quantum.Math/PowC.md +4 -5
  220. package/docs/Microsoft.Quantum.Math/PowCP.md +4 -5
  221. package/docs/Microsoft.Quantum.Math/RealMod.md +4 -4
  222. package/docs/Microsoft.Quantum.Math/Round.md +4 -5
  223. package/docs/Microsoft.Quantum.Math/SignD.md +4 -4
  224. package/docs/Microsoft.Quantum.Math/SignI.md +4 -4
  225. package/docs/Microsoft.Quantum.Math/SignL.md +4 -4
  226. package/docs/Microsoft.Quantum.Math/Sin.md +4 -4
  227. package/docs/Microsoft.Quantum.Math/Sinh.md +4 -4
  228. package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +4 -4
  229. package/docs/Microsoft.Quantum.Math/Sqrt.md +4 -4
  230. package/docs/Microsoft.Quantum.Math/SquaredNorm.md +4 -4
  231. package/docs/Microsoft.Quantum.Math/Tan.md +4 -4
  232. package/docs/Microsoft.Quantum.Math/Tanh.md +4 -4
  233. package/docs/Microsoft.Quantum.Math/TimesC.md +4 -4
  234. package/docs/Microsoft.Quantum.Math/TimesCP.md +4 -4
  235. package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +4 -5
  236. package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +4 -5
  237. package/docs/Microsoft.Quantum.Math/Truncate.md +4 -5
  238. package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +5 -6
  239. package/docs/Microsoft.Quantum.Measurement/MResetX.md +5 -7
  240. package/docs/Microsoft.Quantum.Measurement/MResetY.md +5 -7
  241. package/docs/Microsoft.Quantum.Measurement/MResetZ.md +5 -7
  242. package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +5 -5
  243. package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +5 -5
  244. package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +5 -7
  245. package/docs/Microsoft.Quantum.Random/DrawRandomDouble.md +5 -5
  246. package/docs/Microsoft.Quantum.Random/DrawRandomInt.md +5 -5
  247. package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +5 -7
  248. package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +4 -5
  249. package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +4 -6
  250. package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +5 -10
  251. package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +4 -5
  252. package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +4 -6
  253. package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +5 -5
  254. package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +4 -5
  255. package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +4 -6
  256. package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +5 -8
  257. package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +4 -5
  258. package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +4 -5
  259. package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +4 -5
  260. package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +4 -5
  261. package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +5 -6
  262. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +5 -6
  263. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +5 -7
  264. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +5 -6
  265. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +5 -7
  266. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +5 -6
  267. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +5 -7
  268. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +5 -6
  269. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +5 -7
  270. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +5 -6
  271. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +5 -7
  272. package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +5 -6
  273. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +5 -5
  274. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +5 -6
  275. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +5 -5
  276. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +5 -5
  277. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +5 -5
  278. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +5 -6
  279. package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +5 -6
  280. package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +5 -5
  281. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +5 -5
  282. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +5 -6
  283. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +5 -6
  284. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +5 -5
  285. package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +5 -7
  286. package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +5 -6
  287. package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +5 -5
  288. package/docs/toc.yml +286 -284
  289. package/lib/node/qsc_wasm.cjs +74 -51
  290. package/lib/node/qsc_wasm.d.cts +12 -6
  291. package/lib/node/qsc_wasm_bg.wasm +0 -0
  292. package/lib/web/qsc_wasm.d.ts +17 -11
  293. package/lib/web/qsc_wasm.js +72 -49
  294. package/lib/web/qsc_wasm_bg.wasm +0 -0
  295. package/package.json +1 -1
  296. package/ux/estimatesOverview.tsx +6 -2
  297. package/ux/scatterChart.tsx +31 -10
  298. package/dist/compiler/worker-proxy.d.ts +0 -7
  299. package/dist/compiler/worker-proxy.js +0 -18
  300. package/dist/debug-service/worker-proxy.d.ts +0 -7
  301. package/dist/debug-service/worker-proxy.js +0 -22
  302. package/dist/language-service/worker-proxy.d.ts +0 -6
  303. package/dist/language-service/worker-proxy.js +0 -28
@@ -311,66 +311,72 @@ module.exports.git_hash = function() {
311
311
 
312
312
  /**
313
313
  * @param {(Array<any>)[]} sources
314
+ * @param {(string)[]} language_features
314
315
  * @returns {string}
315
316
  */
316
- module.exports.get_qir = function(sources) {
317
- let deferred3_0;
318
- let deferred3_1;
317
+ module.exports.get_qir = function(sources, language_features) {
318
+ let deferred4_0;
319
+ let deferred4_1;
319
320
  try {
320
321
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
321
322
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
322
323
  const len0 = WASM_VECTOR_LEN;
323
- wasm.get_qir(retptr, ptr0, len0);
324
+ const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
325
+ const len1 = WASM_VECTOR_LEN;
326
+ wasm.get_qir(retptr, ptr0, len0, ptr1, len1);
324
327
  var r0 = getInt32Memory0()[retptr / 4 + 0];
325
328
  var r1 = getInt32Memory0()[retptr / 4 + 1];
326
329
  var r2 = getInt32Memory0()[retptr / 4 + 2];
327
330
  var r3 = getInt32Memory0()[retptr / 4 + 3];
328
- var ptr2 = r0;
329
- var len2 = r1;
331
+ var ptr3 = r0;
332
+ var len3 = r1;
330
333
  if (r3) {
331
- ptr2 = 0; len2 = 0;
334
+ ptr3 = 0; len3 = 0;
332
335
  throw takeObject(r2);
333
336
  }
334
- deferred3_0 = ptr2;
335
- deferred3_1 = len2;
336
- return getStringFromWasm0(ptr2, len2);
337
+ deferred4_0 = ptr3;
338
+ deferred4_1 = len3;
339
+ return getStringFromWasm0(ptr3, len3);
337
340
  } finally {
338
341
  wasm.__wbindgen_add_to_stack_pointer(16);
339
- wasm.__wbindgen_export_4(deferred3_0, deferred3_1, 1);
342
+ wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
340
343
  }
341
344
  };
342
345
 
343
346
  /**
344
347
  * @param {(Array<any>)[]} sources
345
348
  * @param {string} params
349
+ * @param {(string)[]} language_features
346
350
  * @returns {string}
347
351
  */
348
- module.exports.get_estimates = function(sources, params) {
349
- let deferred4_0;
350
- let deferred4_1;
352
+ module.exports.get_estimates = function(sources, params, language_features) {
353
+ let deferred5_0;
354
+ let deferred5_1;
351
355
  try {
352
356
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
353
357
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
354
358
  const len0 = WASM_VECTOR_LEN;
355
359
  const ptr1 = passStringToWasm0(params, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
356
360
  const len1 = WASM_VECTOR_LEN;
357
- wasm.get_estimates(retptr, ptr0, len0, ptr1, len1);
361
+ const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
362
+ const len2 = WASM_VECTOR_LEN;
363
+ wasm.get_estimates(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
358
364
  var r0 = getInt32Memory0()[retptr / 4 + 0];
359
365
  var r1 = getInt32Memory0()[retptr / 4 + 1];
360
366
  var r2 = getInt32Memory0()[retptr / 4 + 2];
361
367
  var r3 = getInt32Memory0()[retptr / 4 + 3];
362
- var ptr3 = r0;
363
- var len3 = r1;
368
+ var ptr4 = r0;
369
+ var len4 = r1;
364
370
  if (r3) {
365
- ptr3 = 0; len3 = 0;
371
+ ptr4 = 0; len4 = 0;
366
372
  throw takeObject(r2);
367
373
  }
368
- deferred4_0 = ptr3;
369
- deferred4_1 = len3;
370
- return getStringFromWasm0(ptr3, len3);
374
+ deferred5_0 = ptr4;
375
+ deferred5_1 = len4;
376
+ return getStringFromWasm0(ptr4, len4);
371
377
  } finally {
372
378
  wasm.__wbindgen_add_to_stack_pointer(16);
373
- wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
379
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
374
380
  }
375
381
  };
376
382
 
@@ -399,24 +405,35 @@ module.exports.get_library_source_content = function(name) {
399
405
 
400
406
  /**
401
407
  * @param {string} code
408
+ * @param {(string)[]} language_features
402
409
  * @returns {string}
403
410
  */
404
- module.exports.get_hir = function(code) {
405
- let deferred2_0;
406
- let deferred2_1;
411
+ module.exports.get_hir = function(code, language_features) {
412
+ let deferred4_0;
413
+ let deferred4_1;
407
414
  try {
408
415
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
409
416
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
410
417
  const len0 = WASM_VECTOR_LEN;
411
- wasm.get_hir(retptr, ptr0, len0);
418
+ const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
419
+ const len1 = WASM_VECTOR_LEN;
420
+ wasm.get_hir(retptr, ptr0, len0, ptr1, len1);
412
421
  var r0 = getInt32Memory0()[retptr / 4 + 0];
413
422
  var r1 = getInt32Memory0()[retptr / 4 + 1];
414
- deferred2_0 = r0;
415
- deferred2_1 = r1;
416
- return getStringFromWasm0(r0, r1);
423
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
424
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
425
+ var ptr3 = r0;
426
+ var len3 = r1;
427
+ if (r3) {
428
+ ptr3 = 0; len3 = 0;
429
+ throw takeObject(r2);
430
+ }
431
+ deferred4_0 = ptr3;
432
+ deferred4_1 = len3;
433
+ return getStringFromWasm0(ptr3, len3);
417
434
  } finally {
418
435
  wasm.__wbindgen_add_to_stack_pointer(16);
419
- wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
436
+ wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
420
437
  }
421
438
  };
422
439
 
@@ -425,16 +442,19 @@ module.exports.get_hir = function(code) {
425
442
  * @param {string} expr
426
443
  * @param {Function} event_cb
427
444
  * @param {number} shots
445
+ * @param {(string)[]} language_features
428
446
  * @returns {boolean}
429
447
  */
430
- module.exports.run = function(sources, expr, event_cb, shots) {
448
+ module.exports.run = function(sources, expr, event_cb, shots, language_features) {
431
449
  try {
432
450
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
433
451
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
434
452
  const len0 = WASM_VECTOR_LEN;
435
453
  const ptr1 = passStringToWasm0(expr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
436
454
  const len1 = WASM_VECTOR_LEN;
437
- wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots);
455
+ const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
456
+ const len2 = WASM_VECTOR_LEN;
457
+ wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots, ptr2, len2);
438
458
  var r0 = getInt32Memory0()[retptr / 4 + 0];
439
459
  var r1 = getInt32Memory0()[retptr / 4 + 1];
440
460
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -512,12 +532,13 @@ class DebugService {
512
532
  /**
513
533
  * @param {(Array<any>)[]} sources
514
534
  * @param {string} target_profile
515
- * @param {string | undefined} [entry]
535
+ * @param {string | undefined} entry
536
+ * @param {(string)[]} language_features
516
537
  * @returns {string}
517
538
  */
518
- load_source(sources, target_profile, entry) {
519
- let deferred4_0;
520
- let deferred4_1;
539
+ load_source(sources, target_profile, entry, language_features) {
540
+ let deferred5_0;
541
+ let deferred5_1;
521
542
  try {
522
543
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
523
544
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
@@ -526,15 +547,17 @@ class DebugService {
526
547
  const len1 = WASM_VECTOR_LEN;
527
548
  var ptr2 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
528
549
  var len2 = WASM_VECTOR_LEN;
529
- wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
550
+ const ptr3 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
551
+ const len3 = WASM_VECTOR_LEN;
552
+ wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
530
553
  var r0 = getInt32Memory0()[retptr / 4 + 0];
531
554
  var r1 = getInt32Memory0()[retptr / 4 + 1];
532
- deferred4_0 = r0;
533
- deferred4_1 = r1;
555
+ deferred5_0 = r0;
556
+ deferred5_1 = r1;
534
557
  return getStringFromWasm0(r0, r1);
535
558
  } finally {
536
559
  wasm.__wbindgen_add_to_stack_pointer(16);
537
- wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
560
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
538
561
  }
539
562
  }
540
563
  /**
@@ -925,16 +948,6 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
925
948
  return ret;
926
949
  };
927
950
 
928
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
929
- const ret = BigInt.asUintN(64, arg0);
930
- return addHeapObject(ret);
931
- };
932
-
933
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
934
- const ret = new Error(getStringFromWasm0(arg0, arg1));
935
- return addHeapObject(ret);
936
- };
937
-
938
951
  module.exports.__wbindgen_is_object = function(arg0) {
939
952
  const val = getObject(arg0);
940
953
  const ret = typeof(val) === 'object' && val !== null;
@@ -951,6 +964,16 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
951
964
  return ret;
952
965
  };
953
966
 
967
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
968
+ const ret = BigInt.asUintN(64, arg0);
969
+ return addHeapObject(ret);
970
+ };
971
+
972
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
973
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
974
+ return addHeapObject(ret);
975
+ };
976
+
954
977
  module.exports.__wbindgen_number_new = function(arg0) {
955
978
  const ret = arg0;
956
979
  return addHeapObject(ret);
@@ -1287,7 +1310,7 @@ module.exports.__wbindgen_memory = function() {
1287
1310
  return addHeapObject(ret);
1288
1311
  };
1289
1312
 
1290
- module.exports.__wbindgen_closure_wrapper607 = function(arg0, arg1, arg2) {
1313
+ module.exports.__wbindgen_closure_wrapper611 = function(arg0, arg1, arg2) {
1291
1314
  const ret = makeMutClosure(arg0, arg1, 219, __wbg_adapter_46);
1292
1315
  return addHeapObject(ret);
1293
1316
  };
@@ -15,15 +15,17 @@ export function setLogLevel(level: number): void;
15
15
  export function git_hash(): string;
16
16
  /**
17
17
  * @param {(Array<any>)[]} sources
18
+ * @param {(string)[]} language_features
18
19
  * @returns {string}
19
20
  */
20
- export function get_qir(sources: (Array<any>)[]): string;
21
+ export function get_qir(sources: (Array<any>)[], language_features: (string)[]): string;
21
22
  /**
22
23
  * @param {(Array<any>)[]} sources
23
24
  * @param {string} params
25
+ * @param {(string)[]} language_features
24
26
  * @returns {string}
25
27
  */
26
- export function get_estimates(sources: (Array<any>)[], params: string): string;
28
+ export function get_estimates(sources: (Array<any>)[], params: string, language_features: (string)[]): string;
27
29
  /**
28
30
  * @param {string} name
29
31
  * @returns {string | undefined}
@@ -31,17 +33,19 @@ export function get_estimates(sources: (Array<any>)[], params: string): string;
31
33
  export function get_library_source_content(name: string): string | undefined;
32
34
  /**
33
35
  * @param {string} code
36
+ * @param {(string)[]} language_features
34
37
  * @returns {string}
35
38
  */
36
- export function get_hir(code: string): string;
39
+ export function get_hir(code: string, language_features: (string)[]): string;
37
40
  /**
38
41
  * @param {(Array<any>)[]} sources
39
42
  * @param {string} expr
40
43
  * @param {Function} event_cb
41
44
  * @param {number} shots
45
+ * @param {(string)[]} language_features
42
46
  * @returns {boolean}
43
47
  */
44
- export function run(sources: (Array<any>)[], expr: string, event_cb: Function, shots: number): boolean;
48
+ export function run(sources: (Array<any>)[], expr: string, event_cb: Function, shots: number, language_features: (string)[]): boolean;
45
49
  /**
46
50
  * @param {string} solution_code
47
51
  * @param {any} exercise_sources_js
@@ -194,6 +198,7 @@ export interface ICell {
194
198
 
195
199
  export interface INotebookMetadata {
196
200
  targetProfile?: "unrestricted" | "base";
201
+ languageFeatures?: "v2-preview-syntax"[];
197
202
  }
198
203
 
199
204
  export interface IPosition {
@@ -225,10 +230,11 @@ export class DebugService {
225
230
  /**
226
231
  * @param {(Array<any>)[]} sources
227
232
  * @param {string} target_profile
228
- * @param {string | undefined} [entry]
233
+ * @param {string | undefined} entry
234
+ * @param {(string)[]} language_features
229
235
  * @returns {string}
230
236
  */
231
- load_source(sources: (Array<any>)[], target_profile: string, entry?: string): string;
237
+ load_source(sources: (Array<any>)[], target_profile: string, entry: string | undefined, language_features: (string)[]): string;
232
238
  /**
233
239
  * @returns {IQuantumStateList}
234
240
  */
Binary file
@@ -15,15 +15,17 @@ export function setLogLevel(level: number): void;
15
15
  export function git_hash(): string;
16
16
  /**
17
17
  * @param {(Array<any>)[]} sources
18
+ * @param {(string)[]} language_features
18
19
  * @returns {string}
19
20
  */
20
- export function get_qir(sources: (Array<any>)[]): string;
21
+ export function get_qir(sources: (Array<any>)[], language_features: (string)[]): string;
21
22
  /**
22
23
  * @param {(Array<any>)[]} sources
23
24
  * @param {string} params
25
+ * @param {(string)[]} language_features
24
26
  * @returns {string}
25
27
  */
26
- export function get_estimates(sources: (Array<any>)[], params: string): string;
28
+ export function get_estimates(sources: (Array<any>)[], params: string, language_features: (string)[]): string;
27
29
  /**
28
30
  * @param {string} name
29
31
  * @returns {string | undefined}
@@ -31,17 +33,19 @@ export function get_estimates(sources: (Array<any>)[], params: string): string;
31
33
  export function get_library_source_content(name: string): string | undefined;
32
34
  /**
33
35
  * @param {string} code
36
+ * @param {(string)[]} language_features
34
37
  * @returns {string}
35
38
  */
36
- export function get_hir(code: string): string;
39
+ export function get_hir(code: string, language_features: (string)[]): string;
37
40
  /**
38
41
  * @param {(Array<any>)[]} sources
39
42
  * @param {string} expr
40
43
  * @param {Function} event_cb
41
44
  * @param {number} shots
45
+ * @param {(string)[]} language_features
42
46
  * @returns {boolean}
43
47
  */
44
- export function run(sources: (Array<any>)[], expr: string, event_cb: Function, shots: number): boolean;
48
+ export function run(sources: (Array<any>)[], expr: string, event_cb: Function, shots: number, language_features: (string)[]): boolean;
45
49
  /**
46
50
  * @param {string} solution_code
47
51
  * @param {any} exercise_sources_js
@@ -194,6 +198,7 @@ export interface ICell {
194
198
 
195
199
  export interface INotebookMetadata {
196
200
  targetProfile?: "unrestricted" | "base";
201
+ languageFeatures?: "v2-preview-syntax"[];
197
202
  }
198
203
 
199
204
  export interface IPosition {
@@ -225,10 +230,11 @@ export class DebugService {
225
230
  /**
226
231
  * @param {(Array<any>)[]} sources
227
232
  * @param {string} target_profile
228
- * @param {string | undefined} [entry]
233
+ * @param {string | undefined} entry
234
+ * @param {(string)[]} language_features
229
235
  * @returns {string}
230
236
  */
231
- load_source(sources: (Array<any>)[], target_profile: string, entry?: string): string;
237
+ load_source(sources: (Array<any>)[], target_profile: string, entry: string | undefined, language_features: (string)[]): string;
232
238
  /**
233
239
  * @returns {IQuantumStateList}
234
240
  */
@@ -388,7 +394,7 @@ export interface InitOutput {
388
394
  readonly memory: WebAssembly.Memory;
389
395
  readonly __wbg_debugservice_free: (a: number) => void;
390
396
  readonly debugservice_new: () => number;
391
- readonly debugservice_load_source: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
397
+ readonly debugservice_load_source: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
392
398
  readonly debugservice_capture_quantum_state: (a: number) => number;
393
399
  readonly debugservice_get_stack_frames: (a: number) => number;
394
400
  readonly debugservice_eval_next: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -420,11 +426,11 @@ export interface InitOutput {
420
426
  readonly projectloader_new: (a: number, b: number, c: number) => number;
421
427
  readonly projectloader_load_project: (a: number, b: number) => number;
422
428
  readonly git_hash: (a: number) => void;
423
- readonly get_qir: (a: number, b: number, c: number) => void;
424
- readonly get_estimates: (a: number, b: number, c: number, d: number, e: number) => void;
429
+ readonly get_qir: (a: number, b: number, c: number, d: number, e: number) => void;
430
+ readonly get_estimates: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
425
431
  readonly get_library_source_content: (a: number, b: number, c: number) => void;
426
- readonly get_hir: (a: number, b: number, c: number) => void;
427
- readonly run: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
432
+ readonly get_hir: (a: number, b: number, c: number, d: number, e: number) => void;
433
+ readonly run: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
428
434
  readonly check_exercise_solution: (a: number, b: number, c: number, d: number) => number;
429
435
  readonly generate_docs: () => number;
430
436
  readonly __wbindgen_export_0: (a: number, b: number) => number;
@@ -308,66 +308,72 @@ export function git_hash() {
308
308
 
309
309
  /**
310
310
  * @param {(Array<any>)[]} sources
311
+ * @param {(string)[]} language_features
311
312
  * @returns {string}
312
313
  */
313
- export function get_qir(sources) {
314
- let deferred3_0;
315
- let deferred3_1;
314
+ export function get_qir(sources, language_features) {
315
+ let deferred4_0;
316
+ let deferred4_1;
316
317
  try {
317
318
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
318
319
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
319
320
  const len0 = WASM_VECTOR_LEN;
320
- wasm.get_qir(retptr, ptr0, len0);
321
+ const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
322
+ const len1 = WASM_VECTOR_LEN;
323
+ wasm.get_qir(retptr, ptr0, len0, ptr1, len1);
321
324
  var r0 = getInt32Memory0()[retptr / 4 + 0];
322
325
  var r1 = getInt32Memory0()[retptr / 4 + 1];
323
326
  var r2 = getInt32Memory0()[retptr / 4 + 2];
324
327
  var r3 = getInt32Memory0()[retptr / 4 + 3];
325
- var ptr2 = r0;
326
- var len2 = r1;
328
+ var ptr3 = r0;
329
+ var len3 = r1;
327
330
  if (r3) {
328
- ptr2 = 0; len2 = 0;
331
+ ptr3 = 0; len3 = 0;
329
332
  throw takeObject(r2);
330
333
  }
331
- deferred3_0 = ptr2;
332
- deferred3_1 = len2;
333
- return getStringFromWasm0(ptr2, len2);
334
+ deferred4_0 = ptr3;
335
+ deferred4_1 = len3;
336
+ return getStringFromWasm0(ptr3, len3);
334
337
  } finally {
335
338
  wasm.__wbindgen_add_to_stack_pointer(16);
336
- wasm.__wbindgen_export_4(deferred3_0, deferred3_1, 1);
339
+ wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
337
340
  }
338
341
  }
339
342
 
340
343
  /**
341
344
  * @param {(Array<any>)[]} sources
342
345
  * @param {string} params
346
+ * @param {(string)[]} language_features
343
347
  * @returns {string}
344
348
  */
345
- export function get_estimates(sources, params) {
346
- let deferred4_0;
347
- let deferred4_1;
349
+ export function get_estimates(sources, params, language_features) {
350
+ let deferred5_0;
351
+ let deferred5_1;
348
352
  try {
349
353
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
350
354
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
351
355
  const len0 = WASM_VECTOR_LEN;
352
356
  const ptr1 = passStringToWasm0(params, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
353
357
  const len1 = WASM_VECTOR_LEN;
354
- wasm.get_estimates(retptr, ptr0, len0, ptr1, len1);
358
+ const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
359
+ const len2 = WASM_VECTOR_LEN;
360
+ wasm.get_estimates(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
355
361
  var r0 = getInt32Memory0()[retptr / 4 + 0];
356
362
  var r1 = getInt32Memory0()[retptr / 4 + 1];
357
363
  var r2 = getInt32Memory0()[retptr / 4 + 2];
358
364
  var r3 = getInt32Memory0()[retptr / 4 + 3];
359
- var ptr3 = r0;
360
- var len3 = r1;
365
+ var ptr4 = r0;
366
+ var len4 = r1;
361
367
  if (r3) {
362
- ptr3 = 0; len3 = 0;
368
+ ptr4 = 0; len4 = 0;
363
369
  throw takeObject(r2);
364
370
  }
365
- deferred4_0 = ptr3;
366
- deferred4_1 = len3;
367
- return getStringFromWasm0(ptr3, len3);
371
+ deferred5_0 = ptr4;
372
+ deferred5_1 = len4;
373
+ return getStringFromWasm0(ptr4, len4);
368
374
  } finally {
369
375
  wasm.__wbindgen_add_to_stack_pointer(16);
370
- wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
376
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
371
377
  }
372
378
  }
373
379
 
@@ -396,24 +402,35 @@ export function get_library_source_content(name) {
396
402
 
397
403
  /**
398
404
  * @param {string} code
405
+ * @param {(string)[]} language_features
399
406
  * @returns {string}
400
407
  */
401
- export function get_hir(code) {
402
- let deferred2_0;
403
- let deferred2_1;
408
+ export function get_hir(code, language_features) {
409
+ let deferred4_0;
410
+ let deferred4_1;
404
411
  try {
405
412
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
406
413
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
407
414
  const len0 = WASM_VECTOR_LEN;
408
- wasm.get_hir(retptr, ptr0, len0);
415
+ const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
416
+ const len1 = WASM_VECTOR_LEN;
417
+ wasm.get_hir(retptr, ptr0, len0, ptr1, len1);
409
418
  var r0 = getInt32Memory0()[retptr / 4 + 0];
410
419
  var r1 = getInt32Memory0()[retptr / 4 + 1];
411
- deferred2_0 = r0;
412
- deferred2_1 = r1;
413
- return getStringFromWasm0(r0, r1);
420
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
421
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
422
+ var ptr3 = r0;
423
+ var len3 = r1;
424
+ if (r3) {
425
+ ptr3 = 0; len3 = 0;
426
+ throw takeObject(r2);
427
+ }
428
+ deferred4_0 = ptr3;
429
+ deferred4_1 = len3;
430
+ return getStringFromWasm0(ptr3, len3);
414
431
  } finally {
415
432
  wasm.__wbindgen_add_to_stack_pointer(16);
416
- wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
433
+ wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
417
434
  }
418
435
  }
419
436
 
@@ -422,16 +439,19 @@ export function get_hir(code) {
422
439
  * @param {string} expr
423
440
  * @param {Function} event_cb
424
441
  * @param {number} shots
442
+ * @param {(string)[]} language_features
425
443
  * @returns {boolean}
426
444
  */
427
- export function run(sources, expr, event_cb, shots) {
445
+ export function run(sources, expr, event_cb, shots, language_features) {
428
446
  try {
429
447
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
430
448
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
431
449
  const len0 = WASM_VECTOR_LEN;
432
450
  const ptr1 = passStringToWasm0(expr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
433
451
  const len1 = WASM_VECTOR_LEN;
434
- wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots);
452
+ const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
453
+ const len2 = WASM_VECTOR_LEN;
454
+ wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots, ptr2, len2);
435
455
  var r0 = getInt32Memory0()[retptr / 4 + 0];
436
456
  var r1 = getInt32Memory0()[retptr / 4 + 1];
437
457
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -509,12 +529,13 @@ export class DebugService {
509
529
  /**
510
530
  * @param {(Array<any>)[]} sources
511
531
  * @param {string} target_profile
512
- * @param {string | undefined} [entry]
532
+ * @param {string | undefined} entry
533
+ * @param {(string)[]} language_features
513
534
  * @returns {string}
514
535
  */
515
- load_source(sources, target_profile, entry) {
516
- let deferred4_0;
517
- let deferred4_1;
536
+ load_source(sources, target_profile, entry, language_features) {
537
+ let deferred5_0;
538
+ let deferred5_1;
518
539
  try {
519
540
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
520
541
  const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
@@ -523,15 +544,17 @@ export class DebugService {
523
544
  const len1 = WASM_VECTOR_LEN;
524
545
  var ptr2 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
525
546
  var len2 = WASM_VECTOR_LEN;
526
- wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
547
+ const ptr3 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
548
+ const len3 = WASM_VECTOR_LEN;
549
+ wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
527
550
  var r0 = getInt32Memory0()[retptr / 4 + 0];
528
551
  var r1 = getInt32Memory0()[retptr / 4 + 1];
529
- deferred4_0 = r0;
530
- deferred4_1 = r1;
552
+ deferred5_0 = r0;
553
+ deferred5_1 = r1;
531
554
  return getStringFromWasm0(r0, r1);
532
555
  } finally {
533
556
  wasm.__wbindgen_add_to_stack_pointer(16);
534
- wasm.__wbindgen_export_4(deferred4_0, deferred4_1, 1);
557
+ wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
535
558
  }
536
559
  }
537
560
  /**
@@ -949,14 +972,6 @@ function __wbg_get_imports() {
949
972
  const ret = false;
950
973
  return ret;
951
974
  };
952
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
953
- const ret = BigInt.asUintN(64, arg0);
954
- return addHeapObject(ret);
955
- };
956
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
957
- const ret = new Error(getStringFromWasm0(arg0, arg1));
958
- return addHeapObject(ret);
959
- };
960
975
  imports.wbg.__wbindgen_is_object = function(arg0) {
961
976
  const val = getObject(arg0);
962
977
  const ret = typeof(val) === 'object' && val !== null;
@@ -970,6 +985,14 @@ function __wbg_get_imports() {
970
985
  const ret = getObject(arg0) in getObject(arg1);
971
986
  return ret;
972
987
  };
988
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
989
+ const ret = BigInt.asUintN(64, arg0);
990
+ return addHeapObject(ret);
991
+ };
992
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
993
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
994
+ return addHeapObject(ret);
995
+ };
973
996
  imports.wbg.__wbindgen_number_new = function(arg0) {
974
997
  const ret = arg0;
975
998
  return addHeapObject(ret);
@@ -1244,7 +1267,7 @@ function __wbg_get_imports() {
1244
1267
  const ret = wasm.memory;
1245
1268
  return addHeapObject(ret);
1246
1269
  };
1247
- imports.wbg.__wbindgen_closure_wrapper607 = function(arg0, arg1, arg2) {
1270
+ imports.wbg.__wbindgen_closure_wrapper611 = function(arg0, arg1, arg2) {
1248
1271
  const ret = makeMutClosure(arg0, arg1, 219, __wbg_adapter_46);
1249
1272
  return addHeapObject(ret);
1250
1273
  };
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.1.4-dev",
4
+ "version": "1.1.6-dev",
5
5
  "license": "MIT",
6
6
  "engines": {
7
7
  "node": ">=16.17.0"
@@ -82,7 +82,9 @@ function frontierEntryToPlotEntry(entry: FrontierEntry): PlotItem {
82
82
  label:
83
83
  entry.physicalCountsFormatted.runtime +
84
84
  ", physical qubits: " +
85
- entry.physicalCountsFormatted.physicalQubits,
85
+ entry.physicalCountsFormatted.physicalQubits +
86
+ ", code distance: " +
87
+ entry.logicalQubit.codeDistance,
86
88
  };
87
89
  }
88
90
 
@@ -97,7 +99,9 @@ function reDataToRowScatter(data: ReData, color: string): ScatterSeries {
97
99
  label:
98
100
  data.physicalCountsFormatted.runtime +
99
101
  ", physical qubits: " +
100
- data.physicalCountsFormatted.physicalQubits,
102
+ data.physicalCountsFormatted.physicalQubits +
103
+ ", code distance: " +
104
+ data.logicalQubit.codeDistance,
101
105
  },
102
106
  ],
103
107
  };