qsharp-lang 1.6.1-dev → 1.6.3-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/dist/browser.d.ts +7 -11
  2. package/dist/browser.js +6 -6
  3. package/dist/compiler/compiler.d.ts +25 -38
  4. package/dist/compiler/compiler.js +44 -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.js +139 -72
  8. package/dist/katas-content.generated.md.js +139 -72
  9. package/dist/language-service/language-service.d.ts +4 -4
  10. package/dist/language-service/language-service.js +10 -3
  11. package/dist/main.d.ts +3 -6
  12. package/dist/main.js +4 -4
  13. package/dist/samples.generated.js +4 -4
  14. package/docs/Microsoft.Quantum.Arrays/All.md +1 -1
  15. package/docs/Microsoft.Quantum.Arrays/Any.md +1 -1
  16. package/docs/Microsoft.Quantum.Arrays/Chunks.md +1 -1
  17. package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +1 -1
  18. package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +1 -1
  19. package/docs/Microsoft.Quantum.Arrays/Count.md +1 -1
  20. package/docs/Microsoft.Quantum.Arrays/Diagonal.md +1 -1
  21. package/docs/Microsoft.Quantum.Arrays/DrawMany.md +1 -1
  22. package/docs/Microsoft.Quantum.Arrays/Enumerated.md +1 -1
  23. package/docs/Microsoft.Quantum.Arrays/Excluding.md +1 -1
  24. package/docs/Microsoft.Quantum.Arrays/Filtered.md +1 -1
  25. package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +1 -1
  26. package/docs/Microsoft.Quantum.Arrays/Flattened.md +1 -1
  27. package/docs/Microsoft.Quantum.Arrays/Fold.md +1 -1
  28. package/docs/Microsoft.Quantum.Arrays/ForEach.md +1 -1
  29. package/docs/Microsoft.Quantum.Arrays/Head.md +1 -1
  30. package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +1 -1
  31. package/docs/Microsoft.Quantum.Arrays/IndexOf.md +1 -1
  32. package/docs/Microsoft.Quantum.Arrays/IndexRange.md +1 -1
  33. package/docs/Microsoft.Quantum.Arrays/Interleaved.md +1 -1
  34. package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +1 -1
  35. package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +1 -1
  36. package/docs/Microsoft.Quantum.Arrays/IsSorted.md +1 -1
  37. package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +1 -1
  38. package/docs/Microsoft.Quantum.Arrays/Mapped.md +1 -1
  39. package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +1 -1
  40. package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +1 -1
  41. package/docs/Microsoft.Quantum.Arrays/Most.md +1 -1
  42. package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +1 -1
  43. package/docs/Microsoft.Quantum.Arrays/Padded.md +1 -1
  44. package/docs/Microsoft.Quantum.Arrays/Partitioned.md +1 -1
  45. package/docs/Microsoft.Quantum.Arrays/Rest.md +1 -1
  46. package/docs/Microsoft.Quantum.Arrays/Reversed.md +1 -1
  47. package/docs/Microsoft.Quantum.Arrays/SequenceI.md +1 -1
  48. package/docs/Microsoft.Quantum.Arrays/SequenceL.md +1 -1
  49. package/docs/Microsoft.Quantum.Arrays/Sorted.md +1 -1
  50. package/docs/Microsoft.Quantum.Arrays/Subarray.md +1 -1
  51. package/docs/Microsoft.Quantum.Arrays/Swapped.md +1 -1
  52. package/docs/Microsoft.Quantum.Arrays/Tail.md +1 -1
  53. package/docs/Microsoft.Quantum.Arrays/Transposed.md +1 -1
  54. package/docs/Microsoft.Quantum.Arrays/Unzipped.md +1 -1
  55. package/docs/Microsoft.Quantum.Arrays/Where.md +1 -1
  56. package/docs/Microsoft.Quantum.Arrays/Windows.md +1 -1
  57. package/docs/Microsoft.Quantum.Arrays/Zipped.md +1 -1
  58. package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +1 -1
  59. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +1 -1
  60. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +1 -1
  61. package/docs/Microsoft.Quantum.Canon/ApplyP.md +1 -1
  62. package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +1 -1
  63. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +1 -1
  64. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +1 -1
  65. package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +1 -1
  66. package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +1 -1
  67. package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +1 -1
  68. package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +1 -1
  69. package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +1 -1
  70. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +1 -1
  71. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +1 -1
  72. package/docs/Microsoft.Quantum.Canon/CX.md +1 -1
  73. package/docs/Microsoft.Quantum.Canon/CY.md +1 -1
  74. package/docs/Microsoft.Quantum.Canon/CZ.md +1 -1
  75. package/docs/Microsoft.Quantum.Canon/Fst.md +1 -1
  76. package/docs/Microsoft.Quantum.Canon/Snd.md +1 -1
  77. package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +1 -1
  78. package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +1 -1
  79. package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +1 -1
  80. package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +1 -1
  81. package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +1 -1
  82. package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +1 -1
  83. package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +1 -1
  84. package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +1 -1
  85. package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +1 -1
  86. package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +1 -1
  87. package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +1 -1
  88. package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +1 -1
  89. package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +1 -1
  90. package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +1 -1
  91. package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +1 -1
  92. package/docs/Microsoft.Quantum.Core/Length.md +1 -1
  93. package/docs/Microsoft.Quantum.Core/RangeEnd.md +1 -1
  94. package/docs/Microsoft.Quantum.Core/RangeReverse.md +1 -1
  95. package/docs/Microsoft.Quantum.Core/RangeStart.md +1 -1
  96. package/docs/Microsoft.Quantum.Core/RangeStep.md +1 -1
  97. package/docs/Microsoft.Quantum.Core/Repeated.md +1 -1
  98. package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +1 -1
  99. package/docs/Microsoft.Quantum.Diagnostics/DumpRegister.md +1 -1
  100. package/docs/Microsoft.Quantum.Diagnostics/Fact.md +1 -1
  101. package/docs/Microsoft.Quantum.Intrinsic/AdjustForSingleControl.md +21 -0
  102. package/docs/Microsoft.Quantum.Intrinsic/ApplyGlobalPhase.md +18 -0
  103. package/docs/Microsoft.Quantum.Intrinsic/CCH.md +18 -0
  104. package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +1 -1
  105. package/docs/Microsoft.Quantum.Intrinsic/CCY.md +18 -0
  106. package/docs/Microsoft.Quantum.Intrinsic/CCZ.md +18 -0
  107. package/docs/Microsoft.Quantum.Intrinsic/CH.md +18 -0
  108. package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +1 -1
  109. package/docs/Microsoft.Quantum.Intrinsic/CRxx.md +18 -0
  110. package/docs/Microsoft.Quantum.Intrinsic/CRyy.md +18 -0
  111. package/docs/Microsoft.Quantum.Intrinsic/CRz.md +18 -0
  112. package/docs/Microsoft.Quantum.Intrinsic/CRzz.md +18 -0
  113. package/docs/Microsoft.Quantum.Intrinsic/CS.md +18 -0
  114. package/docs/Microsoft.Quantum.Intrinsic/CT.md +18 -0
  115. package/docs/Microsoft.Quantum.Intrinsic/CollectControls.md +27 -0
  116. package/docs/Microsoft.Quantum.Intrinsic/ControllableGlobalPhase.md +18 -0
  117. package/docs/Microsoft.Quantum.Intrinsic/EntangleForJointMeasure.md +18 -0
  118. package/docs/Microsoft.Quantum.Intrinsic/Exp.md +1 -1
  119. package/docs/Microsoft.Quantum.Intrinsic/GlobalPhase.md +18 -0
  120. package/docs/Microsoft.Quantum.Intrinsic/H.md +1 -1
  121. package/docs/Microsoft.Quantum.Intrinsic/I.md +1 -1
  122. package/docs/Microsoft.Quantum.Intrinsic/IndicesOfNonIdentity.md +18 -0
  123. package/docs/Microsoft.Quantum.Intrinsic/M.md +1 -1
  124. package/docs/Microsoft.Quantum.Intrinsic/MapPauli.md +18 -0
  125. package/docs/Microsoft.Quantum.Intrinsic/Measure.md +1 -1
  126. package/docs/Microsoft.Quantum.Intrinsic/Message.md +1 -1
  127. package/docs/Microsoft.Quantum.Intrinsic/PhaseCCX.md +18 -0
  128. package/docs/Microsoft.Quantum.Intrinsic/R.md +1 -1
  129. package/docs/Microsoft.Quantum.Intrinsic/R1.md +1 -1
  130. package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +1 -1
  131. package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +1 -1
  132. package/docs/Microsoft.Quantum.Intrinsic/RemovePauliI.md +18 -0
  133. package/docs/Microsoft.Quantum.Intrinsic/Reset.md +1 -1
  134. package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +1 -1
  135. package/docs/Microsoft.Quantum.Intrinsic/Rx.md +1 -1
  136. package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +1 -1
  137. package/docs/Microsoft.Quantum.Intrinsic/Ry.md +1 -1
  138. package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +1 -1
  139. package/docs/Microsoft.Quantum.Intrinsic/Rz.md +1 -1
  140. package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +1 -1
  141. package/docs/Microsoft.Quantum.Intrinsic/S.md +1 -1
  142. package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +1 -1
  143. package/docs/Microsoft.Quantum.Intrinsic/SpreadZ.md +18 -0
  144. package/docs/Microsoft.Quantum.Intrinsic/T.md +1 -1
  145. package/docs/Microsoft.Quantum.Intrinsic/X.md +1 -1
  146. package/docs/Microsoft.Quantum.Intrinsic/Y.md +1 -1
  147. package/docs/Microsoft.Quantum.Intrinsic/Z.md +1 -1
  148. package/docs/Microsoft.Quantum.Logical/Xor.md +1 -1
  149. package/docs/Microsoft.Quantum.Math/AbsComplex.md +1 -1
  150. package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +1 -1
  151. package/docs/Microsoft.Quantum.Math/AbsD.md +1 -1
  152. package/docs/Microsoft.Quantum.Math/AbsI.md +1 -1
  153. package/docs/Microsoft.Quantum.Math/AbsL.md +1 -1
  154. package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +1 -1
  155. package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +1 -1
  156. package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +1 -1
  157. package/docs/Microsoft.Quantum.Math/ArcCos.md +1 -1
  158. package/docs/Microsoft.Quantum.Math/ArcCosh.md +1 -1
  159. package/docs/Microsoft.Quantum.Math/ArcSin.md +1 -1
  160. package/docs/Microsoft.Quantum.Math/ArcSinh.md +1 -1
  161. package/docs/Microsoft.Quantum.Math/ArcTan.md +1 -1
  162. package/docs/Microsoft.Quantum.Math/ArcTan2.md +1 -1
  163. package/docs/Microsoft.Quantum.Math/ArcTanh.md +1 -1
  164. package/docs/Microsoft.Quantum.Math/ArgComplex.md +1 -1
  165. package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +1 -1
  166. package/docs/Microsoft.Quantum.Math/Binom.md +1 -1
  167. package/docs/Microsoft.Quantum.Math/BitSizeI.md +1 -1
  168. package/docs/Microsoft.Quantum.Math/BitSizeL.md +1 -1
  169. package/docs/Microsoft.Quantum.Math/Ceiling.md +1 -1
  170. package/docs/Microsoft.Quantum.Math/Complex.md +1 -1
  171. package/docs/Microsoft.Quantum.Math/ComplexPolar.md +1 -1
  172. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +1 -1
  173. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +1 -1
  174. package/docs/Microsoft.Quantum.Math/Cos.md +1 -1
  175. package/docs/Microsoft.Quantum.Math/Cosh.md +1 -1
  176. package/docs/Microsoft.Quantum.Math/DivRemI.md +1 -1
  177. package/docs/Microsoft.Quantum.Math/DivRemL.md +1 -1
  178. package/docs/Microsoft.Quantum.Math/DividedByC.md +1 -1
  179. package/docs/Microsoft.Quantum.Math/DividedByCP.md +1 -1
  180. package/docs/Microsoft.Quantum.Math/E.md +1 -1
  181. package/docs/Microsoft.Quantum.Math/ExpModI.md +1 -1
  182. package/docs/Microsoft.Quantum.Math/ExpModL.md +1 -1
  183. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +1 -1
  184. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +1 -1
  185. package/docs/Microsoft.Quantum.Math/ExtendedTruncation.md +18 -0
  186. package/docs/Microsoft.Quantum.Math/FactorialI.md +1 -1
  187. package/docs/Microsoft.Quantum.Math/FactorialL.md +1 -1
  188. package/docs/Microsoft.Quantum.Math/Floor.md +1 -1
  189. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +1 -1
  190. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +1 -1
  191. package/docs/Microsoft.Quantum.Math/HammingWeightI.md +1 -1
  192. package/docs/Microsoft.Quantum.Math/InverseModI.md +1 -1
  193. package/docs/Microsoft.Quantum.Math/InverseModL.md +1 -1
  194. package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +1 -1
  195. package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +1 -1
  196. package/docs/Microsoft.Quantum.Math/IsInfinite.md +1 -1
  197. package/docs/Microsoft.Quantum.Math/IsNaN.md +1 -1
  198. package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +1 -1
  199. package/docs/Microsoft.Quantum.Math/Lg.md +1 -1
  200. package/docs/Microsoft.Quantum.Math/Log.md +1 -1
  201. package/docs/Microsoft.Quantum.Math/Log10.md +1 -1
  202. package/docs/Microsoft.Quantum.Math/LogFactorialD.md +1 -1
  203. package/docs/Microsoft.Quantum.Math/LogGammaD.md +1 -1
  204. package/docs/Microsoft.Quantum.Math/LogOf2.md +1 -1
  205. package/docs/Microsoft.Quantum.Math/Max.md +1 -1
  206. package/docs/Microsoft.Quantum.Math/MaxD.md +1 -1
  207. package/docs/Microsoft.Quantum.Math/MaxI.md +1 -1
  208. package/docs/Microsoft.Quantum.Math/MaxL.md +1 -1
  209. package/docs/Microsoft.Quantum.Math/Min.md +1 -1
  210. package/docs/Microsoft.Quantum.Math/MinD.md +1 -1
  211. package/docs/Microsoft.Quantum.Math/MinI.md +1 -1
  212. package/docs/Microsoft.Quantum.Math/MinL.md +1 -1
  213. package/docs/Microsoft.Quantum.Math/MinusC.md +1 -1
  214. package/docs/Microsoft.Quantum.Math/MinusCP.md +1 -1
  215. package/docs/Microsoft.Quantum.Math/ModulusI.md +1 -1
  216. package/docs/Microsoft.Quantum.Math/ModulusL.md +1 -1
  217. package/docs/Microsoft.Quantum.Math/NegationC.md +1 -1
  218. package/docs/Microsoft.Quantum.Math/NegationCP.md +1 -1
  219. package/docs/Microsoft.Quantum.Math/PI.md +1 -1
  220. package/docs/Microsoft.Quantum.Math/PNorm.md +1 -1
  221. package/docs/Microsoft.Quantum.Math/PNormalized.md +1 -1
  222. package/docs/Microsoft.Quantum.Math/PlusC.md +1 -1
  223. package/docs/Microsoft.Quantum.Math/PlusCP.md +1 -1
  224. package/docs/Microsoft.Quantum.Math/PowC.md +1 -1
  225. package/docs/Microsoft.Quantum.Math/PowCAsCP.md +24 -0
  226. package/docs/Microsoft.Quantum.Math/PowCP.md +1 -1
  227. package/docs/Microsoft.Quantum.Math/RealMod.md +1 -1
  228. package/docs/Microsoft.Quantum.Math/Round.md +1 -1
  229. package/docs/Microsoft.Quantum.Math/SignD.md +1 -1
  230. package/docs/Microsoft.Quantum.Math/SignI.md +1 -1
  231. package/docs/Microsoft.Quantum.Math/SignL.md +1 -1
  232. package/docs/Microsoft.Quantum.Math/Sin.md +1 -1
  233. package/docs/Microsoft.Quantum.Math/Sinh.md +1 -1
  234. package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +1 -1
  235. package/docs/Microsoft.Quantum.Math/Sqrt.md +1 -1
  236. package/docs/Microsoft.Quantum.Math/SquaredNorm.md +1 -1
  237. package/docs/Microsoft.Quantum.Math/Tan.md +1 -1
  238. package/docs/Microsoft.Quantum.Math/Tanh.md +1 -1
  239. package/docs/Microsoft.Quantum.Math/TimesC.md +1 -1
  240. package/docs/Microsoft.Quantum.Math/TimesCP.md +1 -1
  241. package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +1 -1
  242. package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +1 -1
  243. package/docs/Microsoft.Quantum.Math/Truncate.md +1 -1
  244. package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +1 -1
  245. package/docs/Microsoft.Quantum.Measurement/MResetX.md +1 -1
  246. package/docs/Microsoft.Quantum.Measurement/MResetY.md +1 -1
  247. package/docs/Microsoft.Quantum.Measurement/MResetZ.md +1 -1
  248. package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +1 -1
  249. package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +1 -1
  250. package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +1 -1
  251. package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +1 -1
  252. package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +1 -1
  253. package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +1 -1
  254. package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +1 -1
  255. package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +1 -1
  256. package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +1 -1
  257. package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +1 -1
  258. package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +1 -1
  259. package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +1 -1
  260. package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +1 -1
  261. package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +1 -1
  262. package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +1 -1
  263. package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +1 -1
  264. package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +1 -1
  265. package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +1 -1
  266. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyActionIfGreaterThanOrEqualConstant.md +23 -0
  267. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyActionIfSumOverflows.md +23 -0
  268. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyAsSinglyControlled.md +24 -0
  269. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +1 -1
  270. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +1 -1
  271. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +1 -1
  272. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +1 -1
  273. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +1 -1
  274. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +1 -1
  275. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +1 -1
  276. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +1 -1
  277. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +1 -1
  278. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +1 -1
  279. package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +1 -1
  280. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +1 -1
  281. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +1 -1
  282. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +1 -1
  283. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +1 -1
  284. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +1 -1
  285. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +1 -1
  286. package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +1 -1
  287. package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +1 -1
  288. package/docs/Microsoft.Quantum.Unstable.Arithmetic/PhaseGradient.md +18 -0
  289. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +1 -1
  290. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +1 -1
  291. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +1 -1
  292. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +1 -1
  293. package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +1 -1
  294. package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +1 -1
  295. package/docs/Microsoft.Quantum.Unstable.TableLookup/EncodeUnary.md +18 -0
  296. package/docs/Microsoft.Quantum.Unstable.TableLookup/MustBeFixed.md +18 -0
  297. package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +1 -1
  298. package/docs/Microsoft.Quantum.Unstable.TableLookup/Unlookup.md +22 -0
  299. package/docs/Microsoft.Quantum.Unstable.TableLookup/WriteMemoryContents.md +18 -0
  300. package/docs/toc.yml +31 -1
  301. package/lib/node/qsc_wasm.cjs +162 -158
  302. package/lib/node/qsc_wasm.d.cts +73 -36
  303. package/lib/node/qsc_wasm_bg.wasm +0 -0
  304. package/lib/web/qsc_wasm.d.ts +82 -45
  305. package/lib/web/qsc_wasm.js +152 -157
  306. package/lib/web/qsc_wasm_bg.wasm +0 -0
  307. package/package.json +1 -1
  308. package/ux/estimatesOverview.tsx +2 -0
  309. package/ux/estimatesPanel.tsx +2 -0
  310. package/ux/qsharp-ux.css +30 -5
  311. package/ux/saveImage.tsx +107 -0
  312. package/ux/saveImageUtil.tsx +72 -0
  313. package/ux/scatterChart.tsx +31 -0
  314. package/docs/Microsoft.Quantum.Intrinsic/AND.md +0 -33
