Skip to content

Commit

Permalink
feature: remove Aspen-M-3, replace with Ankaa-2 (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkomar-aws authored Sep 27, 2024
1 parent 6e77bd1 commit 8ec1aaf
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 73 deletions.
16 changes: 8 additions & 8 deletions notebooks/textbook/Quantum_Phase_Estimation_Algorithm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
],
"source": [
"# define device and run quantum phase estimation\n",
"# managed_device = AwsDevice('arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3')\n",
"# managed_device = AwsDevice('arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2')\n",
"managed_device = AwsDevice('arn:aws:braket:::device/quantum-simulator/amazon/sv1')\n",
"print('Quantum Phase Estimation Running')\n",
"task = run_quantum_phase_estimation(quantum_phase_estimation_circ, managed_device, shots=1000)\n",
Expand All @@ -269,8 +269,8 @@
"output_type": "stream",
"text": [
"Task Summary\n",
"{'arn:aws:braket:::device/quantum-simulator/amazon/sv1': {'shots': 1000, 'tasks': {'COMPLETED': 1}, 'execution_duration': datetime.timedelta(microseconds=5000), 'billed_execution_duration': datetime.timedelta(seconds=3)}} \n",
"\n",
"{'arn:aws:braket:::device/quantum-simulator/amazon/sv1': {'shots': 1000, 'tasks': {'COMPLETED': 1}, 'execution_duration': datetime.timedelta(microseconds=5000), 'billed_execution_duration': datetime.timedelta(seconds=3)}} \n",
"\n",
"Estimated cost to run this example: 0.00 USD\n"
]
}
Expand All @@ -282,11 +282,11 @@
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note: Charges shown are estimates based on your Amazon Braket simulator and quantum processing unit (QPU) task usage. Estimated charges shown may differ from your actual charges. Estimated charges do not factor in any discounts or credits, and you may experience additional charges based on your use of other services such as Amazon Elastic Compute Cloud (Amazon EC2)."
]
"cell_type": "markdown",
"metadata": {},
"source": [
"Note: Charges shown are estimates based on your Amazon Braket simulator and quantum processing unit (QPU) task usage. Estimated charges shown may differ from your actual charges. Estimated charges do not factor in any discounts or credits, and you may experience additional charges based on your use of other services such as Amazon Elastic Compute Cloud (Amazon EC2)."
]
}
],
"metadata": {
Expand Down
48 changes: 25 additions & 23 deletions notebooks/textbook/Quantum_Walk.ipynb

Large diffs are not rendered by default.

83 changes: 46 additions & 37 deletions notebooks/textbook/Simons_Algorithm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,29 +84,38 @@
"name": "stdout",
"output_type": "stream",
"text": [
"T : |0| 1 |2|3|\n",
" \n",
"q0 : -H-C---------H---\n",
" | \n",
"q1 : -H-|-C-------H---\n",
" | | \n",
"q2 : -H-|-|-C-----H---\n",
" | | | \n",
"q3 : -H-|-|-|-C---H---\n",
" | | | | \n",
"q4 : -H-|-|-|-|-C-C-H-\n",
" | | | | | | \n",
"q5 : ---X-|-|-|-|-|---\n",
" | | | | | \n",
"q6 : -----X-|-|-|-|---\n",
" | | | | \n",
"q7 : -------X-|-|-|---\n",
" | | | \n",
"q8 : ---------X-|-|---\n",
" | | \n",
"q9 : -----------X-X---\n",
"\n",
"T : |0| 1 |2|3|\n"
"T : │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │\n",
" ┌───┐ ┌───┐ \n",
"q0 : ─┤ H ├───●───────────────────────────┤ H ├─────────────────────────\n",
" └───┘ │ └───┘ \n",
" ┌───┐ │ ┌───┐ \n",
"q1 : ─┤ H ├───┼─────●─────────────────────┤ H ├─────────────────────────\n",
" └───┘ │ │ └───┘ \n",
" ┌───┐ │ │ ┌───┐ \n",
"q2 : ─┤ H ├───┼─────┼─────●─────────────────●───────────●─────●───┤ H ├─\n",
" └───┘ │ │ │ │ │ │ └───┘ \n",
" ┌───┐ │ │ │ │ ┌───┐ │ │ \n",
"q3 : ─┤ H ├───┼─────┼─────┼─────●───────────┼───┤ H ├───┼─────┼─────────\n",
" └───┘ │ │ │ │ │ └───┘ │ │ \n",
" ┌───┐ │ │ │ │ │ ┌───┐ │ │ \n",
"q4 : ─┤ H ├───┼─────┼─────┼─────┼─────●─────┼───┤ H ├───┼─────┼─────────\n",
" └───┘ │ │ │ │ │ │ └───┘ │ │ \n",
" ┌─┴─┐ │ │ │ │ │ │ │ \n",
"q5 : ───────┤ X ├───┼─────┼─────┼─────┼─────┼───────────┼─────┼─────────\n",
" └───┘ │ │ │ │ │ │ │ \n",
" ┌─┴─┐ │ │ │ │ │ │ \n",
"q6 : ─────────────┤ X ├───┼─────┼─────┼─────┼───────────┼─────┼─────────\n",
" └───┘ │ │ │ │ │ │ \n",
" ┌─┴─┐ │ │ ┌─┴─┐ │ │ \n",
"q7 : ───────────────────┤ X ├───┼─────┼───┤ X ├─────────┼─────┼─────────\n",
" └───┘ │ │ └───┘ │ │ \n",
" ┌─┴─┐ │ ┌─┴─┐ │ \n",
"q8 : ─────────────────────────┤ X ├───┼───────────────┤ X ├───┼─────────\n",
" └───┘ │ └───┘ │ \n",
" ┌─┴─┐ ┌─┴─┐ \n",
"q9 : ───────────────────────────────┤ X ├───────────────────┤ X ├───────\n",
" └───┘ └───┘ \n",
"T : │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │\n"
]
}
],
Expand Down Expand Up @@ -134,8 +143,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Result string: 00001\n",
"Secret string 00001\n"
"Result string: 00111\n",
"Secret string 00111\n"
]
}
],
Expand All @@ -150,40 +159,40 @@
"source": [
"# Run on a QPU\n",
"\n",
"Here we run Simon's algorithm on the Rigetti Aspen M-3 device."
"Here we run Simon's algorithm on the Rigetti Ankaa-2 device."
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"aspen_m = AwsDevice(\"arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3\")"
"ankaa = AwsDevice(\"arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2\")"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# run this block to submit the circuit to QPU\n",
"\n",
"task = run_simons_algorithm(oracle, aspen_m)"
"task = run_simons_algorithm(oracle, ankaa)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Result string: 00001\n",
"Secret string 00001\n"
"Result string: 00000\n",
"Secret string 00111\n"
]
}
],
Expand All @@ -196,17 +205,17 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Task Summary\n",
"{'arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3': {'shots': 20, 'tasks': {'COMPLETED': 1}}} \n",
"{'arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2': {'shots': 20, 'tasks': {'COMPLETED': 1}}} \n",
"\n",
"Estimated cost to run this example: 0.31 USD\n"
"Estimated cost to run this example: 0.32 USD\n"
]
}
],
Expand Down Expand Up @@ -240,7 +249,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.10.10"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion test/integ_tests/textbook/0_quantum_walk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@
},
"id": "arn:aws:braket:us-west-1:000000000000:quantum-task/b04a38fa-1517-48e7-a674-edab912dda0a",
"shots": 1000,
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3",
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2",
"deviceParameters": {
"braketSchemaHeader": {
"name": "braket.device_schema.rigetti.rigetti_device_parameters",
Expand Down
2 changes: 1 addition & 1 deletion test/integ_tests/textbook/1_quantum_walk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@
},
"id": "arn:aws:braket:us-west-1:000000000000:quantum-task/b3f1c380-a889-4bd2-aab0-7f20637dba00",
"shots": 1000,
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3",
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2",
"deviceParameters": {
"braketSchemaHeader": {
"name": "braket.device_schema.rigetti.rigetti_device_parameters",
Expand Down
2 changes: 1 addition & 1 deletion test/integ_tests/textbook/2_quantum_walk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@
},
"id": "arn:aws:braket:us-west-1:000000000000:quantum-task/3529e57e-9dee-4807-8734-86ca1ee27317",
"shots": 1000,
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3",
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2",
"deviceParameters": {
"braketSchemaHeader": {
"name": "braket.device_schema.rigetti.rigetti_device_parameters",
Expand Down
2 changes: 1 addition & 1 deletion test/integ_tests/textbook/3_quantum_walk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@
},
"id": "arn:aws:braket:us-west-1:000000000000:quantum-task/b17a19b9-2bff-4bed-b188-602eacc9dfe0",
"shots": 1000,
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3",
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2",
"deviceParameters": {
"braketSchemaHeader": {
"name": "braket.device_schema.rigetti.rigetti_device_parameters",
Expand Down
2 changes: 1 addition & 1 deletion test/integ_tests/textbook/simons_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
},
"id": "arn:aws:braket:us-west-1:000000000000:quantum-task/ed30928d-08d0-4eb9-92d5-20a62d4e8c6a",
"shots": 20,
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3",
"deviceId": "arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2",
"deviceParameters": {
"braketSchemaHeader": {
"name": "braket.device_schema.rigetti.rigetti_device_parameters",
Expand Down

0 comments on commit 8ec1aaf

Please sign in to comment.