qsharp-lang 1.6.0 → 1.6.2-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 (288) hide show
  1. package/dist/browser.d.ts +4 -9
  2. package/dist/browser.js +4 -5
  3. package/dist/compiler/compiler.d.ts +20 -37
  4. package/dist/compiler/compiler.js +30 -50
  5. package/dist/debug-service/debug-service.d.ts +3 -3
  6. package/dist/debug-service/debug-service.js +4 -3
  7. package/dist/katas-content.generated.d.ts +5 -10
  8. package/dist/katas-content.generated.js +2722 -1849
  9. package/dist/katas-content.generated.md.d.ts +57 -0
  10. package/dist/katas-content.generated.md.js +7990 -0
  11. package/dist/katas-md.d.ts +6 -0
  12. package/dist/katas-md.js +14 -0
  13. package/dist/katas.d.ts +1 -2
  14. package/dist/language-service/language-service.d.ts +3 -4
  15. package/dist/language-service/language-service.js +8 -3
  16. package/dist/main.d.ts +3 -6
  17. package/dist/main.js +4 -4
  18. package/dist/samples.generated.js +1 -1
  19. package/docs/Microsoft.Quantum.Arrays/All.md +1 -1
  20. package/docs/Microsoft.Quantum.Arrays/Any.md +1 -1
  21. package/docs/Microsoft.Quantum.Arrays/Chunks.md +1 -1
  22. package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +1 -1
  23. package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +1 -1
  24. package/docs/Microsoft.Quantum.Arrays/Count.md +1 -1
  25. package/docs/Microsoft.Quantum.Arrays/Diagonal.md +1 -1
  26. package/docs/Microsoft.Quantum.Arrays/DrawMany.md +1 -1
  27. package/docs/Microsoft.Quantum.Arrays/Enumerated.md +1 -1
  28. package/docs/Microsoft.Quantum.Arrays/Excluding.md +1 -1
  29. package/docs/Microsoft.Quantum.Arrays/Filtered.md +1 -1
  30. package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +1 -1
  31. package/docs/Microsoft.Quantum.Arrays/Flattened.md +1 -1
  32. package/docs/Microsoft.Quantum.Arrays/Fold.md +1 -1
  33. package/docs/Microsoft.Quantum.Arrays/ForEach.md +1 -1
  34. package/docs/Microsoft.Quantum.Arrays/Head.md +1 -1
  35. package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +1 -1
  36. package/docs/Microsoft.Quantum.Arrays/IndexOf.md +1 -1
  37. package/docs/Microsoft.Quantum.Arrays/IndexRange.md +1 -1
  38. package/docs/Microsoft.Quantum.Arrays/Interleaved.md +1 -1
  39. package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +1 -1
  40. package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +1 -1
  41. package/docs/Microsoft.Quantum.Arrays/IsSorted.md +1 -1
  42. package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +1 -1
  43. package/docs/Microsoft.Quantum.Arrays/Mapped.md +1 -1
  44. package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +1 -1
  45. package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +1 -1
  46. package/docs/Microsoft.Quantum.Arrays/Most.md +1 -1
  47. package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +1 -1
  48. package/docs/Microsoft.Quantum.Arrays/Padded.md +1 -1
  49. package/docs/Microsoft.Quantum.Arrays/Partitioned.md +1 -1
  50. package/docs/Microsoft.Quantum.Arrays/Rest.md +1 -1
  51. package/docs/Microsoft.Quantum.Arrays/Reversed.md +1 -1
  52. package/docs/Microsoft.Quantum.Arrays/SequenceI.md +1 -1
  53. package/docs/Microsoft.Quantum.Arrays/SequenceL.md +1 -1
  54. package/docs/Microsoft.Quantum.Arrays/Sorted.md +1 -1
  55. package/docs/Microsoft.Quantum.Arrays/Subarray.md +1 -1
  56. package/docs/Microsoft.Quantum.Arrays/Swapped.md +1 -1
  57. package/docs/Microsoft.Quantum.Arrays/Tail.md +1 -1
  58. package/docs/Microsoft.Quantum.Arrays/Transposed.md +1 -1
  59. package/docs/Microsoft.Quantum.Arrays/Unzipped.md +1 -1
  60. package/docs/Microsoft.Quantum.Arrays/Where.md +1 -1
  61. package/docs/Microsoft.Quantum.Arrays/Windows.md +1 -1
  62. package/docs/Microsoft.Quantum.Arrays/Zipped.md +1 -1
  63. package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +1 -1
  64. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +1 -1
  65. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +1 -1
  66. package/docs/Microsoft.Quantum.Canon/ApplyP.md +1 -1
  67. package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +1 -1
  68. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +1 -1
  69. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +1 -1
  70. package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +1 -1
  71. package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +1 -1
  72. package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +1 -1
  73. package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +1 -1
  74. package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +1 -1
  75. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +1 -1
  76. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +1 -1
  77. package/docs/Microsoft.Quantum.Canon/CX.md +1 -1
  78. package/docs/Microsoft.Quantum.Canon/CY.md +1 -1
  79. package/docs/Microsoft.Quantum.Canon/CZ.md +1 -1
  80. package/docs/Microsoft.Quantum.Canon/Fst.md +1 -1
  81. package/docs/Microsoft.Quantum.Canon/Snd.md +1 -1
  82. package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +1 -1
  83. package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +1 -1
  84. package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +1 -1
  85. package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +1 -1
  86. package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +1 -1
  87. package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +1 -1
  88. package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +1 -1
  89. package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +1 -1
  90. package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +1 -1
  91. package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +1 -1
  92. package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +1 -1
  93. package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +1 -1
  94. package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +1 -1
  95. package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +1 -1
  96. package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +1 -1
  97. package/docs/Microsoft.Quantum.Core/Length.md +1 -1
  98. package/docs/Microsoft.Quantum.Core/RangeEnd.md +1 -1
  99. package/docs/Microsoft.Quantum.Core/RangeReverse.md +1 -1
  100. package/docs/Microsoft.Quantum.Core/RangeStart.md +1 -1
  101. package/docs/Microsoft.Quantum.Core/RangeStep.md +1 -1
  102. package/docs/Microsoft.Quantum.Core/Repeated.md +1 -1
  103. package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +1 -1
  104. package/docs/Microsoft.Quantum.Diagnostics/DumpRegister.md +1 -1
  105. package/docs/Microsoft.Quantum.Diagnostics/Fact.md +1 -1
  106. package/docs/Microsoft.Quantum.Intrinsic/AND.md +33 -0
  107. package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +1 -1
  108. package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +1 -1
  109. package/docs/Microsoft.Quantum.Intrinsic/Exp.md +1 -1
  110. package/docs/Microsoft.Quantum.Intrinsic/H.md +1 -1
  111. package/docs/Microsoft.Quantum.Intrinsic/I.md +1 -1
  112. package/docs/Microsoft.Quantum.Intrinsic/M.md +1 -1
  113. package/docs/Microsoft.Quantum.Intrinsic/Measure.md +1 -1
  114. package/docs/Microsoft.Quantum.Intrinsic/Message.md +1 -1
  115. package/docs/Microsoft.Quantum.Intrinsic/R.md +1 -1
  116. package/docs/Microsoft.Quantum.Intrinsic/R1.md +1 -1
  117. package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +1 -1
  118. package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +1 -1
  119. package/docs/Microsoft.Quantum.Intrinsic/Reset.md +1 -1
  120. package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +1 -1
  121. package/docs/Microsoft.Quantum.Intrinsic/Rx.md +1 -1
  122. package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +1 -1
  123. package/docs/Microsoft.Quantum.Intrinsic/Ry.md +1 -1
  124. package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +1 -1
  125. package/docs/Microsoft.Quantum.Intrinsic/Rz.md +1 -1
  126. package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +1 -1
  127. package/docs/Microsoft.Quantum.Intrinsic/S.md +1 -1
  128. package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +1 -1
  129. package/docs/Microsoft.Quantum.Intrinsic/T.md +1 -1
  130. package/docs/Microsoft.Quantum.Intrinsic/X.md +1 -1
  131. package/docs/Microsoft.Quantum.Intrinsic/Y.md +1 -1
  132. package/docs/Microsoft.Quantum.Intrinsic/Z.md +1 -1
  133. package/docs/Microsoft.Quantum.Logical/Xor.md +1 -1
  134. package/docs/Microsoft.Quantum.Math/AbsComplex.md +1 -1
  135. package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +1 -1
  136. package/docs/Microsoft.Quantum.Math/AbsD.md +1 -1
  137. package/docs/Microsoft.Quantum.Math/AbsI.md +1 -1
  138. package/docs/Microsoft.Quantum.Math/AbsL.md +1 -1
  139. package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +1 -1
  140. package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +1 -1
  141. package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +1 -1
  142. package/docs/Microsoft.Quantum.Math/ArcCos.md +1 -1
  143. package/docs/Microsoft.Quantum.Math/ArcCosh.md +1 -1
  144. package/docs/Microsoft.Quantum.Math/ArcSin.md +1 -1
  145. package/docs/Microsoft.Quantum.Math/ArcSinh.md +1 -1
  146. package/docs/Microsoft.Quantum.Math/ArcTan.md +1 -1
  147. package/docs/Microsoft.Quantum.Math/ArcTan2.md +1 -1
  148. package/docs/Microsoft.Quantum.Math/ArcTanh.md +1 -1
  149. package/docs/Microsoft.Quantum.Math/ArgComplex.md +1 -1
  150. package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +1 -1
  151. package/docs/Microsoft.Quantum.Math/Binom.md +1 -1
  152. package/docs/Microsoft.Quantum.Math/BitSizeI.md +1 -1
  153. package/docs/Microsoft.Quantum.Math/BitSizeL.md +1 -1
  154. package/docs/Microsoft.Quantum.Math/Ceiling.md +1 -1
  155. package/docs/Microsoft.Quantum.Math/Complex.md +2 -2
  156. package/docs/Microsoft.Quantum.Math/ComplexPolar.md +2 -2
  157. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +1 -1
  158. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +1 -1
  159. package/docs/Microsoft.Quantum.Math/Cos.md +1 -1
  160. package/docs/Microsoft.Quantum.Math/Cosh.md +1 -1
  161. package/docs/Microsoft.Quantum.Math/DivRemI.md +1 -1
  162. package/docs/Microsoft.Quantum.Math/DivRemL.md +1 -1
  163. package/docs/Microsoft.Quantum.Math/DividedByC.md +1 -1
  164. package/docs/Microsoft.Quantum.Math/DividedByCP.md +1 -1
  165. package/docs/Microsoft.Quantum.Math/E.md +1 -1
  166. package/docs/Microsoft.Quantum.Math/ExpModI.md +1 -1
  167. package/docs/Microsoft.Quantum.Math/ExpModL.md +1 -1
  168. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +1 -1
  169. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +1 -1
  170. package/docs/Microsoft.Quantum.Math/FactorialI.md +1 -1
  171. package/docs/Microsoft.Quantum.Math/FactorialL.md +1 -1
  172. package/docs/Microsoft.Quantum.Math/Floor.md +1 -1
  173. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +1 -1
  174. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +1 -1
  175. package/docs/Microsoft.Quantum.Math/HammingWeightI.md +1 -1
  176. package/docs/Microsoft.Quantum.Math/InverseModI.md +1 -1
  177. package/docs/Microsoft.Quantum.Math/InverseModL.md +1 -1
  178. package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +1 -1
  179. package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +1 -1
  180. package/docs/Microsoft.Quantum.Math/IsInfinite.md +1 -1
  181. package/docs/Microsoft.Quantum.Math/IsNaN.md +1 -1
  182. package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +1 -1
  183. package/docs/Microsoft.Quantum.Math/Lg.md +1 -1
  184. package/docs/Microsoft.Quantum.Math/Log.md +1 -1
  185. package/docs/Microsoft.Quantum.Math/Log10.md +1 -1
  186. package/docs/Microsoft.Quantum.Math/LogFactorialD.md +1 -1
  187. package/docs/Microsoft.Quantum.Math/LogGammaD.md +1 -1
  188. package/docs/Microsoft.Quantum.Math/LogOf2.md +1 -1
  189. package/docs/Microsoft.Quantum.Math/Max.md +1 -1
  190. package/docs/Microsoft.Quantum.Math/MaxD.md +1 -1
  191. package/docs/Microsoft.Quantum.Math/MaxI.md +1 -1
  192. package/docs/Microsoft.Quantum.Math/MaxL.md +1 -1
  193. package/docs/Microsoft.Quantum.Math/Min.md +1 -1
  194. package/docs/Microsoft.Quantum.Math/MinD.md +1 -1
  195. package/docs/Microsoft.Quantum.Math/MinI.md +1 -1
  196. package/docs/Microsoft.Quantum.Math/MinL.md +1 -1
  197. package/docs/Microsoft.Quantum.Math/MinusC.md +1 -1
  198. package/docs/Microsoft.Quantum.Math/MinusCP.md +1 -1
  199. package/docs/Microsoft.Quantum.Math/ModulusI.md +1 -1
  200. package/docs/Microsoft.Quantum.Math/ModulusL.md +1 -1
  201. package/docs/Microsoft.Quantum.Math/NegationC.md +1 -1
  202. package/docs/Microsoft.Quantum.Math/NegationCP.md +1 -1
  203. package/docs/Microsoft.Quantum.Math/PI.md +1 -1
  204. package/docs/Microsoft.Quantum.Math/PNorm.md +1 -1
  205. package/docs/Microsoft.Quantum.Math/PNormalized.md +1 -1
  206. package/docs/Microsoft.Quantum.Math/PlusC.md +1 -1
  207. package/docs/Microsoft.Quantum.Math/PlusCP.md +1 -1
  208. package/docs/Microsoft.Quantum.Math/PowC.md +1 -1
  209. package/docs/Microsoft.Quantum.Math/PowCP.md +1 -1
  210. package/docs/Microsoft.Quantum.Math/RealMod.md +1 -1
  211. package/docs/Microsoft.Quantum.Math/Round.md +1 -1
  212. package/docs/Microsoft.Quantum.Math/SignD.md +1 -1
  213. package/docs/Microsoft.Quantum.Math/SignI.md +1 -1
  214. package/docs/Microsoft.Quantum.Math/SignL.md +1 -1
  215. package/docs/Microsoft.Quantum.Math/Sin.md +1 -1
  216. package/docs/Microsoft.Quantum.Math/Sinh.md +1 -1
  217. package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +1 -1
  218. package/docs/Microsoft.Quantum.Math/Sqrt.md +1 -1
  219. package/docs/Microsoft.Quantum.Math/SquaredNorm.md +1 -1
  220. package/docs/Microsoft.Quantum.Math/Tan.md +1 -1
  221. package/docs/Microsoft.Quantum.Math/Tanh.md +1 -1
  222. package/docs/Microsoft.Quantum.Math/TimesC.md +1 -1
  223. package/docs/Microsoft.Quantum.Math/TimesCP.md +1 -1
  224. package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +1 -1
  225. package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +1 -1
  226. package/docs/Microsoft.Quantum.Math/Truncate.md +1 -1
  227. package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +1 -1
  228. package/docs/Microsoft.Quantum.Measurement/MResetX.md +1 -1
  229. package/docs/Microsoft.Quantum.Measurement/MResetY.md +1 -1
  230. package/docs/Microsoft.Quantum.Measurement/MResetZ.md +1 -1
  231. package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +1 -1
  232. package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +1 -1
  233. package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +1 -1
  234. package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +1 -1
  235. package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +1 -1
  236. package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +1 -1
  237. package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +1 -1
  238. package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +1 -1
  239. package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +1 -1
  240. package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +1 -1
  241. package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +1 -1
  242. package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +1 -1
  243. package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +1 -1
  244. package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +1 -1
  245. package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +1 -1
  246. package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +1 -1
  247. package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +1 -1
  248. package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +1 -1
  249. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +1 -1
  250. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +1 -1
  251. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +1 -1
  252. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +1 -1
  253. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +1 -1
  254. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +1 -1
  255. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +1 -1
  256. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +1 -1
  257. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +1 -1
  258. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +1 -1
  259. package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +1 -1
  260. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +1 -1
  261. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +1 -1
  262. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +1 -1
  263. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +1 -1
  264. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +1 -1
  265. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +1 -1
  266. package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +1 -1
  267. package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +1 -1
  268. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +1 -1
  269. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +1 -1
  270. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +1 -1
  271. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +1 -1
  272. package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +1 -1
  273. package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +1 -1
  274. package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +1 -1
  275. package/docs/toc.yml +1 -0
  276. package/lib/node/qsc_wasm.cjs +140 -159
  277. package/lib/node/qsc_wasm.d.cts +63 -36
  278. package/lib/node/qsc_wasm_bg.wasm +0 -0
  279. package/lib/web/qsc_wasm.d.ts +72 -45
  280. package/lib/web/qsc_wasm.js +130 -154
  281. package/lib/web/qsc_wasm_bg.wasm +0 -0
  282. package/package.json +3 -1
  283. package/ux/estimatesOverview.tsx +2 -0
  284. package/ux/estimatesPanel.tsx +2 -0
  285. package/ux/qsharp-ux.css +30 -5
  286. package/ux/saveImage.tsx +107 -0
  287. package/ux/saveImageUtil.tsx +72 -0
  288. package/ux/scatterChart.tsx +31 -0