package/dist/browser.d.ts CHANGED
@@ -1,29 +1,25 @@
1
1
  import * as wasm from "../lib/web/qsc_wasm.js";
2
- import { TargetProfile } from "../lib/web/qsc_wasm.js";
2
+ import { IProjectHost, TargetProfile } from "../lib/web/qsc_wasm.js";
3
3
  import { ICompiler, ICompilerWorker } from "./compiler/compiler.js";
4
4
  import { IDebugService, IDebugServiceWorker } from "./debug-service/debug-service.js";
5
- import { ILanguageService, ILanguageServiceWorker, qsharpLibraryUriScheme } from "./language-service/language-service.js";
5
+ import { ILanguageService, ILanguageServiceWorker, qsharpGithubUriScheme, qsharpLibraryUriScheme } from "./language-service/language-service.js";
6
6
  import { LogLevel, log } from "./log.js";
7
- export { qsharpLibraryUriScheme };
7
+ export { qsharpGithubUriScheme, qsharpLibraryUriScheme };
8
8
  export declare function loadWasmModule(uriOrBuffer: string | ArrayBuffer): Promise<void>;
9
9
  export declare function getLibrarySourceContent(path: string): Promise<string | undefined>;
10
10
  export declare function getDebugService(): Promise<IDebugService>;
