Skip to content

Commit

Permalink
deprecation: IonQ Harmony (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
speller26 authored Sep 6, 2024
1 parent ef40edb commit 89b1ba3
Show file tree
Hide file tree
Showing 20 changed files with 1,612 additions and 1,712 deletions.
217 changes: 107 additions & 110 deletions examples/advanced_circuits_algorithms/Grover/Grover.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:00.351045Z",
Expand Down Expand Up @@ -94,7 +94,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:06.520777Z",
Expand All @@ -104,10 +104,10 @@
"outputs": [],
"source": [
"# set up Rigetti quantum device\n",
"rigetti = AwsDevice(Devices.Rigetti.AspenM3)\n",
"rigetti = AwsDevice(Devices.Rigetti.Ankaa2)\n",
"\n",
"# set up IonQ quantum device\n",
"ionq = AwsDevice(Devices.IonQ.Harmony)\n",
"ionq = AwsDevice(Devices.IonQ.Aria1)\n",
"\n",
"# set up IQM quantum device\n",
"ionq = AwsDevice(Devices.IQM.Garnet)\n",
Expand Down Expand Up @@ -138,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:08.544420Z",
Expand All @@ -150,19 +150,23 @@
"name": "stdout",
"output_type": "stream",
"text": [
"T : |0|\n",
" \n",
"q0 : -H-\n",
" \n",
"q1 : -H-\n",
" \n",
"q2 : -H-\n",
" \n",
"q3 : -H-\n",
" \n",
"q4 : -H-\n",
"\n",
"T : |0|\n"
"T : │ 0 │\n",
" ┌───┐ \n",
"q0 : ─┤ H ├─\n",
" └───┘ \n",
" ┌───┐ \n",
"q1 : ─┤ H ├─\n",
" └───┘ \n",
" ┌───┐ \n",
"q2 : ─┤ H ├─\n",
" └───┘ \n",
" ┌───┐ \n",
"q3 : ─┤ H ├─\n",
" └───┘ \n",
" ┌───┐ \n",
"q4 : ─┤ H ├─\n",
" └───┘ \n",
"T : │ 0 │\n"
]
}
],
Expand Down Expand Up @@ -202,7 +206,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:10.235692Z",
Expand All @@ -214,7 +218,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"The output bit string is: ['01011']\n"
"The output bit string is: ['01101']\n"
]
}
],
Expand Down Expand Up @@ -321,7 +325,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:12.002044Z",
Expand All @@ -339,7 +343,7 @@
"Min-entropy rate of second source: 0.8\n",
"Required length of each input source: 103 bits.\n",
"The 10 random output bits are:\n",
"[[1 0 0 1 1 1 1 0 1 1]].\n"
"[[1 0 0 0 1 1 1 0 1 0]].\n"
]
}
],
Expand Down Expand Up @@ -494,7 +498,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:14.333898Z",
Expand All @@ -508,29 +512,30 @@
"text": [
"===============================================================================\n",
" CVXPY \n",
" v1.3.2 \n",
" v1.5.3 \n",
"===============================================================================\n",
"(CVXPY) Aug 29 02:34:13 PM: Your problem has 16 variables, 3 constraints, and 0 parameters.\n",
"(CVXPY) Aug 29 02:34:13 PM: It is compliant with the following grammars: DCP, DQCP\n",
"(CVXPY) Aug 29 02:34:13 PM: (If you need to solve this problem multiple times, but with different data, consider using parameters.)\n",
"(CVXPY) Aug 29 02:34:13 PM: CVXPY will first compile your problem; then, it will invoke a numerical solver to obtain a solution.\n",
"(CVXPY) Sep 06 02:52:47 PM: Your problem has 16 variables, 48 constraints, and 0 parameters.\n",
"(CVXPY) Sep 06 02:52:47 PM: It is compliant with the following grammars: DCP, DQCP\n",
"(CVXPY) Sep 06 02:52:47 PM: (If you need to solve this problem multiple times, but with different data, consider using parameters.)\n",
"(CVXPY) Sep 06 02:52:47 PM: CVXPY will first compile your problem; then, it will invoke a numerical solver to obtain a solution.\n",
"(CVXPY) Sep 06 02:52:47 PM: Your problem is compiled with the CPP canonicalization backend.\n",
"-------------------------------------------------------------------------------\n",
" Compilation \n",
"-------------------------------------------------------------------------------\n",
"(CVXPY) Aug 29 02:34:13 PM: Compiling problem (target solver=SCS).\n",
"(CVXPY) Aug 29 02:34:13 PM: Reduction chain: Complex2Real -> Dcp2Cone -> CvxAttr2Constr -> ConeMatrixStuffing -> SCS\n",
"(CVXPY) Aug 29 02:34:13 PM: Applying reduction Complex2Real\n",
"(CVXPY) Aug 29 02:34:13 PM: Applying reduction Dcp2Cone\n",
"(CVXPY) Aug 29 02:34:13 PM: Applying reduction CvxAttr2Constr\n",
"(CVXPY) Aug 29 02:34:13 PM: Applying reduction ConeMatrixStuffing\n",
"(CVXPY) Aug 29 02:34:13 PM: Applying reduction SCS\n",
"(CVXPY) Aug 29 02:34:13 PM: Finished problem compilation (took 3.600e-02 seconds).\n",
"(CVXPY) Sep 06 02:52:47 PM: Compiling problem (target solver=SCS).\n",
"(CVXPY) Sep 06 02:52:47 PM: Reduction chain: Complex2Real -> Dcp2Cone -> CvxAttr2Constr -> ConeMatrixStuffing -> SCS\n",
"(CVXPY) Sep 06 02:52:47 PM: Applying reduction Complex2Real\n",
"(CVXPY) Sep 06 02:52:47 PM: Applying reduction Dcp2Cone\n",
"(CVXPY) Sep 06 02:52:47 PM: Applying reduction CvxAttr2Constr\n",
"(CVXPY) Sep 06 02:52:47 PM: Applying reduction ConeMatrixStuffing\n",
"(CVXPY) Sep 06 02:52:47 PM: Applying reduction SCS\n",
"(CVXPY) Sep 06 02:52:47 PM: Finished problem compilation (took 1.863e-02 seconds).\n",
"-------------------------------------------------------------------------------\n",
" Numerical solver \n",
"-------------------------------------------------------------------------------\n",
"(CVXPY) Aug 29 02:34:13 PM: Invoking solver SCS to obtain a solution.\n",
"(CVXPY) Sep 06 02:52:47 PM: Invoking solver SCS to obtain a solution.\n",
"------------------------------------------------------------------\n",
"\t SCS v3.2.3 - Splitting Conic Solver\n",
"\t SCS v3.2.7 - Splitting Conic Solver\n",
"\t(c) Brendan O'Donoghue, Stanford University, 2012\n",
"------------------------------------------------------------------\n",
"problem: variables n: 32, constraints m: 108\n",
Expand All @@ -544,24 +549,24 @@
"------------------------------------------------------------------\n",
" iter | pri res | dua res | gap | obj | scale | time (s)\n",
"------------------------------------------------------------------\n",
" 0| 3.89e+00 1.00e+00 1.56e+01 -7.07e+00 1.00e-01 5.17e-03 \n",
" 250| 9.44e-05 2.51e-05 1.63e-05 6.07e-01 8.20e+00 3.18e-01 \n",
" 375| 2.45e-07 1.99e-05 1.38e-07 6.08e-01 2.59e+01 4.61e-01 \n",
" 0| 3.89e+00 1.00e+00 1.56e+01 -7.07e+00 1.00e-01 3.33e-03 \n",
" 250| 9.44e-05 2.51e-05 1.63e-05 6.07e-01 8.20e+00 5.40e-03 \n",
" 375| 2.45e-07 1.99e-05 1.38e-07 6.08e-01 2.59e+01 6.46e-03 \n",
"------------------------------------------------------------------\n",
"status: solved\n",
"timings: total: 4.61e-01s = setup: 1.72e-03s + solve: 4.59e-01s\n",
"\t lin-sys: 1.62e-03s, cones: 4.55e-01s, accel: 1.00e-04s\n",
"timings: total: 6.46e-03s = setup: 1.19e-03s + solve: 5.28e-03s\n",
"\t lin-sys: 5.24e-04s, cones: 4.48e-03s, accel: 2.16e-05s\n",
"------------------------------------------------------------------\n",
"objective = 0.607508\n",
"------------------------------------------------------------------\n",
"-------------------------------------------------------------------------------\n",
" Summary \n",
"-------------------------------------------------------------------------------\n",
"(CVXPY) Aug 29 02:34:14 PM: Problem status: optimal\n",
"(CVXPY) Aug 29 02:34:14 PM: Optimal value: 6.075e-01\n",
"(CVXPY) Aug 29 02:34:14 PM: Compilation took 3.600e-02 seconds\n",
"(CVXPY) Aug 29 02:34:14 PM: Solver (including time spent in interface) took 4.619e-01 seconds\n",
"\u001b[1mThe coditional min-entropy is: 0.7190235372097491\n",
"(CVXPY) Sep 06 02:52:47 PM: Problem status: optimal\n",
"(CVXPY) Sep 06 02:52:47 PM: Optimal value: 6.075e-01\n",
"(CVXPY) Sep 06 02:52:47 PM: Compilation took 1.863e-02 seconds\n",
"(CVXPY) Sep 06 02:52:47 PM: Solver (including time spent in interface) took 6.753e-03 seconds\n",
"\u001b[1mThe coditional min-entropy is: 0.7190235372097399\n",
"As a comparison, the unconditional min-entropy is: 0.9439714610772487\n"
]
}
Expand Down Expand Up @@ -650,7 +655,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:16.379045Z",
Expand Down Expand Up @@ -703,7 +708,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:22.584748Z",
Expand All @@ -715,8 +720,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Status of Rigetti task: CREATED\n",
"Status of IonQ task: CREATED\n"
"Status of Rigetti task: QUEUED\n",
"Status of IonQ task: QUEUED\n"
]
}
],
Expand Down Expand Up @@ -773,7 +778,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 10,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:23.471216Z",
Expand All @@ -785,9 +790,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Status of Rigetti task: CREATED\n",
"Sorry, your Rigetti quantum task is still being processed and has not been finalized yet.\n",
"Status of IonQ quantum task: CREATED\n",
"Status of Rigetti task: COMPLETED\n",
"The first raw bit string is: [[0 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 1 0\n",
" 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 1 1 0 0 1\n",
" 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1\n",
" 1 1 1 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 1 0 1 1 0]]\n",
"Status of IonQ quantum task: QUEUED\n",
"Sorry, your IonQ quantum task is still being processed and has not been finalized yet.\n"
]
}
Expand Down Expand Up @@ -854,7 +862,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 11,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:23.483829Z",
Expand All @@ -866,7 +874,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Your IonQ quantum task is in CREATED state.\n"
"Your IonQ quantum task is in QUEUED state.\n"
]
}
],
Expand Down Expand Up @@ -929,7 +937,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 12,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-29T21:34:23.950740Z",
Expand All @@ -942,9 +950,9 @@
"output_type": "stream",
"text": [
"Quantum Task Summary\n",
"{'arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3': {'shots': 141, 'tasks': {'CREATED': 1}}, 'arn:aws:braket:us-east-1::device/qpu/ionq/Harmony': {'shots': 141, 'tasks': {'CREATED': 1}}}\n",
"{<_Rigetti.Ankaa2: 'arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2'>: {'shots': 141, 'tasks': {'COMPLETED': 1}}, <_IQM.Garnet: 'arn:aws:braket:eu-north-1::device/qpu/iqm/Garnet'>: {'shots': 141, 'tasks': {'QUEUED': 1}}}\n",
"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).\n",
"Estimated cost to run this example: 2.06 USD\n"
"Estimated cost to run this example: 0.93 USD\n"
]
}
],
Expand Down
Loading

0 comments on commit 89b1ba3

Please sign in to comment.