You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package of @azure/arm-quantum is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
-[LTS versions of Node.js](https://nodejs.org/about/releases/)
17
+
- Latest versions of Safari, Chrome, Edge and Firefox.
18
+
19
+
### Prerequisites
20
+
21
+
- An [Azure subscription][azure_sub].
22
+
23
+
### Install the `@azure/arm-quantum` package
24
+
25
+
Install the Azure Quantum Management client library for JavaScript with `npm`:
26
+
27
+
```bash
28
+
npm install @azure/arm-quantum
29
+
```
30
+
31
+
### Create and authenticate a `AzureQuantumManagementClient`
32
+
33
+
To create a client object to access the Azure Quantum Management API, you will need the `endpoint` of your Azure Quantum Management resource and a `credential`. The Azure Quantum Management client can use Azure Active Directory credentials to authenticate.
34
+
You can find the endpoint for your Azure Quantum Management resource in the [Azure Portal][azure_portal].
35
+
36
+
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
37
+
38
+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
39
+
40
+
```bash
41
+
npm install @azure/identity
42
+
```
43
+
44
+
You will also need to **register a new AAD application and grant access to Azure Quantum Management** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
45
+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
46
+
47
+
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
59
+
60
+
## Key concepts
61
+
62
+
### AzureQuantumManagementClient
63
+
64
+
`AzureQuantumManagementClient` is the primary interface for developers using the Azure Quantum Management client library. Explore the methods on this client object to understand the different features of the Azure Quantum Management service that you can access.
65
+
66
+
## Troubleshooting
67
+
68
+
### Logging
69
+
70
+
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`:
71
+
72
+
```javascript
73
+
const { setLogLevel } =require("@azure/logger");
74
+
setLogLevel("info");
75
+
```
76
+
77
+
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).
78
+
79
+
## Next steps
80
+
81
+
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
82
+
83
+
## Contributing
84
+
85
+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
86
+
87
+
## Related projects
88
+
89
+
-[Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
0 commit comments