11
- export declare function getProjectLoader(readFile: (path: string) => Promise<string | null>, loadDirectory: (path: string) => Promise<[string, number][]>, getManifest: (path: string) => Promise<{
12
- manifestDirectory: string;
13
- } | null>): Promise<wasm.ProjectLoader>;
11
+ export declare function getProjectLoader(host: IProjectHost): Promise<wasm.ProjectLoader>;
14
12
  export declare function getDebugServiceWorker(worker: string | Worker): IDebugServiceWorker;
15
13
  export declare function getCompiler(): Promise<ICompiler>;
16
14
  export declare function getCompilerWorker(worker: string | Worker): ICompilerWorker;
17
- export declare function getLanguageService(readFile?: (uri: string) => Promise<string | null>, listDir?: (uri: string) => Promise<[string, number][]>, getManifest?: (uri: string) => Promise<{
18
- manifestDirectory: string;
19
- } | null>): Promise<ILanguageService>;
15
+ export declare function getLanguageService(host?: IProjectHost): Promise<ILanguageService>;
20
16
  export declare function getLanguageServiceWorker(worker: string | Worker): ILanguageServiceWorker;
21
17
  export { StepResultId } from "../lib/web/qsc_wasm.js";
22
- export type { IBreakpointSpan, ICodeAction, ICodeLens, IDocFile, ILocation, IOperationInfo, IPosition, IQSharpError, IRange, IStackFrame, IWorkspaceEdit, IStructStepResult, VSDiagnostic, } from "../lib/web/qsc_wasm.js";
18
+ export type { IBreakpointSpan, ICodeAction, ICodeLens, IDocFile, ILocation, IOperationInfo, IPosition, IProjectConfig, IProjectHost, IQSharpError, IRange, IStackFrame, IStructStepResult, IWorkspaceEdit, ProjectLoader, VSDiagnostic, } from "../lib/web/qsc_wasm.js";
23
19
  export { type Dump, type ShotResult } from "./compiler/common.js";
