@azure/quantum-jobs 1.0.0-beta.1 → 1.0.0-beta.2

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 (301) hide show
  1. package/{LICENSE.txt → LICENSE} +4 -4
  2. package/README.md +247 -98
  3. package/dist/browser/index.d.ts +4 -0
  4. package/dist/browser/index.d.ts.map +1 -0
  5. package/dist/browser/index.js +11 -0
  6. package/dist/browser/index.js.map +1 -0
  7. package/dist/browser/models/index.d.ts +320 -0
  8. package/dist/browser/models/index.d.ts.map +1 -0
  9. package/dist/browser/models/index.js +58 -0
  10. package/dist/browser/models/index.js.map +1 -0
  11. package/dist/browser/models/mappers.d.ts +13 -0
  12. package/dist/browser/models/mappers.d.ts.map +1 -0
  13. package/{dist-esm/src → dist/browser}/models/mappers.js +141 -140
  14. package/dist/browser/models/mappers.js.map +1 -0
  15. package/dist/browser/models/parameters.d.ts +12 -0
  16. package/dist/browser/models/parameters.d.ts.map +1 -0
  17. package/{dist-esm/src → dist/browser}/models/parameters.js +37 -37
  18. package/dist/browser/models/parameters.js.map +1 -0
  19. package/dist/browser/operations/index.d.ts +5 -0
  20. package/dist/browser/operations/index.d.ts.map +1 -0
  21. package/dist/browser/operations/index.js +12 -0
  22. package/dist/browser/operations/index.js.map +1 -0
  23. package/dist/browser/operations/jobs.d.ts +51 -0
  24. package/dist/browser/operations/jobs.d.ts.map +1 -0
  25. package/dist/browser/operations/jobs.js +209 -0
  26. package/dist/browser/operations/jobs.js.map +1 -0
  27. package/dist/browser/operations/providers.d.ts +32 -0
  28. package/dist/browser/operations/providers.d.ts.map +1 -0
  29. package/dist/browser/operations/providers.js +118 -0
  30. package/dist/browser/operations/providers.js.map +1 -0
  31. package/dist/browser/operations/quotas.d.ts +32 -0
  32. package/dist/browser/operations/quotas.d.ts.map +1 -0
  33. package/dist/browser/operations/quotas.js +118 -0
  34. package/dist/browser/operations/quotas.js.map +1 -0
  35. package/dist/browser/operations/storage.d.ts +20 -0
  36. package/dist/browser/operations/storage.d.ts.map +1 -0
  37. package/{dist-esm/src → dist/browser}/operations/storage.js +33 -35
  38. package/dist/browser/operations/storage.js.map +1 -0
  39. package/dist/browser/operationsInterfaces/index.d.ts +5 -0
  40. package/dist/browser/operationsInterfaces/index.d.ts.map +1 -0
  41. package/dist/browser/operationsInterfaces/index.js +12 -0
  42. package/dist/browser/operationsInterfaces/index.js.map +1 -0
  43. package/dist/browser/operationsInterfaces/jobs.d.ts +30 -0
  44. package/dist/browser/operationsInterfaces/jobs.d.ts.map +1 -0
  45. package/{dist-esm/src/models/index.js → dist/browser/operationsInterfaces/jobs.js} +1 -1
  46. package/dist/browser/operationsInterfaces/jobs.js.map +1 -0
  47. package/dist/browser/operationsInterfaces/providers.d.ts +11 -0
  48. package/dist/browser/operationsInterfaces/providers.d.ts.map +1 -0
  49. package/{dist-esm/src/operations/index.js → dist/browser/operationsInterfaces/providers.js} +2 -5
  50. package/dist/browser/operationsInterfaces/providers.js.map +1 -0
  51. package/dist/browser/operationsInterfaces/quotas.d.ts +11 -0
  52. package/dist/browser/operationsInterfaces/quotas.d.ts.map +1 -0
  53. package/dist/browser/operationsInterfaces/quotas.js +9 -0
  54. package/dist/browser/operationsInterfaces/quotas.js.map +1 -0
  55. package/dist/browser/operationsInterfaces/storage.d.ts +12 -0
  56. package/dist/browser/operationsInterfaces/storage.d.ts.map +1 -0
  57. package/dist/browser/operationsInterfaces/storage.js +9 -0
  58. package/dist/browser/operationsInterfaces/storage.js.map +1 -0
  59. package/dist/browser/package.json +3 -0
  60. package/dist/browser/pagingHelper.d.ts +13 -0
  61. package/dist/browser/pagingHelper.d.ts.map +1 -0
  62. package/dist/browser/pagingHelper.js +30 -0
  63. package/dist/browser/pagingHelper.js.map +1 -0
  64. package/dist/browser/quantumJobClient.d.ts +25 -0
  65. package/dist/browser/quantumJobClient.d.ts.map +1 -0
  66. package/dist/browser/quantumJobClient.js +93 -0
  67. package/dist/browser/quantumJobClient.js.map +1 -0
  68. package/dist/browser/tracing.d.ts +2 -0
  69. package/dist/browser/tracing.d.ts.map +1 -0
  70. package/dist/browser/tracing.js +14 -0
  71. package/dist/browser/tracing.js.map +1 -0
  72. package/dist/commonjs/index.d.ts +4 -0
  73. package/dist/commonjs/index.d.ts.map +1 -0
  74. package/dist/commonjs/index.js +16 -0
  75. package/dist/commonjs/index.js.map +1 -0
  76. package/dist/commonjs/models/index.d.ts +320 -0
  77. package/dist/commonjs/models/index.d.ts.map +1 -0
  78. package/dist/commonjs/models/index.js +61 -0
  79. package/dist/commonjs/models/index.js.map +1 -0
  80. package/dist/commonjs/models/mappers.d.ts +13 -0
  81. package/dist/commonjs/models/mappers.d.ts.map +1 -0
  82. package/dist/commonjs/models/mappers.js +414 -0
  83. package/dist/commonjs/models/mappers.js.map +1 -0
  84. package/dist/commonjs/models/parameters.d.ts +12 -0
  85. package/dist/commonjs/models/parameters.d.ts.map +1 -0
  86. package/dist/commonjs/models/parameters.js +104 -0
  87. package/dist/commonjs/models/parameters.js.map +1 -0
  88. package/dist/commonjs/operations/index.d.ts +5 -0
  89. package/dist/commonjs/operations/index.d.ts.map +1 -0
  90. package/dist/commonjs/operations/index.js +15 -0
  91. package/dist/commonjs/operations/index.js.map +1 -0
  92. package/dist/commonjs/operations/jobs.d.ts +51 -0
  93. package/dist/commonjs/operations/jobs.d.ts.map +1 -0
  94. package/dist/commonjs/operations/jobs.js +214 -0
  95. package/dist/commonjs/operations/jobs.js.map +1 -0
  96. package/dist/commonjs/operations/providers.d.ts +32 -0
  97. package/dist/commonjs/operations/providers.d.ts.map +1 -0
  98. package/dist/commonjs/operations/providers.js +123 -0
  99. package/dist/commonjs/operations/providers.js.map +1 -0
  100. package/dist/commonjs/operations/quotas.d.ts +32 -0
  101. package/dist/commonjs/operations/quotas.d.ts.map +1 -0
  102. package/dist/commonjs/operations/quotas.js +123 -0
  103. package/dist/commonjs/operations/quotas.js.map +1 -0
  104. package/dist/commonjs/operations/storage.d.ts +20 -0
  105. package/dist/commonjs/operations/storage.d.ts.map +1 -0
  106. package/dist/commonjs/operations/storage.js +63 -0
  107. package/dist/commonjs/operations/storage.js.map +1 -0
  108. package/dist/commonjs/operationsInterfaces/index.d.ts +5 -0
  109. package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
  110. package/dist/commonjs/operationsInterfaces/index.js +15 -0
  111. package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
  112. package/dist/commonjs/operationsInterfaces/jobs.d.ts +30 -0
  113. package/dist/commonjs/operationsInterfaces/jobs.d.ts.map +1 -0
  114. package/dist/commonjs/operationsInterfaces/jobs.js +10 -0
  115. package/dist/commonjs/operationsInterfaces/jobs.js.map +1 -0
  116. package/dist/commonjs/operationsInterfaces/providers.d.ts +11 -0
  117. package/dist/commonjs/operationsInterfaces/providers.d.ts.map +1 -0
  118. package/dist/commonjs/operationsInterfaces/providers.js +10 -0
  119. package/dist/commonjs/operationsInterfaces/providers.js.map +1 -0
  120. package/dist/commonjs/operationsInterfaces/quotas.d.ts +11 -0
  121. package/dist/commonjs/operationsInterfaces/quotas.d.ts.map +1 -0
  122. package/dist/commonjs/operationsInterfaces/quotas.js +10 -0
  123. package/dist/commonjs/operationsInterfaces/quotas.js.map +1 -0
  124. package/dist/commonjs/operationsInterfaces/storage.d.ts +12 -0
  125. package/dist/commonjs/operationsInterfaces/storage.d.ts.map +1 -0
  126. package/dist/commonjs/operationsInterfaces/storage.js +10 -0
  127. package/dist/commonjs/operationsInterfaces/storage.js.map +1 -0
  128. package/dist/commonjs/package.json +3 -0
  129. package/dist/commonjs/pagingHelper.d.ts +13 -0
  130. package/dist/commonjs/pagingHelper.d.ts.map +1 -0
  131. package/dist/commonjs/pagingHelper.js +34 -0
  132. package/dist/commonjs/pagingHelper.js.map +1 -0
  133. package/dist/commonjs/quantumJobClient.d.ts +25 -0
  134. package/dist/commonjs/quantumJobClient.d.ts.map +1 -0
  135. package/dist/commonjs/quantumJobClient.js +98 -0
  136. package/dist/commonjs/quantumJobClient.js.map +1 -0
  137. package/dist/commonjs/tracing.d.ts +2 -0
  138. package/dist/commonjs/tracing.d.ts.map +1 -0
  139. package/dist/commonjs/tracing.js +17 -0
  140. package/dist/commonjs/tracing.js.map +1 -0
  141. package/dist/commonjs/tsdoc-metadata.json +11 -0
  142. package/dist/esm/index.d.ts +4 -0
  143. package/dist/esm/index.d.ts.map +1 -0
  144. package/dist/esm/index.js +11 -0
  145. package/dist/esm/index.js.map +1 -0
  146. package/dist/esm/models/index.d.ts +320 -0
  147. package/dist/esm/models/index.d.ts.map +1 -0
  148. package/dist/esm/models/index.js +58 -0
  149. package/dist/esm/models/index.js.map +1 -0
  150. package/dist/esm/models/mappers.d.ts +13 -0
  151. package/dist/esm/models/mappers.d.ts.map +1 -0
  152. package/dist/esm/models/mappers.js +411 -0
  153. package/dist/esm/models/mappers.js.map +1 -0
  154. package/dist/esm/models/parameters.d.ts +12 -0
  155. package/dist/esm/models/parameters.d.ts.map +1 -0
  156. package/dist/esm/models/parameters.js +101 -0
  157. package/dist/esm/models/parameters.js.map +1 -0
  158. package/dist/esm/operations/index.d.ts +5 -0
  159. package/dist/esm/operations/index.d.ts.map +1 -0
  160. package/dist/esm/operations/index.js +12 -0
  161. package/dist/esm/operations/index.js.map +1 -0
  162. package/dist/esm/operations/jobs.d.ts +51 -0
  163. package/dist/esm/operations/jobs.d.ts.map +1 -0
  164. package/dist/esm/operations/jobs.js +209 -0
  165. package/dist/esm/operations/jobs.js.map +1 -0
  166. package/dist/esm/operations/providers.d.ts +32 -0
  167. package/dist/esm/operations/providers.d.ts.map +1 -0
  168. package/dist/esm/operations/providers.js +118 -0
  169. package/dist/esm/operations/providers.js.map +1 -0
  170. package/dist/esm/operations/quotas.d.ts +32 -0
  171. package/dist/esm/operations/quotas.d.ts.map +1 -0
  172. package/dist/esm/operations/quotas.js +118 -0
  173. package/dist/esm/operations/quotas.js.map +1 -0
  174. package/dist/esm/operations/storage.d.ts +20 -0
  175. package/dist/esm/operations/storage.d.ts.map +1 -0
  176. package/dist/esm/operations/storage.js +58 -0
  177. package/dist/esm/operations/storage.js.map +1 -0
  178. package/dist/esm/operationsInterfaces/index.d.ts +5 -0
  179. package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
  180. package/dist/esm/operationsInterfaces/index.js +12 -0
  181. package/dist/esm/operationsInterfaces/index.js.map +1 -0
  182. package/dist/esm/operationsInterfaces/jobs.d.ts +30 -0
  183. package/dist/esm/operationsInterfaces/jobs.d.ts.map +1 -0
  184. package/dist/esm/operationsInterfaces/jobs.js +9 -0
  185. package/dist/esm/operationsInterfaces/jobs.js.map +1 -0
  186. package/dist/esm/operationsInterfaces/providers.d.ts +11 -0
  187. package/dist/esm/operationsInterfaces/providers.d.ts.map +1 -0
  188. package/dist/esm/operationsInterfaces/providers.js +9 -0
  189. package/dist/esm/operationsInterfaces/providers.js.map +1 -0
  190. package/dist/esm/operationsInterfaces/quotas.d.ts +11 -0
  191. package/dist/esm/operationsInterfaces/quotas.d.ts.map +1 -0
  192. package/dist/esm/operationsInterfaces/quotas.js +9 -0
  193. package/dist/esm/operationsInterfaces/quotas.js.map +1 -0
  194. package/dist/esm/operationsInterfaces/storage.d.ts +12 -0
  195. package/dist/esm/operationsInterfaces/storage.d.ts.map +1 -0
  196. package/dist/esm/operationsInterfaces/storage.js +9 -0
  197. package/dist/esm/operationsInterfaces/storage.js.map +1 -0
  198. package/dist/esm/package.json +3 -0
  199. package/dist/esm/pagingHelper.d.ts +13 -0
  200. package/dist/esm/pagingHelper.d.ts.map +1 -0
  201. package/dist/esm/pagingHelper.js +30 -0
  202. package/dist/esm/pagingHelper.js.map +1 -0
  203. package/dist/esm/quantumJobClient.d.ts +25 -0
  204. package/dist/esm/quantumJobClient.d.ts.map +1 -0
  205. package/dist/esm/quantumJobClient.js +93 -0
  206. package/dist/esm/quantumJobClient.js.map +1 -0
  207. package/dist/esm/tracing.d.ts +2 -0
  208. package/dist/esm/tracing.d.ts.map +1 -0
  209. package/dist/esm/tracing.js +14 -0
  210. package/dist/esm/tracing.js.map +1 -0
  211. package/dist/react-native/index.d.ts +4 -0
  212. package/dist/react-native/index.d.ts.map +1 -0
  213. package/dist/react-native/index.js +11 -0
  214. package/dist/react-native/index.js.map +1 -0
  215. package/dist/react-native/models/index.d.ts +320 -0
  216. package/dist/react-native/models/index.d.ts.map +1 -0
  217. package/dist/react-native/models/index.js +58 -0
  218. package/dist/react-native/models/index.js.map +1 -0
  219. package/dist/react-native/models/mappers.d.ts +13 -0
  220. package/dist/react-native/models/mappers.d.ts.map +1 -0
  221. package/dist/react-native/models/mappers.js +411 -0
  222. package/dist/react-native/models/mappers.js.map +1 -0
  223. package/dist/react-native/models/parameters.d.ts +12 -0
  224. package/dist/react-native/models/parameters.d.ts.map +1 -0
  225. package/dist/react-native/models/parameters.js +101 -0
  226. package/dist/react-native/models/parameters.js.map +1 -0
  227. package/dist/react-native/operations/index.d.ts +5 -0
  228. package/dist/react-native/operations/index.d.ts.map +1 -0
  229. package/dist/react-native/operations/index.js +12 -0
  230. package/dist/react-native/operations/index.js.map +1 -0
  231. package/dist/react-native/operations/jobs.d.ts +51 -0
  232. package/dist/react-native/operations/jobs.d.ts.map +1 -0
  233. package/dist/react-native/operations/jobs.js +209 -0
  234. package/dist/react-native/operations/jobs.js.map +1 -0
  235. package/dist/react-native/operations/providers.d.ts +32 -0
  236. package/dist/react-native/operations/providers.d.ts.map +1 -0
  237. package/dist/react-native/operations/providers.js +118 -0
  238. package/dist/react-native/operations/providers.js.map +1 -0
  239. package/dist/react-native/operations/quotas.d.ts +32 -0
  240. package/dist/react-native/operations/quotas.d.ts.map +1 -0
  241. package/dist/react-native/operations/quotas.js +118 -0
  242. package/dist/react-native/operations/quotas.js.map +1 -0
  243. package/dist/react-native/operations/storage.d.ts +20 -0
  244. package/dist/react-native/operations/storage.d.ts.map +1 -0
  245. package/dist/react-native/operations/storage.js +58 -0
  246. package/dist/react-native/operations/storage.js.map +1 -0
  247. package/dist/react-native/operationsInterfaces/index.d.ts +5 -0
  248. package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
  249. package/dist/react-native/operationsInterfaces/index.js +12 -0
  250. package/dist/react-native/operationsInterfaces/index.js.map +1 -0
  251. package/dist/react-native/operationsInterfaces/jobs.d.ts +30 -0
  252. package/dist/react-native/operationsInterfaces/jobs.d.ts.map +1 -0
  253. package/dist/react-native/operationsInterfaces/jobs.js +9 -0
  254. package/dist/react-native/operationsInterfaces/jobs.js.map +1 -0
  255. package/dist/react-native/operationsInterfaces/providers.d.ts +11 -0
  256. package/dist/react-native/operationsInterfaces/providers.d.ts.map +1 -0
  257. package/dist/react-native/operationsInterfaces/providers.js +9 -0
  258. package/dist/react-native/operationsInterfaces/providers.js.map +1 -0
  259. package/dist/react-native/operationsInterfaces/quotas.d.ts +11 -0
  260. package/dist/react-native/operationsInterfaces/quotas.d.ts.map +1 -0
  261. package/dist/react-native/operationsInterfaces/quotas.js +9 -0
  262. package/dist/react-native/operationsInterfaces/quotas.js.map +1 -0
  263. package/dist/react-native/operationsInterfaces/storage.d.ts +12 -0
  264. package/dist/react-native/operationsInterfaces/storage.d.ts.map +1 -0
  265. package/dist/react-native/operationsInterfaces/storage.js +9 -0
  266. package/dist/react-native/operationsInterfaces/storage.js.map +1 -0
  267. package/dist/react-native/package.json +3 -0
  268. package/dist/react-native/pagingHelper.d.ts +13 -0
  269. package/dist/react-native/pagingHelper.d.ts.map +1 -0
  270. package/dist/react-native/pagingHelper.js +30 -0
  271. package/dist/react-native/pagingHelper.js.map +1 -0
  272. package/dist/react-native/quantumJobClient.d.ts +25 -0
  273. package/dist/react-native/quantumJobClient.d.ts.map +1 -0
  274. package/dist/react-native/quantumJobClient.js +93 -0
  275. package/dist/react-native/quantumJobClient.js.map +1 -0
  276. package/dist/react-native/tracing.d.ts +2 -0
  277. package/dist/react-native/tracing.d.ts.map +1 -0
  278. package/dist/react-native/tracing.js +14 -0
  279. package/dist/react-native/tracing.js.map +1 -0
  280. package/package.json +90 -92
  281. package/CHANGELOG.md +0 -5
  282. package/dist/index.js +0 -1309
  283. package/dist/index.js.map +0 -1
  284. package/dist-esm/src/index.js +0 -13
  285. package/dist-esm/src/index.js.map +0 -1
  286. package/dist-esm/src/models/index.js.map +0 -1
  287. package/dist-esm/src/models/mappers.js.map +0 -1
  288. package/dist-esm/src/models/parameters.js.map +0 -1
  289. package/dist-esm/src/operations/index.js.map +0 -1
  290. package/dist-esm/src/operations/jobs.js +0 -280
  291. package/dist-esm/src/operations/jobs.js.map +0 -1
  292. package/dist-esm/src/operations/providers.js +0 -182
  293. package/dist-esm/src/operations/providers.js.map +0 -1
  294. package/dist-esm/src/operations/quotas.js +0 -182
  295. package/dist-esm/src/operations/quotas.js.map +0 -1
  296. package/dist-esm/src/operations/storage.js.map +0 -1
  297. package/dist-esm/src/quantumJobClient.js +0 -33
  298. package/dist-esm/src/quantumJobClient.js.map +0 -1
  299. package/dist-esm/src/quantumJobClientContext.js +0 -59
  300. package/dist-esm/src/quantumJobClientContext.js.map +0 -1
  301. package/types/latest/quantum-jobs.d.ts +0 -534
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ Copyright (c) Microsoft Corporation.
2
2
 