@@ -232,10 +232,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
232
232
  CLOSURE_DTORS.register(real, state, state);
233
233
  return real;
234
234
  }
235
- function __wbg_adapter_54(arg0, arg1, arg2) {
235
+ function __wbg_adapter_52(arg0, arg1, arg2) {
236
236
  wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2));
237
237
  }
238
238
 
239
+ let stack_pointer = 128;
240
+
241
+ function addBorrowedObject(obj) {
242
+ if (stack_pointer == 1) throw new Error('out of js stack');
243
+ heap[--stack_pointer] = obj;
244
+ return stack_pointer;
245
+ }
246
+
239
247
  let cachedUint32Memory0 = null;
240
248
 
241
249
  function getUint32Memory0() {
@@ -245,6 +253,13 @@ function getUint32Memory0() {
245
253
  return cachedUint32Memory0;
246
254
  }
247
255
 
256
+ function passArray32ToWasm0(arg, malloc) {
257
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
258
+ getUint32Memory0().set(arg, ptr / 4);
259
+ WASM_VECTOR_LEN = arg.length;
260
+ return ptr;
261
+ }
262
+
248
263
  function passArrayJsValueToWasm0(array, malloc) {
249
264
  const ptr = malloc(array.length * 4, 4) >>> 0;
250
265
  const mem = getUint32Memory0();
@@ -255,21 +270,6 @@ function passArrayJsValueToWasm0(array, malloc) {
255
270
  return ptr;
256
271
  }
257
272
 
258
- let stack_pointer = 128;
259
-
260
- function addBorrowedObject(obj) {
261
- if (stack_pointer == 1) throw new Error('out of js stack');
262
- heap[--stack_pointer] = obj;
263
- return stack_pointer;
264
- }
265
-
266
- function passArray32ToWasm0(arg, malloc) {
267
- const ptr = malloc(arg.length * 4, 4) >>> 0;
268
- getUint32Memory0().set(arg, ptr / 4);
269
- WASM_VECTOR_LEN = arg.length;
270
- return ptr;
271
- }
272
-
273
273
  function getArrayJsValueFromWasm0(ptr, len) {
274
274
  ptr = ptr >>> 0;
275
275
  const mem = getUint32Memory0();
@@ -326,100 +326,76 @@ module.exports.git_hash = function() {
326
326
  };
327
327
 
328
328
  /**
329
- * @param {(Array<any>)[]} sources
330
- * @param {(string)[]} language_features
331
- * @param {string} profile
329
+ * @param {IProgramConfig} program
332
330
  * @returns {string}
333
331
  */
334
- module.exports.get_qir = function(sources, language_features, profile) {
335
- let deferred5_0;
336
- let deferred5_1;
332
+ module.exports.get_qir = function(program) {
333
+ let deferred2_0;
334
+ let deferred2_1;
337
335
  try {
338
336
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
339
- const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
340
- const len0 = WASM_VECTOR_LEN;
341
- const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
342
- const len1 = WASM_VECTOR_LEN;
343
- const ptr2 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
344
- const len2 = WASM_VECTOR_LEN;
345
- wasm.get_qir(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
337
+ wasm.get_qir(retptr, addHeapObject(program));
346
338
  var r0 = getInt32Memory0()[retptr / 4 + 0];
347
339
  var r1 = getInt32Memory0()[retptr / 4 + 1];
348
340
  var r2 = getInt32Memory0()[retptr / 4 + 2];
349
341
  var r3 = getInt32Memory0()[retptr / 4 + 3];
350
- var ptr4 = r0;
351
- var len4 = r1;
342
+ var ptr1 = r0;
343
+ var len1 = r1;
352
344
  if (r3) {
353
- ptr4 = 0; len4 = 0;
345
+ ptr1 = 0; len1 = 0;
354
346
  throw takeObject(r2);
355
347
  }
356
- deferred5_0 = ptr4;
357
- deferred5_1 = len4;
358
- return getStringFromWasm0(ptr4, len4);
348
+ deferred2_0 = ptr1;
349
+ deferred2_1 = len1;
350
+ return getStringFromWasm0(ptr1, len1);
359
351
  } finally {
360
352
  wasm.__wbindgen_add_to_stack_pointer(16);
361
- wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
353
+ wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
362
354
  }
363
355
  };
364
356
 
365
357
  /**
366
- * @param {(Array<any>)[]} sources
358
+ * @param {IProgramConfig} program
367
359
  * @param {string} params
368
- * @param {(string)[]} language_features
369
- * @param {string} targetProfile
370
360
  * @returns {string}
371
361
  */
372
- module.exports.get_estimates = function(sources, params, language_features, targetProfile) {
373
- let deferred6_0;
374
- let deferred6_1;
362
+ module.exports.get_estimates = function(program, params) {
363
+ let deferred3_0;
364
+ let deferred3_1;
375
365
  try {
376
366
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
377
- const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
367
+ const ptr0 = passStringToWasm0(params, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
378
368
  const len0 = WASM_VECTOR_LEN;
379
- const ptr1 = passStringToWasm0(params, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
380
- const len1 = WASM_VECTOR_LEN;
381
- const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
382
- const len2 = WASM_VECTOR_LEN;
383
- const ptr3 = passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
384
- const len3 = WASM_VECTOR_LEN;
385
- wasm.get_estimates(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
369
+ wasm.get_estimates(retptr, addHeapObject(program), ptr0, len0);
386
370
  var r0 = getInt32Memory0()[retptr / 4 + 0];
387
371
  var r1 = getInt32Memory0()[retptr / 4 + 1];
388
372
  var r2 = getInt32Memory0()[retptr / 4 + 2];
389
373
  var r3 = getInt32Memory0()[retptr / 4 + 3];
390
- var ptr5 = r0;
391
- var len5 = r1;
374
+ var ptr2 = r0;
375
+ var len2 = r1;
392
376
  if (r3) {
393
- ptr5 = 0; len5 = 0;
377
+ ptr2 = 0; len2 = 0;
394
378
  throw takeObject(r2);
395
379
  }
396
- deferred6_0 = ptr5;
397
- deferred6_1 = len5;
398
- return getStringFromWasm0(ptr5, len5);
380
+ deferred3_0 = ptr2;
381
+ deferred3_1 = len2;
382
+ return getStringFromWasm0(ptr2, len2);
399
383
  } finally {
400
384
  wasm.__wbindgen_add_to_stack_pointer(16);
401
- wasm.__wbindgen_export_4(deferred6_0, deferred6_1, 1);
385
+ wasm.__wbindgen_export_4(deferred3_0, deferred3_1, 1);
402
386
  }
403
387
  };
404
388
 
405
389
  /**
406
- * @param {(Array<any>)[]} sources
407
- * @param {string} targetProfile
408
- * @param {(string)[]} language_features
390
+ * @param {IProgramConfig} program
409
391
  * @param {boolean} simulate
410
392
  * @param {IOperationInfo | undefined} [operation]
411
393
  * @returns {any}
412
394
  */
413
- module.exports.get_circuit = function(sources, targetProfile, language_features, simulate, operation) {
395
+ module.exports.get_circuit = function(program, simulate, operation) {
414
396
  try {
415
397
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
416
- const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
417
- const len0 = WASM_VECTOR_LEN;
418
- const ptr1 = passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
419
- const len1 = WASM_VECTOR_LEN;
420
- const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
421
- const len2 = WASM_VECTOR_LEN;
422
- wasm.get_circuit(retptr, ptr0, len0, ptr1, len1, ptr2, len2, simulate, isLikeNone(operation) ? 0 : addHeapObject(operation));
398
+ wasm.get_circuit(retptr, addHeapObject(program), simulate, isLikeNone(operation) ? 0 : addHeapObject(operation));
423
399
  var r0 = getInt32Memory0()[retptr / 4 + 0];
424
400
  var r1 = getInt32Memory0()[retptr / 4 + 1];
425
401
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -530,26 +506,18 @@ module.exports.get_hir = function(code, language_features, profile) {
530
506
  };
531
507
 
532
508
  /**
533
- * @param {(Array<any>)[]} sources
509
+ * @param {IProgramConfig} program
534
510
  * @param {string} expr
535
511
  * @param {Function} event_cb
536
512
  * @param {number} shots
537
- * @param {(string)[]} language_features
538
- * @param {string} profile
539
513
  * @returns {boolean}
540
514
  */
541
- module.exports.run = function(sources, expr, event_cb, shots, language_features, profile) {
515
+ module.exports.run = function(program, expr, event_cb, shots) {
542
516
  try {
543
517
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
544
- const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
518
+ const ptr0 = passStringToWasm0(expr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
545
519
  const len0 = WASM_VECTOR_LEN;
546
- const ptr1 = passStringToWasm0(expr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
547
- const len1 = WASM_VECTOR_LEN;
548
- const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
549
- const len2 = WASM_VECTOR_LEN;
550
- const ptr3 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
551
- const len3 = WASM_VECTOR_LEN;
552
- wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots, ptr2, len2, ptr3, len3);
520
+ wasm.run(retptr, addHeapObject(program), ptr0, len0, addBorrowedObject(event_cb), shots);
553
521
  var r0 = getInt32Memory0()[retptr / 4 + 0];
554
522
  var r1 = getInt32Memory0()[retptr / 4 + 1];
555
523
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -581,26 +549,18 @@ module.exports.check_exercise_solution = function(solution_code, exercise_source
581
549
  };
582
550
 
583
551
  /**
584
- * @param {(Array<any>)[] | undefined} [additionalSources]
585
- * @param {string | undefined} [targetProfile]
586
- * @param {(string)[] | undefined} [languageFeatures]
552
+ * @param {IProgramConfig | undefined} [additional_program]
587
553
  * @returns {(IDocFile)[]}
588
554
  */
589
- module.exports.generate_docs = function(additionalSources, targetProfile, languageFeatures) {
555
+ module.exports.generate_docs = function(additional_program) {
590
556
  try {
591
557
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
592
- var ptr0 = isLikeNone(additionalSources) ? 0 : passArrayJsValueToWasm0(additionalSources, wasm.__wbindgen_export_0);
593
- var len0 = WASM_VECTOR_LEN;
594
- var ptr1 = isLikeNone(targetProfile) ? 0 : passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
595
- var len1 = WASM_VECTOR_LEN;
596
- var ptr2 = isLikeNone(languageFeatures) ? 0 : passArrayJsValueToWasm0(languageFeatures, wasm.__wbindgen_export_0);
597
- var len2 = WASM_VECTOR_LEN;
598
- wasm.generate_docs(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
558
+ wasm.generate_docs(retptr, isLikeNone(additional_program) ? 0 : addHeapObject(additional_program));
599
559
  var r0 = getInt32Memory0()[retptr / 4 + 0];
600
560
  var r1 = getInt32Memory0()[retptr / 4 + 1];
601
- var v4 = getArrayJsValueFromWasm0(r0, r1).slice();
561
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
602
562
  wasm.__wbindgen_export_4(r0, r1 * 4, 4);
603
- return v4;
563
+ return v1;
604
564
  } finally {
605
565
  wasm.__wbindgen_add_to_stack_pointer(16);
606
566
  }
@@ -613,7 +573,7 @@ function handleError(f, args) {
613
573
  wasm.__wbindgen_export_5(addHeapObject(e));
614
574
  }
615
575
  }
616
- function __wbg_adapter_176(arg0, arg1, arg2, arg3) {
576
+ function __wbg_adapter_186(arg0, arg1, arg2, arg3) {
617
577
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
618
578
  }
619
579
 
@@ -647,34 +607,26 @@ class DebugService {
647
607
  return this;
648
608
  }
649
609
  /**
650
- * @param {(Array<any>)[]} sources
651
- * @param {string} target_profile
652
- * @param {string | undefined} entry
653
- * @param {(string)[]} language_features
610
+ * @param {IProgramConfig} program
611
+ * @param {string | undefined} [entry]
654
612
  * @returns {string}
655
613
  */
656
- load_source(sources, target_profile, entry, language_features) {
657
- let deferred5_0;
658
- let deferred5_1;
614
+ load_program(program, entry) {
615
+ let deferred2_0;
616
+ let deferred2_1;
659
617
  try {
660
618
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
661
- const ptr0 = passArrayJsValueToWasm0(sources, wasm.__wbindgen_export_0);
662
- const len0 = WASM_VECTOR_LEN;
663
- const ptr1 = passStringToWasm0(target_profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
664
- const len1 = WASM_VECTOR_LEN;
665
- var ptr2 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
666
- var len2 = WASM_VECTOR_LEN;
667
- const ptr3 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
668
- const len3 = WASM_VECTOR_LEN;
669
- wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
619
+ var ptr0 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
620
+ var len0 = WASM_VECTOR_LEN;
621
+ wasm.debugservice_load_program(retptr, this.__wbg_ptr, addHeapObject(program), ptr0, len0);
670
622
  var r0 = getInt32Memory0()[retptr / 4 + 0];
671
623
  var r1 = getInt32Memory0()[retptr / 4 + 1];
672
- deferred5_0 = r0;
673
- deferred5_1 = r1;
624
+ deferred2_0 = r0;
625
+ deferred2_1 = r1;
674
626
  return getStringFromWasm0(r0, r1);
675
627
  } finally {
676
628
  wasm.__wbindgen_add_to_stack_pointer(16);
677
- wasm.__wbindgen_export_4(deferred5_0, deferred5_1, 1);
629
+ wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
678
630
  }
679
631
  }
680
632
  /**
@@ -848,13 +800,11 @@ class LanguageService {
848
800
  }
849
801
  /**
850
802
  * @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
851
- * @param {(uri: string) => Promise<string | null>} read_file
852
- * @param {(uri: string) => Promise<[string, number][]>} list_directory
853
- * @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
803
+ * @param {IProjectHost} host
854
804
  * @returns {Promise<any>}
855
805
  */
856
- start_background_work(diagnostics_callback, read_file, list_directory, get_manifest) {
857
- const ret = wasm.languageservice_start_background_work(this.__wbg_ptr, addHeapObject(diagnostics_callback), addHeapObject(read_file), addHeapObject(list_directory), addHeapObject(get_manifest));
806
+ start_background_work(diagnostics_callback, host) {
807
+ const ret = wasm.languageservice_start_background_work(this.__wbg_ptr, addHeapObject(diagnostics_callback), addHeapObject(host));
858
808
  return takeObject(ret);
859
809
  }
860
810
  /**
@@ -1080,21 +1030,21 @@ class ProjectLoader {
1080
1030
  wasm.__wbg_projectloader_free(ptr);
1081
1031
  }
1082
1032
  /**
1083
- * @param {(uri: string) => Promise<string | null>} read_file
1084
- * @param {(uri: string) => Promise<[string, number][]>} list_directory
1085
- * @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
1033
+ * @param {IProjectHost} project_host
1086
1034
  */
1087
- constructor(read_file, list_directory, get_manifest) {
1088
- const ret = wasm.projectloader_new(addHeapObject(read_file), addHeapObject(list_directory), addHeapObject(get_manifest));
1035
+ constructor(project_host) {
1036
+ const ret = wasm.projectloader_new(addHeapObject(project_host));
1089
1037
  this.__wbg_ptr = ret >>> 0;
1090
1038
  return this;
1091
1039
  }
1092
1040
  /**
1093
- * @param {{ manifestDirectory: string }} manifest
1094
- * @returns {Promise<[string, string][]>}
1041
+ * @param {string} directory
1042
+ * @returns {Promise<IProjectConfig>}
1095
1043
  */
1096
- load_project(manifest) {
1097
- const ret = wasm.projectloader_load_project(this.__wbg_ptr, addHeapObject(manifest));
1044
+ load_project(directory) {
1045
+ const ptr0 = passStringToWasm0(directory, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1046
+ const len0 = WASM_VECTOR_LEN;
1047
+ const ret = wasm.projectloader_load_project(this.__wbg_ptr, ptr0, len0);
1098
1048
  return takeObject(ret);
1099
1049
  }
1100
1050
  }
@@ -1120,27 +1070,6 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
1120
1070
  takeObject(arg0);
1121
1071
  };
1122
1072
 
1123
- module.exports.__wbindgen_is_object = function(arg0) {
1124
- const val = getObject(arg0);
1125
- const ret = typeof(val) === 'object' && val !== null;
1126
- return ret;
1127
- };
1128
-
1129
- module.exports.__wbindgen_is_undefined = function(arg0) {
1130
- const ret = getObject(arg0) === undefined;
1131
- return ret;
1132
- };
1133
-
1134
- module.exports.__wbindgen_in = function(arg0, arg1) {
1135
- const ret = getObject(arg0) in getObject(arg1);
1136
- return ret;
1137
- };
1138
-
1139
- module.exports.__wbindgen_is_string = function(arg0) {
1140
- const ret = typeof(getObject(arg0)) === 'string';
1141
- return ret;
1142
- };
1143
-
1144
1073
  module.exports.__wbindgen_error_new = function(arg0, arg1) {
1145
1074
  const ret = new Error(getStringFromWasm0(arg0, arg1));
1146
1075
  return addHeapObject(ret);
@@ -1167,6 +1096,17 @@ module.exports.__wbindgen_is_bigint = function(arg0) {
1167
1096
  return ret;
1168
1097
  };
1169
1098
 
1099
+ module.exports.__wbindgen_is_object = function(arg0) {
1100
+ const val = getObject(arg0);
1101
+ const ret = typeof(val) === 'object' && val !== null;
1102
+ return ret;
1103
+ };
1104
+
1105
+ module.exports.__wbindgen_in = function(arg0, arg1) {
1106
+ const ret = getObject(arg0) in getObject(arg1);
1107
+ return ret;
1108
+ };
1109
+
1170
1110
  module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
1171
1111
  const ret = arg0;
1172
1112
  return addHeapObject(ret);
@@ -1182,6 +1122,16 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
1182
1122
  return addHeapObject(ret);
1183
1123
  };
1184
1124
 
1125
+ module.exports.__wbindgen_is_undefined = function(arg0) {
1126
+ const ret = getObject(arg0) === undefined;
1127
+ return ret;
1128
+ };
1129
+
1130
+ module.exports.__wbindgen_is_string = function(arg0) {
1131
+ const ret = typeof(getObject(arg0)) === 'string';
1132
+ return ret;
1133
+ };
1134
+
1185
1135
  module.exports.__wbindgen_number_new = function(arg0) {
1186
1136
  const ret = arg0;
1187
1137
  return addHeapObject(ret);
@@ -1215,9 +1165,25 @@ module.exports.__wbg_stack_3090cd8fd3702c6e = function(arg0, arg1) {
1215
1165
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1216
1166
  };
1217
1167
 
1218
- module.exports.__wbindgen_is_null = function(arg0) {
1219
- const ret = getObject(arg0) === null;
1220
- return ret;
1168
+ module.exports.__wbg_profile_431ee5e29ff55ee3 = function(arg0, arg1) {
1169
+ const ret = getObject(arg1).profile;
1170
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1171
+ const len1 = WASM_VECTOR_LEN;
1172
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1173
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1174
+ };
1175
+
1176
+ module.exports.__wbg_sources_604e3e26bf93d80c = function(arg0) {
1177
+ const ret = getObject(arg0).sources;
1178
+ return addHeapObject(ret);
1179
+ };
1180
+
1181
+ module.exports.__wbg_languageFeatures_ebc106d4e512fb1c = function(arg0, arg1) {
1182
+ const ret = getObject(arg1).languageFeatures;
1183
+ const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export_0);
1184
+ const len1 = WASM_VECTOR_LEN;
1185
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1186
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1221
1187
  };
1222
1188
 
1223
1189
  module.exports.__wbindgen_is_function = function(arg0) {
@@ -1235,6 +1201,26 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
1235
1201
  return addHeapObject(ret);
1236
1202
  };
1237
1203
 
1204
+ module.exports.__wbg_readFile_3776aacd85682587 = function(arg0, arg1, arg2) {
1205
+ const ret = getObject(arg0).readFile(getStringFromWasm0(arg1, arg2));
1206
+ return addHeapObject(ret);
1207
+ };
1208
+
1209
+ module.exports.__wbg_listDirectory_271976dbfbb2dc9f = function(arg0, arg1, arg2) {
1210
+ const ret = getObject(arg0).listDirectory(getStringFromWasm0(arg1, arg2));
1211
+ return addHeapObject(ret);
1212
+ };
1213
+
1214
+ module.exports.__wbg_resolvePath_674360b3ad1067f3 = function(arg0, arg1, arg2, arg3, arg4) {
1215
+ const ret = getObject(arg0).resolvePath(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1216
+ return addHeapObject(ret);
1217
+ };
1218
+
1219
+ module.exports.__wbg_findManifestDirectory_1e22fa316acdbeff = function(arg0, arg1, arg2) {
1220
+ const ret = getObject(arg0).findManifestDirectory(getStringFromWasm0(arg1, arg2));
1221
+ return addHeapObject(ret);
1222
+ };
1223
+
1238
1224
  module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
1239
1225
  const ret = getObject(arg0) == getObject(arg1);
1240
1226
  return ret;
@@ -1378,11 +1364,6 @@ module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
1378
1364
  return ret;
1379
1365
  };
1380
1366
 
1381
- module.exports.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
1382
- const ret = getObject(arg0).push(getObject(arg1));
1383
- return ret;
1384
- };
1385
-
1386
1367
  module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
1387
1368
  let result;
1388
1369
  try {
@@ -1437,7 +1418,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
1437
1418
  const a = state0.a;
1438
1419
  state0.a = 0;
1439
1420
  try {
1440
- return __wbg_adapter_176(a, state0.b, arg0, arg1);
1421
+ return __wbg_adapter_186(a, state0.b, arg0, arg1);
1441
1422
  } finally {
1442
1423
  state0.a = a;
1443
1424
  }
@@ -1548,8 +1529,8 @@ module.exports.__wbindgen_memory = function() {
1548
1529
  return addHeapObject(ret);
1549
1530
  };
1550
1531
 
1551
- module.exports.__wbindgen_closure_wrapper759 = function(arg0, arg1, arg2) {
1552
- const ret = makeMutClosure(arg0, arg1, 308, __wbg_adapter_54);
1532
+ module.exports.__wbindgen_closure_wrapper803 = function(arg0, arg1, arg2) {
1533
+ const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_52);
1553
1534
  return addHeapObject(ret);
1554
1535
  };
1555
1536
 
@@ -14,29 +14,23 @@ export function setLogLevel(level: number): void;
14
14
  */
15
15
  export function git_hash(): string;
16
16
  /**
17
- * @param {(Array<any>)[]} sources
18
- * @param {(string)[]} language_features
19
- * @param {string} profile
17
+ * @param {IProgramConfig} program
20
18
  * @returns {string}
21
19
  */
22
- export function get_qir(sources: (Array<any>)[], language_features: (string)[], profile: string): string;
20
+ export function get_qir(program: IProgramConfig): string;
23
21
  /**
24
- * @param {(Array<any>)[]} sources
22
+ * @param {IProgramConfig} program
25
23
  * @param {string} params
26
- * @param {(string)[]} language_features
27
- * @param {string} targetProfile
28
24
  * @returns {string}
29
25
  */
30
- export function get_estimates(sources: (Array<any>)[], params: string, language_features: (string)[], targetProfile: string): string;
26
+ export function get_estimates(program: IProgramConfig, params: string): string;
31
27
  /**
32
- * @param {(Array<any>)[]} sources
33
- * @param {string} targetProfile
34
- * @param {(string)[]} language_features
28
+ * @param {IProgramConfig} program
35
29
  * @param {boolean} simulate
36
30
  * @param {IOperationInfo | undefined} [operation]
37
31
  * @returns {any}
38
32
  */
39
- export function get_circuit(sources: (Array<any>)[], targetProfile: string, language_features: (string)[], simulate: boolean, operation?: IOperationInfo): any;
33
+ export function get_circuit(program: IProgramConfig, simulate: boolean, operation?: IOperationInfo): any;
40
34
  /**
41
35
  * @param {string} name
42
36
  * @returns {string | undefined}
@@ -57,15 +51,13 @@ export function get_ast(code: string, language_features: (string)[], profile: st
57
51
  */
58
52
  export function get_hir(code: string, language_features: (string)[], profile: string): string;
59
53
  /**
60
- * @param {(Array<any>)[]} sources
54
+ * @param {IProgramConfig} program
61
55
  * @param {string} expr
62
56
  * @param {Function} event_cb
63
57
  * @param {number} shots
64
- * @param {(string)[]} language_features
65
- * @param {string} profile
66
58
  * @returns {boolean}
67
59
  */
68
- export function run(sources: (Array<any>)[], expr: string, event_cb: Function, shots: number, language_features: (string)[], profile: string): boolean;
60
+ export function run(program: IProgramConfig, expr: string, event_cb: Function, shots: number): boolean;
69
61
  /**
70
62
  * @param {string} solution_code
71
63
  * @param {any} exercise_sources_js
@@ -74,12 +66,10 @@ export function run(sources: (Array<any>)[], expr: string, event_cb: Function, s
74
66
  */
75
67
  export function check_exercise_solution(solution_code: string, exercise_sources_js: any, event_cb: Function): boolean;
76
68
  /**
77
- * @param {(Array<any>)[] | undefined} [additionalSources]
78
- * @param {string | undefined} [targetProfile]
79
- * @param {(string)[] | undefined} [languageFeatures]
69
+ * @param {IProgramConfig | undefined} [additional_program]
80
70
  * @returns {(IDocFile)[]}
81
71
  */
82
- export function generate_docs(additionalSources?: (Array<any>)[], targetProfile?: string, languageFeatures?: (string)[]): (IDocFile)[];
72
+ export function generate_docs(additional_program?: IProgramConfig): (IDocFile)[];
83
73
  /**
84
74
  */
85
75
  export enum StepResultId {
@@ -170,6 +160,7 @@ export interface IWorkspaceConfiguration {
170
160
  targetProfile?: TargetProfile;
171
161
  packageType?: "exe" | "lib";
172
162
  languageFeatures?: LanguageFeatures[];
163
+ lints?: { lint: string; level: string }[];
173
164
  }
174
165
 
175
166
  export interface ICodeAction {
@@ -263,6 +254,48 @@ export interface ILocation {
263
254
  span: IRange;
264
255
  }
265
256
 
257
+
258
+ export interface IProjectHost {
259
+ readFile(uri: string): Promise<string | null>;
260
+ listDirectory(uri: string): Promise<[string, number][]>;
261
+ resolvePath(base: string, path: string): Promise<string | null>;
262
+ findManifestDirectory(docUri: string): Promise<string | null>;
263
+ }
264
+
265
+ /**
266
+ * Copy of the ProgramConfig type defined in compiler.ts,
267
+ * but with all the properties required and filled in with defaults where necessary.
268
+ */
269
+ export interface IProgramConfig {
270
+ sources: [string, string][];
271
+ languageFeatures: string[];
272
+ profile: TargetProfile;
273
+ }
274
+
275
+
276
+ export interface IProjectConfig {
277
+ /**
278
+ * Friendly name for the project, based on the name of the Q# document or project directory
279
+ */
280
+ projectName: string;
281
+ /**
282
+ * Uri for the qsharp.json or the root source file (single file projects)
283
+ */
284
+ projectUri: string;
285
+ /**
286
+ * [sourceName, sourceContents] tuples
287
+ *
288
+ * In the future, for projects with dependencies, this will contain the
289
+ * full dependency graph and sources for all the packages referenced by the project.
290
+ */
291
+ sources: [string, string][];
292
+ languageFeatures: string[];
293
+ lints: {
294
+ lint: string;
295
+ level: string;
296
+ }[];
297
+ }
298
+
266
299
  export interface IDocFile {
267
300
  filename: string;
268
301
  metadata: string;
@@ -285,13 +318,11 @@ export class DebugService {
285
318
  */
286
319
  constructor();
287
320
  /**
288
- * @param {(Array<any>)[]} sources
289
- * @param {string} target_profile
290
- * @param {string | undefined} entry
291
- * @param {(string)[]} language_features
321
+ * @param {IProgramConfig} program
322
+ * @param {string | undefined} [entry]
292
323
  * @returns {string}
293
324
  */
294
- load_source(sources: (Array<any>)[], target_profile: string, entry: string | undefined, language_features: (string)[]): string;
325
+ load_program(program: IProgramConfig, entry?: string): string;
295
326
  /**
296
327
  * @returns {IQuantumStateList}
297
328
  */
@@ -347,12 +378,10 @@ export class LanguageService {
347
378
  constructor();
348
379
  /**
349
380
  * @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
350
- * @param {(uri: string) => Promise<string | null>} read_file
351
- * @param {(uri: string) => Promise<[string, number][]>} list_directory
352
- * @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
381
+ * @param {IProjectHost} host
353
382
  * @returns {Promise<any>}
354
383
  */
355
- start_background_work(diagnostics_callback: (uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void, read_file: (uri: string) => Promise<string | null>, list_directory: (uri: string) => Promise<[string, number][]>, get_manifest: (uri: string) => Promise<{ manifestDirectory: string }| null>): Promise<any>;
384
+ start_background_work(diagnostics_callback: (uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void, host: IProjectHost): Promise<any>;
356
385
  /**
357
386
  */
358
387
  stop_background_work(): void;
@@ -448,14 +477,12 @@ export class LanguageService {
448
477
  export class ProjectLoader {
449
478
  free(): void;
450
479
  /**
451
- * @param {(uri: string) => Promise<string | null>} read_file
452
- * @param {(uri: string) => Promise<[string, number][]>} list_directory
453
- * @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
480
+ * @param {IProjectHost} project_host
454
481
  */
455
- constructor(read_file: (uri: string) => Promise<string | null>, list_directory: (uri: string) => Promise<[string, number][]>, get_manifest: (uri: string) => Promise<{ manifestDirectory: string }| null>);
482
+ constructor(project_host: IProjectHost);
456
483
  /**
457
- * @param {{ manifestDirectory: string }} manifest
458
- * @returns {Promise<[string, string][]>}
484
+ * @param {string} directory
485
+ * @returns {Promise<IProjectConfig>}
459
486
  */
460
- load_project(manifest: { manifestDirectory: string }): Promise<[string, string][]>;
487
+ load_project(directory: string): Promise<IProjectConfig>;
461
488
  }
Binary file