24
20
  export { type CompilerState, type ProgramConfig } from "./compiler/compiler.js";
25
21
  export { QscEventTarget } from "./compiler/events.js";
26
- export { type LanguageServiceEvent } from "./language-service/language-service.js";
22
+ export type { LanguageServiceEvent } from "./language-service/language-service.js";
27
23
  export { default as samples } from "./samples.generated.js";
28
24
  export { log, type LogLevel, type TargetProfile };
29
25
  export type { ICompiler, ICompilerWorker, IDebugService, IDebugServiceWorker, ILanguageService, ILanguageServiceWorker, };
package/dist/browser.js CHANGED
@@ -6,10 +6,10 @@ import * as wasm from "../lib/web/qsc_wasm.js";
6
6
  import initWasm from "../lib/web/qsc_wasm.js";
7
7
  import { Compiler, compilerProtocol, } from "./compiler/compiler.js";
8
8
  import { QSharpDebugService, debugServiceProtocol, } from "./debug-service/debug-service.js";
9
- import { QSharpLanguageService, languageServiceProtocol, qsharpLibraryUriScheme, } from "./language-service/language-service.js";
9
+ import { QSharpLanguageService, languageServiceProtocol, qsharpGithubUriScheme, qsharpLibraryUriScheme, } from "./language-service/language-service.js";
10
10
  import { log } from "./log.js";