3
- Copyright (c) 2021 Microsoft
3
+ MIT License
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -12,10 +12,10 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,12 +2,17 @@
2
2
 
3
3
  This package contains an isomorphic SDK for QuantumJobClient.
4
4
 
5
- Azure Quantum is a Microsoft Azure service that you can use to run quantum computing programs or solve optimization problems in the cloud. Using the Azure Quantum tools and SDKs, you can create quantum programs and run them against different quantum simulators and machines. You can use the `@azure/quantum-jobs` client library to:
5
+ Azure Quantum is a Microsoft Azure service that you can use to run quantum computing programs in the cloud. Using the Azure Quantum tools and SDKs, you can create quantum programs and run them against different quantum simulators and machines. You can use the `@azure/quantum-jobs` client library to:
6
6
 
7
7
  - Create, enumerate, and cancel quantum jobs
8
8
  - Enumerate provider status and quotas
9
9
 
10
- [Source code][source] | [API reference documentation](https://docs.microsoft.com/qsharp/api/) | [Product documentation](https://docs.microsoft.com/azure/quantum/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/quantum/quantum-jobs/samples)
10
+ Key links:
11
+
12
+ - [Source code][source]
13
+ - [API reference documentation](https://learn.microsoft.com/qsharp/api/)
14
+ - [Product documentation](https://learn.microsoft.com/azure/quantum/)
15
+ - [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quantum/quantum-jobs/samples)
11
16
 
12
17
  ## Getting started
13
18
 
@@ -23,15 +28,15 @@ npm install @azure/quantum-jobs
23
28
 
24
29
  ### Prerequisites
25
30
 
26
- - Node.js version 8.x.x or higher
31
+ - [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
27
32
  - [Azure subscription](https://azure.microsoft.com/free/)
28
33
  - [Azure Quantum Workspace][workspaces]
29
34
 
30
35
  ### Authenticate the client
31
36
 
32
- To authenticate with the service, you can use [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential) from the `@azure/identity` library. This will try different authentication mechanisms based on the environment (e.g. Environment Variables, ManagedIdentity, CachedTokens) and finally, it will fallback to InteractiveBrowserCredential.
37
+ To authenticate with the service, you can use [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential) from the `@azure/identity` library. This will try different authentication mechanisms based on the environment (e.g. Environment Variables, ManagedIdentity, CachedTokens) and finally, it will fallback to InteractiveBrowserCredential.
33
38
 
34
- The client also allows the user to override the above behavior by passing their own implementations of the [TokenCredential](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-auth/src/tokenCredential.ts).
39
+ The client also allows the user to override the above behavior by passing their own implementations of the [TokenCredential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/src/tokenCredential.ts).
35
40
 
36
41
  `TokenCredential` is the default Authentication mechanism used by Azure SDKs.
37
42
 
@@ -53,126 +58,260 @@ Create an instance of the QuantumJobClient by passing in these parameters:
53
58
 
54
59
  - [Subscription Id][subscriptions] - looks like XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX and can be found in your list of subscriptions on azure
55
60
  - [Resource Group Name][resource-groups] - a container that holds related resources for an Azure solution
56
- - [Workspace Name][workspaces] - a collection of assets associated with running quantum or optimization applications
61
+ - [Workspace Name][workspaces] - a collection of assets associated with running quantum
57
62
  - [Location][location] - choose the best data center by geographical region
58
63
  - [Storage Container Name][blob-storage] - your blob storage
59
64
  - [Credential][credentials] - used to authenticate
60
65
 
61
- ```Javascript Snippet
62
- const credential = new DefaultAzureCredential();
63
-
64
- // Create a QuantumJobClient
65
- const subscriptionId = "your_subscription_id";
66
- const resourceGroupName = "your_resource_group_name";
67
- const workspaceName = "your_quantum_workspace_name";
68
- const storageContainerName = "mycontainer";
69
- const location = "westus"; //"your_location";
70
- const endpoint = "https://" + location + ".quantum.azure.com";
71
-
72
- const quantumJobClient = new QuantumJobClient(
73
- credential,
74
- subscriptionId,
75
- resourceGroupName,
76
- workspaceName,
77
- {
78
- endpoint: endpoint,
79
- credentialScopes: "https://quantum.microsoft.com/.default"
80
- }
81
- );
66
+ ```ts snippet:ReadmeSampleCreateClient_TokenCredential
67
+ import { DefaultAzureCredential } from "@azure/identity";
68
+ import { QuantumJobClient } from "@azure/quantum-jobs";
69
+
70
+ const credential = new DefaultAzureCredential();
71
+
72
+ // Create a QuantumJobClient
73
+ const subscriptionId = "your_subscription_id";
74
+ const resourceGroupName = "your_resource_group_name";
75
+ const workspaceName = "your_quantum_workspace_name";
76
+ const location = "westus";
77
+ const endpoint = `https://${location}.quantum.azure.com`;
78
+ const quantumJobClient = new QuantumJobClient(
79
+ credential,
80
+ subscriptionId,
81
+ resourceGroupName,
82
+ workspaceName,
83
+ {
84
+ endpoint: endpoint,
85
+ credentialScopes: "https://quantum.microsoft.com/.default",
86
+ },
87
+ );
82
88
  ```
83
89
 
84
90
  ### Get Container SAS URI
85
91
 
86
92
  Create a storage container to put your data.
87
93
 
88
- ```Javascript Snippet
89
- // Get container Uri with SAS key
90
- const containerUri = (
91
- await quantumJobClient.storage.sasUri({
92
- containerName: storageContainerName
93
- })
94
- ).sasUri;
95
-
96
- // Create container if not exists
97
- const containerClient = new ContainerClient(containerUri);
98
- await containerClient.createIfNotExists();
94
+ ```ts snippet:ReadmeSampleCreateContainer
95
+ import { DefaultAzureCredential } from "@azure/identity";
96
+ import { QuantumJobClient } from "@azure/quantum-jobs";
97
+ import { ContainerClient } from "@azure/storage-blob";
98
+
99
+ const credential = new DefaultAzureCredential();
100
+ const subscriptionId = "your_subscription_id";
101
+ const resourceGroupName = "your_resource_group_name";
102
+ const workspaceName = "your_quantum_workspace_name";
103
+ const storageContainerName = "containername";
104
+ const location = "westus";
105
+ const endpoint = `https://${location}.quantum.azure.com`;
106
+
107
+ const quantumJobClient = new QuantumJobClient(
108
+ credential,
109
+ subscriptionId,
110
+ resourceGroupName,
111
+ workspaceName,
112
+ {
113
+ endpoint: endpoint,
114
+ credentialScopes: "https://quantum.microsoft.com/.default",
115
+ },
116
+ );
117
+
118
+ // Get container Uri with SAS key
119
+ const containerUri = (
120
+ await quantumJobClient.storage.sasUri({
121
+ containerName: storageContainerName,
122
+ })
123
+ ).sasUri;
124
+
125
+ // Create container if not exists
126
+ const containerClient = new ContainerClient(containerUri);
127
+ await containerClient.createIfNotExists();
99
128
  ```
100
129
 
130
+ ### Compile your quantum program into QIR
131
+
132
+ This step can be done in multiple ways and it is not in scope for this sample.
133
+
134
+ [Quantum Intermediate Representation (QIR)](https://github.com/qir-alliance/qir-spec) is a [QIR Alliance](https://www.qir-alliance.org/) specification to represent quantum programs within the [LLVM](https://llvm.org/) Intermediate Representation (IR).
135
+
136
+ A few methods to compile or generate a quantum program into QIR:
137
+
138
+ - [Q# compiler](https://github.com/microsoft/qsharp-compiler/): Can be used to [compile Q# Code into QIR](https://github.com/microsoft/qsharp-compiler/tree/main/src/QsCompiler/QirGeneration).
139
+ - [PyQIR](https://github.com/qir-alliance/pyqir): PyQIR is a set of APIs for generating, parsing, and evaluating Quantum Intermediate Representation (QIR).
140
+ - [IQ#](https://github.com/microsoft/iqsharp): Can be used to compile a Q# program into QIR with the [%qir](https://learn.microsoft.com/qsharp/api/iqsharp-magic/qir) magic command.
141
+
142
+ In this sample, we assume you already have a file with the QIR bitcode and you know the method name that you want to execute (entry point).
143
+
144
+ We will use the QIR bitcode sample (`BellState.bc` in the samples folder), compiled a Q# code (`BellState.qs` in the samples folder) targeting the `quantinuum.sim.h1-1e` target, with `AdaptiveExecution` target capability.
145
+
101
146
  ### Upload Input Data
102
147
 
103
- Using the SAS URI, upload the json input data to the blob client.
104
- This contains the parameters to be used with [Quantum Inspired Optimizations](https://docs.microsoft.com/azure/quantum/optimization-overview-introduction)
105
-
106
- ```Javascript Snippet
107
- // Get input data blob Uri with SAS key
108
- const blobName = "myjobinput.json";
109
- const inputDataUri = (
110
- await quantumJobClient.storage.sasUri({
111
- containerName: storageContainerName,
112
- blobName: blobName
113
- })
114
- ).sasUri;
115
-
116
- // Upload input data to blob
117
- const blobClient = new BlockBlobClient(inputDataUri);
118
- const problemFilename = "problem.json";
119
- const fileContent = fs.readFileSync(problemFilename, "utf8");
120
- await blobClient.upload(fileContent, Buffer.byteLength(fileContent));
148
+ Using the SAS URI, upload the QIR bitcode input data to the blob client.
149
+
150
+ ```ts snippet:ReadmeSampleUploadInputData
151
+ import { DefaultAzureCredential } from "@azure/identity";
152
+ import { QuantumJobClient } from "@azure/quantum-jobs";
153
+ import { BlockBlobClient } from "@azure/storage-blob";
154
+ import { readFileSync } from "node:fs";
155
+
156
+ const credential = new DefaultAzureCredential();
157
+ const subscriptionId = "your_subscription_id";
158
+ const resourceGroupName = "your_resource_group_name";
159
+ const workspaceName = "your_quantum_workspace_name";
160
+ const storageContainerName = "containername";
161
+ const location = "westus";
162
+ const endpoint = `https://${location}.quantum.azure.com`;
163
+
164
+ const quantumJobClient = new QuantumJobClient(
165
+ credential,
166
+ subscriptionId,
167
+ resourceGroupName,
168
+ workspaceName,
169
+ {
170
+ endpoint: endpoint,
171
+ credentialScopes: "https://quantum.microsoft.com/.default",
172
+ },
173
+ );
174
+
175
+ // Get input data blob Uri with SAS key
176
+ const blobName = "myjobinput.bc";
177
+ const inputDataUri = (
178
+ await quantumJobClient.storage.sasUri({
179
+ containerName: storageContainerName,
180
+ blobName: blobName,
181
+ })
182
+ ).sasUri;
183
+
184
+ // Upload input data to blob
185
+ const blobClient = new BlockBlobClient(inputDataUri);
186
+ const problemFilename = "BellState.bc";
187
+ const fileContent = readFileSync(problemFilename, "utf8");
188
+ const blobOptions = {
189
+ blobHTTPHeaders: {
190
+ blobContentType: "qir.v1",
191
+ },
192
+ };
193
+ await blobClient.upload(fileContent, Buffer.byteLength(fileContent), blobOptions);
121
194
  ```
122
195
 
123
196
  ### Create The Job
124
197
 
125
198
  Now that you've uploaded your problem definition to Azure Storage, you can use `jobs.create` to define an Azure Quantum job.
126
199
 
127
- ```Javascript Snippet
128
- const randomId = `${Math.floor(Math.random() * 10000 + 1)}`;
129
-
130
- // Submit job
131
- const jobId = `job-${randomId}`;
132
- const jobName = `jobName-${randomId}`;
133
- const inputDataFormat = "microsoft.qio.v2";
134
- const outputDataFormat = "microsoft.qio-results.v2";
135
- const providerId = "microsoft";
136
- const target = "microsoft.paralleltempering-parameterfree.cpu";
137
- const createJobDetails = {
138
- containerUri: containerUri,
139
- inputDataFormat: inputDataFormat,
140
- providerId: providerId,
141
- target: target,
142
- id: jobId,
143
- inputDataUri: inputDataUri,
144
- name: jobName,
145
- outputDataFormat: outputDataFormat
146
- };
147
- const createdJob = await quantumJobClient.jobs.create(jobId, createJobDetails);
200
+ ```ts snippet:ReadmeSampleCreateJob
201
+ import { DefaultAzureCredential } from "@azure/identity";
202
+ import { QuantumJobClient } from "@azure/quantum-jobs";
203
+
204
+ const credential = new DefaultAzureCredential();
205
+ const subscriptionId = "your_subscription_id";
206
+ const resourceGroupName = "your_resource_group_name";
207
+ const workspaceName = "your_quantum_workspace_name";
208
+ const location = "westus";
209
+ const endpoint = `https://${location}.quantum.azure.com`;
210
+
211
+ const quantumJobClient = new QuantumJobClient(
212
+ credential,
213
+ subscriptionId,
214
+ resourceGroupName,
215
+ workspaceName,
216
+ {
217
+ endpoint: endpoint,
218
+ credentialScopes: "https://quantum.microsoft.com/.default",
219
+ },
220
+ );
221
+
222
+ const randomId = `${Math.floor(Math.random() * 10000 + 1)}`;
223
+
224
+ // Submit job
225
+ const jobId = `job-${randomId}`;
226
+ const jobName = `jobName-${randomId}`;
227
+ const inputDataFormat = "qir.v1";
228
+ const outputDataFormat = "microsoft.quantum-results.v1";
229
+ const providerId = "quantinuum";
230
+ const target = "quantinuum.sim.h1-1e";
231
+ const inputParams = {
232
+ entryPoint: "ENTRYPOINT__BellState",
233
+ arguments: [],
234
+ targetCapability: "AdaptiveExecution",
235
+ };
236
+ const createJobDetails = {
237
+ containerUri: "https://<container-uri>",
238
+ inputDataFormat: inputDataFormat,
239
+ providerId: providerId,
240
+ target: target,
241
+ id: jobId,
242
+ inputDataUri: "https://<input-data-url>",
243
+ name: jobName,
244
+ outputDataFormat: outputDataFormat,
245
+ inputParams: inputParams,
246
+ };
247
+ const createdJob = await quantumJobClient.jobs.create(jobId, createJobDetails);
148
248
  ```
149
249
 
150
250
  ### Get Job
151
251
 
152
252
  `GetJob` retrieves a specific job by its id.
153
253
 
154
- ```Javascript Snippet
155
- // Get the job that we've just created based on its jobId
156
- const myJob = await quantumJobClient.jobs.get(jobId);
254
+ ```ts snippet:ReadmeSampleGetJob
255
+ import { DefaultAzureCredential } from "@azure/identity";
256
+ import { QuantumJobClient } from "@azure/quantum-jobs";
257
+
258
+ const credential = new DefaultAzureCredential();
259
+ const subscriptionId = "your_subscription_id";
260
+ const resourceGroupName = "your_resource_group_name";
261
+ const workspaceName = "your_quantum_workspace_name";
262
+ const location = "westus";
263
+ const endpoint = `https://${location}.quantum.azure.com`;
264
+
265
+ const quantumJobClient = new QuantumJobClient(
266
+ credential,
267
+ subscriptionId,
268
+ resourceGroupName,
269
+ workspaceName,
270
+ {
271
+ endpoint: endpoint,
272
+ credentialScopes: "https://quantum.microsoft.com/.default",
273
+ },
274
+ );
275
+
276
+ // Get the job that we've just created based on its jobId
277
+ const myJob = await quantumJobClient.jobs.get("job-1234");
157
278
  ```
158
279
 
159
280
  ### Get Jobs
160
281
 
161
282
  To enumerate all the jobs in the workspace, use the `jobs.list` method.
162
283
 
163
- ```Javascript Snippet
164
- let jobListResult = await quantumJobClient.jobs.list();
165
- let listOfJobs = await jobListResult.next();
166
- while (!listOfJobs.done) {
167
- let job = listOfJobs.value;
168
- console.log(` ${job.name}`);
169
- listOfJobs = await jobListResult.next();
170
- }
284
+ ```ts snippet:ReadmeSampleListJobs
285
+ import { DefaultAzureCredential } from "@azure/identity";
286
+ import { QuantumJobClient } from "@azure/quantum-jobs";
287
+
288
+ const credential = new DefaultAzureCredential();
289
+ const subscriptionId = "your_subscription_id";
290
+ const resourceGroupName = "your_resource_group_name";
291
+ const workspaceName = "your_quantum_workspace_name";
292
+ const location = "westus";
293
+ const endpoint = `https://${location}.quantum.azure.com`;
294
+
295
+ const quantumJobClient = new QuantumJobClient(
296
+ credential,
297
+ subscriptionId,
298
+ resourceGroupName,
299
+ workspaceName,
300
+ {
301
+ endpoint: endpoint,
302
+ credentialScopes: "https://quantum.microsoft.com/.default",
303
+ },
304
+ );
305
+
306
+ const jobListResult = quantumJobClient.jobs.list();
307
+ for await (const job of jobListResult) {
308
+ console.log(`Job Id: ${job.id} and Job Name: ${job.name}`);
309
+ }
171
310
  ```
172
311
 
173
312
  ## Next steps
174
313
 
175
- - Visit our [Product documentation](https://docs.microsoft.com/azure/quantum/) to learn more about Azure Quantum.
314
+ - Visit our [Product documentation](https://learn.microsoft.com/azure/quantum/) to learn more about Azure Quantum.
176
315
 
177
316
  ## Contributing
178
317
 
@@ -193,17 +332,27 @@ additional questions or comments.
193
332
 
194
333
  All Quantum Jobs service operations will throw a RequestFailedException on failure with helpful ErrorCodes. Many of these errors are recoverable.
195
334
 
335
+ ### Logging
336
+
337
+ Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
338
+
339
+ ```ts snippet:SetLogLevel
340
+ import { setLogLevel } from "@azure/logger";
341
+
342
+ setLogLevel("info");
343
+ ```
344
+
345
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
346
+
196
347
  <!-- LINKS -->
197
348
 
198
- [source]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/quantum/quantum-jobs/src
199
- [resource-groups]: https://docs.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal
200
- [workspaces]: https://docs.microsoft.com/azure/quantum/how-to-create-quantum-workspaces-with-the-azure-portal
349
+ [source]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quantum/quantum-jobs/src
350
+ [resource-groups]: https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal
351
+ [workspaces]: https://learn.microsoft.com/azure/quantum/how-to-create-quantum-workspaces-with-the-azure-portal
201
352
  [location]: https://azure.microsoft.com/global-infrastructure/services/?products=quantum
202
- [blob-storage]: https://docs.microsoft.com/azure/storage/blobs/storage-blobs-introduction
203
- [contributing]: https://github.com/Azure/azure-sdk-for-js/tree/master/CONTRIBUTING.md
353
+ [blob-storage]: https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction
354
+ [contributing]: https://github.com/Azure/azure-sdk-for-js/tree/main/CONTRIBUTING.md
204
355
  [subscriptions]: https://ms.portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade
205
- [credentials]: https://docs.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credentials
206
- [style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
356
+ [credentials]: https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credentials
357
+ [style-guide-msft]: https://learn.microsoft.com/style-guide/capitalization
207
358
  [style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide
208
-
209
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fappconfiguration%2Fapp-configuration%2FREADME.png)
@@ -0,0 +1,4 @@
1
+ export * from "./models/index.js";
2
+ export { QuantumJobClient } from "./quantumJobClient.js";
3
+ export * from "./operationsInterfaces/index.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export * from "./models/index.js";
9
+ export { QuantumJobClient } from "./quantumJobClient.js";
10
+ export * from "./operationsInterfaces/index.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,cAAc,iCAAiC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models/index.js\";\nexport { QuantumJobClient } from \"./quantumJobClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}