Skip to content

Commit

Permalink
Remove mention of credits and credit plans from notebook samples. (#656)
Browse files Browse the repository at this point in the history
Co-authored-by: Yousif Almulla <[email protected]>
  • Loading branch information
almullay and Yousif Almulla authored Feb 3, 2025
1 parent b751d2c commit 974cb53
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 50 deletions.
2 changes: 1 addition & 1 deletion samples/hello-world/HW-ionq-cirq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"source": [
"### ❕ Do you see `ionq.simulator` in your list of targets? If so, you're ready to keep going.\n",
"\n",
"Don't see it? You may need to add IonQ to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the IonQ provider. Don't worry, there's a free credits plan available."
"Don't see it? You may need to add IonQ to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the IonQ provider."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion samples/hello-world/HW-ionq-qiskit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"source": [
"### ❕ Do you see `ionq.simulator` in your list of targets? If so, you're ready to keep going.\n",
"\n",
"Don't see it? You may need to add IonQ to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the IonQ provider. Don't worry, there's a free credits plan available."
"Don't see it? You may need to add IonQ to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the IonQ provider."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion samples/hello-world/HW-ionq-qsharp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"source": [
"### ❕ Do you see `ionq.simulator` in your list of targets? If so, you're ready to keep going.\n",
"\n",
"Don't see it? You may need to add IonQ to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the IonQ provider. Don't worry, there's a free credits plan available."
"Don't see it? You may need to add IonQ to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the IonQ provider."
]
},
{
Expand Down
86 changes: 47 additions & 39 deletions samples/hello-world/HW-pasqal-pulser.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
"cells": [
{
"cell_type": "markdown",
"id": "8493267a95ed8cbd",
"metadata": {},
"source": [
"# 👋🌍 Hello, world: Submit a Pulser job to Pasqal\n",
"\n",
"In this notebook, we'll review the basics of Azure Quantum by submitting a simple *job*, or quantum program, to [Pasqal](https://pasqal.com/). We will use [Pulser](https://pulser.readthedocs.io/) to define a quantum job that can run on Pasqal's hardware."
],
"id": "8493267a95ed8cbd"
]
},
{
"cell_type": "markdown",
"id": "808523d9ed21b01b",
"metadata": {
"nteract": {
"transient": {
Expand All @@ -24,24 +25,26 @@
"Azure Quantum provides several ways to express quantum programs. In this example we are using Pulser, the quantum computing library of Pasqal to program arrays of neutral atoms. All code in this example will be written in Python.\n",
"\n",
"Let's begin. When you see a code block, hover over it and click the triangle play-button to execute it. To avoid any compilation issues, this should be done in order from top to bottom."
],
"id": "808523d9ed21b01b"
]
},
{
"cell_type": "markdown",
"id": "658fc276abc991eb",
"metadata": {
"nteract": {
"transient": {
"deleting": false
}
}
},
"source": "### 1. Connect to the Azure Quantum workspace\n",
"id": "658fc276abc991eb"
"source": [
"### 1. Connect to the Azure Quantum workspace\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4f3047eec84a00af",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -53,24 +56,26 @@
" resource_id = \"\",\n",
" location = \"\",\n",
")"
],
"id": "4f3047eec84a00af"
]
},
{
"cell_type": "markdown",
"id": "d3ad6d0abf4de566",
"metadata": {
"nteract": {
"transient": {
"deleting": false
}
}
},
"source": "Let's see whether the Pasqal provider is enabled in this workspace with the following command:\n",
"id": "d3ad6d0abf4de566"
"source": [
"Let's see whether the Pasqal provider is enabled in this workspace with the following command:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "95dbec7c0e4f59df",
"metadata": {
"jupyter": {
"outputs_hidden": false,
Expand All @@ -87,11 +92,11 @@
"print(\"This workspace's targets:\")\n",
"for target in workspace.get_targets():\n",
" print(\"-\", target.name)"
],
"id": "95dbec7c0e4f59df"
]
},
{
"cell_type": "markdown",
"id": "64dc34808344e811",
"metadata": {
"nteract": {
"transient": {
Expand All @@ -102,12 +107,12 @@
"source": [
"### ❕ Do you see pasqal.sim.emu-tn in your list of targets? If so, you're ready to keep going.\n",
"\n",
"Don't see it? You may need to add Pasqal to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Pasqal provider. Don't worry, there's a free credits plan available."
],
"id": "64dc34808344e811"
"Don't see it? You may need to add Pasqal to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Pasqal provider."
]
},
{
"cell_type": "markdown",
"id": "32fb070cacaba76d",
"metadata": {
"nteract": {
"transient": {
Expand All @@ -125,24 +130,24 @@
"| Fresnel1 | `pasqal.qpu.fresnel` | 100 qubits | PASQAL's neutral atoms quantum computer. |\n",
"\n",
"For this example, we will use `pasqal.sim.emu-tn`. To learn more about Pasqal's targets, check out our [documentation](https://learn.microsoft.com/azure/quantum/provider-pasqal)."
],
"id": "32fb070cacaba76d"
]
},
{
"cell_type": "markdown",
"id": "a58addf868b244dd",
"metadata": {},
"source": [
"### 2. Build the quantum program\n",
"\n",
"Let's create a simple Pulser Sequence to run on an array of neutral atoms (a Register)."
],
"id": "a58addf868b244dd"
]
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"id": "9681bbcd96eee008",
"metadata": {},
"outputs": [],
"source": [
"import math\n",
"import pulser\n",
Expand All @@ -165,11 +170,11 @@
"seq.measure()\n",
"\n",
"seq.draw()"
],
"id": "9681bbcd96eee008"
]
},
{
"cell_type": "markdown",
"id": "c3d23fc53155e243",
"metadata": {
"nteract": {
"transient": {
Expand All @@ -181,18 +186,20 @@
"Each pulse acts on a set of atoms at a certain moment of time. The entire `Sequence` is stored by Pulser and can then be either simulated or sent to a real device.\n",
"\n",
"We've just built a sequence sending the same π-pulse to two atoms, sequentially, using the same channel. With Pasqal's idealized simulator, we will be able to simulate the quantum evolution of both atoms over time."
],
"id": "c3d23fc53155e243"
]
},
{
"cell_type": "markdown",
"id": "95f8578dfb2660f4",
"metadata": {},
"source": "### 3. Submit the quantum program to Pasqal",
"id": "95f8578dfb2660f4"
"source": [
"### 3. Submit the quantum program to Pasqal"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ed2e79aac388baa9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -209,11 +216,11 @@
"\n",
"# Print the job ID.\n",
"print(\"Job id:\", job.id)"
],
"id": "ed2e79aac388baa9"
]
},
{
"cell_type": "markdown",
"id": "bb4c8c91778444da",
"metadata": {
"nteract": {
"transient": {
Expand All @@ -223,11 +230,11 @@
},
"source": [
"The job ID can be used to retrieve the results later using the [get_job method](https://learn.microsoft.com/python/azure-quantum/azure.quantum.workspace?#azure-quantum-workspace-get-job) or by viewing it under the **Job management** section of the portal."
],
"id": "bb4c8c91778444da"
]
},
{
"cell_type": "markdown",
"id": "f2111a90ca2d482a",
"metadata": {
"nteract": {
"transient": {
Expand All @@ -238,12 +245,12 @@
"source": [
"### 4. Obtain the job results\n",
"Let's await the job execution by calling `job.get_results()`. This may take a minute or so ⏳. Your job is being packaged and sent to Pasqal, where it will wait its turn to be run."
],
"id": "f2111a90ca2d482a"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4bf1813d0e966f42",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -254,23 +261,25 @@
"# To view each measured qubit state, you can print the result.\n",
"print(\"Job finished. Measure count for each state:\")\n",
"print(result)"
],
"id": "4bf1813d0e966f42"
]
},
{
"cell_type": "markdown",
"id": "a13268e76598db7b",
"metadata": {
"nteract": {
"transient": {
"deleting": false
}
}
},
"source": "**See the result above? Congratulations, you've submitted a Pasqal job with Azure Quantum! 👏**",
"id": "a13268e76598db7b"
"source": [
"**See the result above? Congratulations, you've submitted a Pasqal job with Azure Quantum! 👏**"
]
},
{
"cell_type": "markdown",
"id": "2e02e1b62a75939e",
"metadata": {
"nteract": {
"transient": {
Expand All @@ -285,8 +294,7 @@
"To learn more about submitting Pulser sequences to Azure Quantum, review [this documentation](https://learn.microsoft.com/en-us/azure/quantum/quickstart-microsoft-provider-format?tabs=tabid-portal%2Ctabid-pyquil#submit-a-circuit-to-pasqal-using-pulser-sdk).\n",
"\n",
"To learn more about job pricing, review the [Azure Quantum documentation on job costs](https://learn.microsoft.com/en-us/azure/quantum/pricing#pasqal)."
],
"id": "2e02e1b62a75939e"
]
}
],
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions samples/hello-world/HW-quantinuum-cirq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"source": [
"### ❕ Do you see `quantinuum.sim.h1-1sc` in your list of targets? If so, you're ready to keep going.\n",
"\n",
"Don't see it? You may need to add Quantinuum to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Quantinuum provider. Don't worry, there's a free credits plan available.\n",
"Don't see it? You may need to add Quantinuum to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Quantinuum provider.\n",
"\n",
"## Quantinuum: The quantum provider\n",
"Azure Quantum partners with third-party companies to deliver solutions to quantum jobs. These company offerings are called *providers*. Each provider can offer multiple *targets* with different capabilities. See the table below for Quantinuum's H1-1 device targets.\n",
Expand All @@ -130,7 +130,7 @@
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
"\n",
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs or credit usage. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions samples/hello-world/HW-quantinuum-qiskit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"source": [
"### ❕ Do you see `quantinuum.sim.h1-1sc` in your list of targets? If so, you're ready to keep going.\n",
"\n",
"Don't see it? You may need to add Quantinuum to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Quantinuum provider. Don't worry, there's a free credits plan available.\n",
"Don't see it? You may need to add Quantinuum to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Quantinuum provider.\n",
"\n",
"## Quantinuum: The quantum provider\n",
"Azure Quantum partners with third-party companies to deliver solutions to quantum jobs. These company offerings are called *providers*. Each provider can offer multiple *targets* with different capabilities. See the table below for Quantinuum's H1-1 device targets.\n",
Expand All @@ -127,7 +127,7 @@
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
"\n",
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs or credit usage. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions samples/hello-world/HW-quantinuum-qsharp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"source": [
"### ❕ Do you see `quantinuum.sim.h1-1sc` in your list of targets? If so, you're ready to keep going.\n",
"\n",
"Don't see it? You may need to add Quantinuum to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Quantinuum provider. Don't worry, there's a free credits plan available.\n",
"Don't see it? You may need to add Quantinuum to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Quantinuum provider.\n",
"\n",
"## Quantinuum: The quantum provider\n",
"Azure Quantum partners with third-party companies to deliver solutions to quantum jobs. These company offerings are called *providers*. Each provider can offer multiple *targets* with different capabilities. See the table below for Quantinuum's H1-1 device targets.\n",
Expand All @@ -131,7 +131,7 @@
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
"\n",
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs or credit usage. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions samples/vqe/VQE-qiskit-hydrogen-session.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@
"#### IMPORTANT NOTES !!\n",
"\n",
"1. This cell will take about 20 minutes to run on the IonQ simulator for max_iter=50. It generates around 300 jobs. The time can vary depending on the backend queue times. Running with max_iter=50 may not be sufficient for the results to converge. You could consider increasing the number of iterations to 100 to give a more accurate result, but please be aware of the increased running times for the cell.\n",
"1. If you are an Azure Quantum credits user, you may not have enough credits to run this sample on certain backends.\n",
"1. **If you run this against a QPU hardware backend instead of a simulator, you will likely incur a large cost or consume a large number of your alloted credits.**\n",
"1. **If you run this against a QPU hardware backend instead of a simulator, you will likely incur a large cost.**\n",
"1. You may lose results if you lose network connectivity while the cell is running. It may be better to download the notebook and run it locally for better reliability.\n",
"1. If the `calc.solve` fails, one or more jobs may have failed. If so, you can find the session under `Job management` in your workspace, click on it to open the Session view and then click on a Job that failed to find the reason for failure.\n",
"\n"
Expand Down

0 comments on commit 974cb53

Please sign in to comment.