11
11
  import { createProxy } from "./workers/browser.js";
12
- export { qsharpLibraryUriScheme };
12
+ export { qsharpGithubUriScheme, qsharpLibraryUriScheme };
13
13
  // Create once. A module is stateless and can be efficiently passed to WebWorkers.
14
14
  let wasmModule = null;
15
15
  let wasmModulePromise = null;
@@ -71,9 +71,9 @@ export async function getDebugService() {
71
71
  await instantiateWasm();
72
72
  return new QSharpDebugService(wasm);
73
73
  }
74
- export async function getProjectLoader(readFile, loadDirectory, getManifest) {
74
+ export async function getProjectLoader(host) {
75
75
  await instantiateWasm();
76
- return new wasm.ProjectLoader(readFile, loadDirectory, getManifest);
76
+ return new wasm.ProjectLoader(host);
77
77
  }
78
78
  // Create the debugger inside a WebWorker and proxy requests.
79
79
  // If the Worker was already created via other means and is ready to receive
@@ -95,9 +95,9 @@ export function getCompilerWorker(worker) {
95
95
  throw "Wasm module must be loaded first";
96
96
  return createProxy(worker, wasmModule, compilerProtocol);
97
97
  }
98
- export async function getLanguageService(readFile, listDir, getManifest) {
98
+ export async function getLanguageService(host) {
99
99
  await instantiateWasm();
100
- return new QSharpLanguageService(wasm, readFile, listDir, getManifest);
100
+ return new QSharpLanguageService(wasm, host);
101
101
  }
102
102
  // Create the compiler inside a WebWorker and proxy requests.
103
103
  // If the Worker was already created via other means and is ready to receive
@@ -1,5 +1,5 @@
1
1
  import { type Circuit as CircuitData } from "@microsoft/quantum-viz.js/lib/circuit.js";
2
- import { IDocFile, IOperationInfo, TargetProfile, type VSDiagnostic } from "../../lib/web/qsc_wasm.js";
2
+ import { IDocFile, IOperationInfo, IPackageGraphSources, IProgramConfig as wasmIProgramConfig, TargetProfile, type VSDiagnostic } from "../../lib/web/qsc_wasm.js";
3
3
  import { IServiceProxy, ServiceProtocol, ServiceState } from "../workers/common.js";
4
4
  import { IQscEventTarget, QscEventData } from "./events.js";
5
5
  type Wasm = typeof import("../../lib/web/qsc_wasm.js");
@@ -7,40 +7,26 @@ export interface ICompiler {
7
7
  checkCode(code: string): Promise<VSDiagnostic[]>;
8
8
  getAst(code: string, languageFeatures?: string[], profile?: TargetProfile): Promise<string>;
9
9
  getHir(code: string, languageFeatures?: string[], profile?: TargetProfile): Promise<string>;
10
- /** @deprecated -- switch to using `ProgramConfig`-based overload. Instead of passing
11
- * sources and language features separately, pass an object with named properties. This change was made
12
- * for the sake of extensibility and future-compatibility. Note that only the new API
13
- * supports passing language features. If you need to pass language features, you must use
14
- * the new API.
15
- **/
16
- run(sources: [string, string][], expr: string, shots: number, eventHandler: IQscEventTarget): Promise<void>;
17
- run(config: ProgramConfig, expr: string, shots: number, eventHandler: IQscEventTarget): Promise<void>;
18
- /** @deprecated -- switch to using `ProgramConfig`-based overload. Instead of passing
19
- * sources and language features separately, pass an object with named properties. This change was made
20
- * for the sake of extensibility and future-compatibility. Note that only the new API
21
- * supports passing language features. If you need to pass language features, you must use
22
- * the new API.
23
- **/
24
- getQir(sources: [string, string][], languageFeatures?: string[]): Promise<string>;
25
- getQir(config: ProgramConfig): Promise<string>;
26
- /** @deprecated -- switch to using `ProgramConfig`-based overload. Instead of passing
27
- * sources and language features separately, pass an object with named properties. This change was made
28
- * for the sake of extensibility and future-compatibility. Note that only the new API
29
- * supports passing language features. If you need to pass language features, you must use
30
- * the new API.
31
- **/
32
- getEstimates(sources: [string, string][], params: string, languageFeatures?: string[]): Promise<string>;
33
- getEstimates(config: ProgramConfig, params: string): Promise<string>;
34
- getCircuit(config: ProgramConfig, target: TargetProfile, simulate: boolean, operation?: IOperationInfo): Promise<CircuitData>;
35
- getDocumentation(additionalSources?: [string, string][], targetProfile?: string, languageFeatures?: string[]): Promise<IDocFile[]>;
10
+ run(program: ProgramConfig, expr: string, shots: number, eventHandler: IQscEventTarget): Promise<void>;
11
+ getQir(program: ProgramConfig): Promise<string>;
12
+ getEstimates(program: ProgramConfig, params: string): Promise<string>;
13
+ getCircuit(program: ProgramConfig, simulate: boolean, operation?: IOperationInfo): Promise<CircuitData>;
14
+ getDocumentation(additionalProgram?: ProgramConfig): Promise<IDocFile[]>;
36
15
  checkExerciseSolution(userCode: string, exerciseSources: string[], eventHandler: IQscEventTarget): Promise<boolean>;
37
16
  }
38
- /** Type definition for the configuration of a program. */
39
- export type ProgramConfig = {
17
+ /**
18
+ * Type definition for the configuration of a program.
19
+ * If adding new properties, make them optional to maintain backward compatibility.
20
+ */
21
+ export type ProgramConfig = ({
40
22
  /** An array of source objects, each containing a name and contents. */
41
23
  sources: [string, string][];
42
24
  /** An array of language features to be opted in to in this compilation. */
43
25
  languageFeatures?: string[];
26
+ } | {
27
+ /** Sources from all resolved dependencies, along with their languageFeatures configuration */
28
+ packageGraphSources: IPackageGraphSources;
29
+ }) & {
44
30
  /** Target compilation profile. */
45
31
  profile?: TargetProfile;
46
32
  };
@@ -50,19 +36,20 @@ export declare class Compiler implements ICompiler {
50
36
  private wasm;
51
37
  constructor(wasm: Wasm);
52
38
  checkCode(code: string): Promise<VSDiagnostic[]>;
53
- getQir(sourcesOrConfig: [string, string][] | ProgramConfig, languageFeatures?: string[]): Promise<string>;
54
- newGetQir({ sources, languageFeatures, profile, }: ProgramConfig): Promise<string>;
55
- deprecatedGetQir(sources: [string, string][], languageFeatures: string[]): Promise<string>;
56
- getEstimates(sourcesOrConfig: [string, string][] | ProgramConfig, params: string, languageFeatures?: string[]): Promise<string>;
57
- newGetEstimates({ sources, languageFeatures, profile }: ProgramConfig, params: string): Promise<string>;
58
- deprecatedGetEstimates(sources: [string, string][], params: string, languageFeatures: string[]): Promise<string>;
59
39
  getAst(code: string, languageFeatures?: string[], profile?: TargetProfile): Promise<string>;
60
40
  getHir(code: string, languageFeatures: string[], profile: TargetProfile): Promise<string>;
61
- run(sourcesOrConfig: [string, string][] | ProgramConfig, expr: string, shots: number, eventHandler: IQscEventTarget): Promise<void>;
62
- getCircuit(config: ProgramConfig, target: TargetProfile, simulate: boolean, operation?: IOperationInfo): Promise<CircuitData>;
63
- getDocumentation(additionalSources?: [string, string][], targetProfile?: string, languageFeatures?: string[]): Promise<IDocFile[]>;
41
+ run(program: ProgramConfig, expr: string, shots: number, eventHandler: IQscEventTarget): Promise<void>;
42
+ getQir(program: ProgramConfig): Promise<string>;
43
+ getEstimates(program: ProgramConfig, params: string): Promise<string>;
44
+ getCircuit(program: ProgramConfig, simulate: boolean, operation?: IOperationInfo): Promise<CircuitData>;
45
+ getDocumentation(additionalProgram?: ProgramConfig): Promise<IDocFile[]>;
64
46
  checkExerciseSolution(userCode: string, exerciseSources: string[], eventHandler: IQscEventTarget): Promise<boolean>;
65
47
  }
48
+ /**
49
+ * Fills in the defaults, to convert from the backwards-compatible ProgramConfig,
50
+ * to the IProgramConfig type that the wasm layer expects
51
+ */
52
+ export declare function toWasmProgramConfig(program: ProgramConfig, defaultProfile: TargetProfile): Required<wasmIProgramConfig>;
66
53
  export declare function onCompilerEvent(msg: string, eventTarget: IQscEventTarget): void;
67
54
  /** The protocol definition to allow running the compiler in a worker. */
68
55
  export declare const compilerProtocol: ServiceProtocol<ICompiler, QscEventData>;
@@ -16,7 +16,13 @@ export class Compiler {
16
16
  const languageService = new this.wasm.LanguageService();
17
17
  const work = languageService.start_background_work((uri, version, errors) => {
18
18
  diags = errors;
19
- }, () => Promise.resolve(null), () => Promise.resolve([]), () => Promise.resolve(null));
19
+ }, {
20
+ readFile: async () => null,
21
+ listDirectory: async () => [],
22
+ resolvePath: async () => null,
23
+ fetchGithub: async () => "",
24
+ findManifestDirectory: async () => null,
25
+ });
20
26
  languageService.update_document("code", 1, code);
21
27
  // Yield to let the language service background worker handle the update
22
28
  await Promise.resolve();
@@ -25,75 +31,63 @@ export class Compiler {
25
31
  languageService.free();
26
32
  return diags;
27
33
  }
28
- async getQir(sourcesOrConfig, languageFeatures) {
29
- if (Array.isArray(sourcesOrConfig)) {
30
- return this.deprecatedGetQir(sourcesOrConfig, languageFeatures || []);
31
- }
32
- else {
33
- const config = sourcesOrConfig;
34
- return this.newGetQir(config);
35
- }
36
- }
37
- async newGetQir({ sources, languageFeatures = [], profile = "base", }) {
38
- return this.wasm.get_qir(sources, languageFeatures, profile);
39
- }
40
- async deprecatedGetQir(sources, languageFeatures) {
41
- return this.wasm.get_qir(sources, languageFeatures, "base");
42
- }
43
- async getEstimates(sourcesOrConfig, params, languageFeatures = []) {
44
- if (Array.isArray(sourcesOrConfig)) {
45
- return this.deprecatedGetEstimates(sourcesOrConfig, params, languageFeatures);
46
- }
47
- else {
48
- return this.newGetEstimates(sourcesOrConfig, params);
49
- }
50
- }
51
- async newGetEstimates({ sources, languageFeatures, profile = "unrestricted" }, params) {
52
- return this.wasm.get_estimates(sources, params, languageFeatures || [], profile);
53
- }
54
- async deprecatedGetEstimates(sources, params, languageFeatures) {
55
- return this.wasm.get_estimates(sources, params, languageFeatures, "unrestricted");
56
- }
57
34
  async getAst(code, languageFeatures, profile) {
58
35
  return this.wasm.get_ast(code, languageFeatures ?? [], profile ?? "adaptive_ri");
59
36
  }
60
37
  async getHir(code, languageFeatures, profile) {
61
38
  return this.wasm.get_hir(code, languageFeatures ?? [], profile ?? "adaptive_ri");
62
39
  }
63
- async run(sourcesOrConfig, expr, shots, eventHandler) {
64
- let sources;
65
- let profile = "unrestricted";
66
- let languageFeatures = [];
67
- if (Array.isArray(sourcesOrConfig)) {
68
- // this is the deprecated API
69
- sources = sourcesOrConfig;
70
- }
71
- else {
72
- // this is the new API
73
- sources = sourcesOrConfig.sources;
74
- languageFeatures = sourcesOrConfig.languageFeatures || [];
75
- profile = sourcesOrConfig.profile || "unrestricted";
76
- }
40
+ async run(program, expr, shots, eventHandler) {
77
41
  // All results are communicated as events, but if there is a compiler error (e.g. an invalid
78
42
  // entry expression or similar), it may throw on run. The caller should expect this promise
79
43
  // may reject without all shots running or events firing.
80
- this.wasm.run(sources, expr, (msg) => onCompilerEvent(msg, eventHandler), shots, languageFeatures, profile);
44
+ this.wasm.run(toWasmProgramConfig(program, "unrestricted"), expr, (msg) => onCompilerEvent(msg, eventHandler), shots);
45
+ }
46
+ async getQir(program) {
47
+ return this.wasm.get_qir(toWasmProgramConfig(program, "base"));
81
48
  }
82
- async getCircuit(config, target, simulate, operation) {
83
- return this.wasm.get_circuit(config.sources, target, config.languageFeatures || [], simulate, operation);
49
+ async getEstimates(program, params) {
50
+ return this.wasm.get_estimates(toWasmProgramConfig(program, "unrestricted"), params);
51
+ }
52
+ async getCircuit(program, simulate, operation) {
53
+ return this.wasm.get_circuit(toWasmProgramConfig(program, "unrestricted"), simulate, operation);
84
54
  }
85
55
  // Returns all autogenerated documentation files for the standard library
86
56
  // and loaded project (if requested). This include file names and metadata,
87
57
  // including specially formatted table of content file.
88
- async getDocumentation(additionalSources, targetProfile, languageFeatures) {
89
- // Get documentation from wasm layer
90
- return this.wasm.generate_docs(additionalSources, targetProfile, languageFeatures);
58
+ async getDocumentation(additionalProgram) {
59
+ return this.wasm.generate_docs(additionalProgram &&
60
+ toWasmProgramConfig(additionalProgram, "unrestricted"));
91
61
  }
92
62
  async checkExerciseSolution(userCode, exerciseSources, eventHandler) {
93
63
  const success = this.wasm.check_exercise_solution(userCode, exerciseSources, (msg) => onCompilerEvent(msg, eventHandler));
94
64
  return success;
95
65
  }
96
66
  }
67
+ /**
68
+ * Fills in the defaults, to convert from the backwards-compatible ProgramConfig,
69
+ * to the IProgramConfig type that the wasm layer expects
70
+ */
71
+ export function toWasmProgramConfig(program, defaultProfile) {
72
+ let packageGraphSources;
73
+ if ("sources" in program) {
74
+ // The simpler type is used, where there are no dependencies and only a list
75
+ // of sources is passed in.
76
+ packageGraphSources = {
77
+ root: {
78
+ sources: program.sources,
79
+ languageFeatures: program.languageFeatures || [],
80
+ dependencies: {},
81
+ },
82
+ packages: {},
83
+ };
84
+ }
85
+ else {
86
+ // A full package graph is passed in.
87
+ packageGraphSources = program.packageGraphSources;
88
+ }
89
+ return { packageGraphSources, profile: program.profile || defaultProfile };
90
+ }
97
91
  export function onCompilerEvent(msg, eventTarget) {
98
92
  const qscMsg = eventStringToMsg(msg);
99
93
  if (!qscMsg) {
@@ -1,11 +1,11 @@
1
1
  import { type Circuit as CircuitData } from "@microsoft/quantum-viz.js/lib/circuit.js";
2
2
  import type { IBreakpointSpan, IQuantumState, IStackFrame, IStructStepResult, IVariable } from "../../lib/web/qsc_wasm.js";
3
- import { TargetProfile } from "../browser.js";
3
+ import { ProgramConfig } from "../browser.js";
4
4
  import { IQscEventTarget, QscEventData } from "../compiler/events.js";
5
5
  import { IServiceProxy, ServiceProtocol } from "../workers/common.js";
6
6
  type QscWasm = typeof import("../../lib/web/qsc_wasm.js");
7
7
  export interface IDebugService {
8
- loadSource(sources: [string, string][], target: TargetProfile, entry: string | undefined, language_features: string[]): Promise<string>;
8
+ loadProgram(program: ProgramConfig, entry: string | undefined): Promise<string>;
9
9
  getBreakpoints(path: string): Promise<IBreakpointSpan[]>;
10
10
  getLocalVariables(): Promise<Array<IVariable>>;
11
11
  captureQuantumState(): Promise<Array<IQuantumState>>;
@@ -22,7 +22,7 @@ export declare class QSharpDebugService implements IDebugService {
22
22
  private wasm;
23
23
  private debugService;
24
24
  constructor(wasm: QscWasm);
25
- loadSource(sources: [string, string][], target: TargetProfile, entry: string | undefined, language_features: string[]): Promise<string>;
25
+ loadProgram(program: ProgramConfig, entry: string | undefined): Promise<string>;
26
26
  getBreakpoints(path: string): Promise<IBreakpointSpan[]>;
27
27
  getLocalVariables(): Promise<Array<IVariable>>;
28
28
  captureQuantumState(): Promise<Array<IQuantumState>>;
@@ -3,14 +3,15 @@
3
3
  import { eventStringToMsg } from "../compiler/common.js";
4
4
  import { makeEvent, } from "../compiler/events.js";
5
5
  import { log } from "../log.js";
6
+ import { toWasmProgramConfig } from "../compiler/compiler.js";
6
7
  export class QSharpDebugService {
7
8
  constructor(wasm) {
8
9
  log.info("Constructing a QSharpDebugService instance");
9
10
  this.wasm = wasm;
10
11
  this.debugService = new wasm.DebugService();
11
12
  }
12
- async loadSource(sources, target, entry, language_features) {
13
- return this.debugService.load_source(sources, target, entry, language_features);
13
+ async loadProgram(program, entry) {
14
+ return this.debugService.load_program(toWasmProgramConfig(program, "unrestricted"), entry);
14
15
  }
15
16
  async getBreakpoints(path) {
16
17
  return this.debugService.get_breakpoints(path).spans;
@@ -85,7 +86,7 @@ export function onCompilerEvent(msg, eventTarget) {
85
86
  export const debugServiceProtocol = {
86
87
  class: QSharpDebugService,
87
88
  methods: {
88
- loadSource: "request",
89
+ loadProgram: "request",
89
90
  getBreakpoints: "request",
90
91
  getLocalVariables: "request",
91
92
  captureQuantumState: "request",