Skip to content

Commit 084f53e

Browse files
authoredFeb 21, 2025··
Add Ankaa 3 (#683)
1 parent f640d8e commit 084f53e

File tree

34 files changed

+5343
-1627
lines changed

34 files changed

+5343
-1627
lines changed
 

‎examples/advanced_circuits_algorithms/Randomness/Randomness_Generation.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
},
9595
{
9696
"cell_type": "code",
97-
"execution_count": 3,
97+
"execution_count": null,
9898
"metadata": {
9999
"ExecuteTime": {
100100
"end_time": "2023-08-29T21:34:06.520777Z",
@@ -104,7 +104,7 @@
104104
"outputs": [],
105105
"source": [
106106
"# set up Rigetti quantum device\n",
107-
"rigetti = AwsDevice(Devices.Rigetti._Ankaa2)\n",
107+
"rigetti = AwsDevice(Devices.Rigetti.Ankaa3)\n",
108108
"\n",
109109
"# set up IonQ quantum device\n",
110110
"ionq = AwsDevice(Devices.IonQ.Aria1)\n",

‎examples/braket_features/Allocating_Qubits_on_QPU_Devices.ipynb

+79-75
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"\n",
2828
"When you submit a circuit for execution on a QPU, Amazon Braket performs a series of compilation steps: it maps the _abstract qubits_ in your circuit to _physical qubits_ in the device; it synthesizes gates into the native gate set of the device; it optimizes the circuit to reduce the number of gates; and finally, it translates the gates into executable pulses.\n",
2929
"\n",
30-
"This section shows how the first step, called qubit allocation, works for the Rigetti Ankaa-2 device."
30+
"This section shows how the first step, called qubit allocation, works for the Rigetti Ankaa-3 device."
3131
]
3232
},
3333
{
@@ -60,7 +60,7 @@
6060
"\n",
6161
"The example that follows shows how to create a GHZ state on qubits that are not physically connected. After the quantum task is completed, you can obtain a list of the actual gates executed on the device, by viewing the result metadata.\n",
6262
"\n",
63-
"First, instantiate the Rigetti Ankaa-2 device and retrieve its connectivity graph, which shows the qubits that are directly connected on the chip."
63+
"First, instantiate the Rigetti Ankaa-3 device and retrieve its connectivity graph, which shows the qubits that are directly connected on the chip."
6464
]
6565
},
6666
{
@@ -76,12 +76,12 @@
7676
"name": "stdout",
7777
"output_type": "stream",
7878
"text": [
79-
"the connectivity of Ankaa-2 is: {'0': ['1', '7'], '1': ['0', '2', '8'], '2': ['1', '3', '9'], '3': ['2', '4', '10'], '4': ['3', '5', '11'], '5': ['4', '6', '12'], '6': ['5', '13'], '7': ['0', '8', '14'], '8': ['1', '7', '9', '15'], '9': ['2', '8', '10', '16'], '10': ['3', '9', '11', '17'], '11': ['4', '10', '12', '18'], '12': ['5', '11', '13', '19'], '13': ['6', '12', '20'], '14': ['7', '15', '21'], '15': ['8', '14', '22'], '16': ['9', '17', '23'], '17': ['10', '16', '18', '24'], '18': ['11', '17', '19', '25'], '19': ['12', '18', '20', '26'], '20': ['13', '19', '27'], '21': ['14', '22', '28'], '22': ['15', '21', '23', '29'], '23': ['16', '22', '24', '30'], '24': ['17', '23', '25', '31'], '25': ['18', '24', '26', '32'], '26': ['19', '25', '33'], '27': ['20', '34'], '28': ['21', '29', '35'], '29': ['22', '28', '30', '36'], '30': ['23', '29', '31', '37'], '31': ['24', '30', '32', '38'], '32': ['25', '31', '33', '39'], '33': ['26', '32', '34', '40'], '34': ['27', '33', '41'], '35': ['28', '36', '42'], '36': ['29', '35', '37', '43'], '37': ['30', '36', '38', '44'], '38': ['31', '37', '39', '45'], '39': ['32', '38', '40', '46'], '40': ['33', '39', '41', '47'], '41': ['34', '40', '48'], '42': ['35', '43', '49'], '43': ['36', '42', '44', '50'], '44': ['37', '43', '45', '51'], '45': ['38', '44', '46', '52'], '46': ['39', '45', '47', '53'], '47': ['40', '46', '48', '54'], '48': ['41', '47', '55'], '49': ['42', '56'], '50': ['43', '51', '57'], '51': ['44', '50', '52', '58'], '52': ['45', '51', '53', '59'], '53': ['46', '52', '54'], '54': ['47', '53', '55', '61'], '55': ['48', '54', '62'], '56': ['49', '57', '63'], '57': ['50', '56', '58', '64'], '58': ['51', '57', '59', '65'], '59': ['52', '58', '60', '66'], '60': ['59'], '61': ['54', '62', '68'], '62': ['55', '61', '69'], '63': ['56', '64', '70'], '64': ['57', '63', '65', '71'], '65': ['58', '64', '66', '72'], '66': ['59', '65', '67'], '67': ['66', '68', '74'], '68': ['61', '67', '69', '75'], '69': ['62', '68', '76'], '70': ['63', '71', '77'], '71': ['64', '70', '72', '78'], '72': ['65', '71', '73', '79'], '73': ['72', '74', '80'], '74': ['67', '73', '75', '81'], '75': ['68', '74', '76', '82'], '76': ['69', '75', '83'], '77': ['70', '78'], '78': ['71', '77', '79'], '79': ['72', '78', '80'], '80': ['73', '79', '81'], '81': ['74', '80', '82'], '82': ['75', '81', '83'], '83': ['76', '82']}\n"
79+
"the connectivity of Ankaa-3 is: {'0': ['1', '7'], '1': ['0', '2', '8'], '2': ['1', '3', '9'], '3': ['2', '4', '10'], '4': ['3', '5', '11'], '5': ['4', '6', '12'], '6': ['5', '13'], '7': ['0', '8', '14'], '8': ['1', '7', '9', '15'], '9': ['2', '8', '10', '16'], '10': ['3', '9', '11'], '11': ['4', '10', '12', '18'], '12': ['5', '11', '13', '19'], '13': ['6', '12', '20'], '14': ['7', '15', '21'], '15': ['8', '14', '16', '22'], '16': ['9', '15', '17', '23'], '17': ['16', '18', '24'], '18': ['11', '17', '19', '25'], '19': ['12', '18', '20', '26'], '20': ['13', '19', '27'], '21': ['14', '22', '28'], '22': ['15', '21', '23', '29'], '23': ['16', '22', '24', '30'], '24': ['17', '23', '25', '31'], '25': ['18', '24', '26', '32'], '26': ['19', '25', '27', '33'], '27': ['20', '26'], '28': ['21', '29', '35'], '29': ['22', '28', '30', '36'], '30': ['23', '29', '31', '37'], '31': ['24', '30', '38'], '32': ['25', '33', '39'], '33': ['26', '32', '34', '40'], '34': ['33', '41'], '35': ['28', '36'], '36': ['29', '35', '37', '43'], '37': ['30', '36', '38', '44'], '38': ['31', '37', '39', '45'], '39': ['32', '38', '40', '46'], '40': ['33', '39', '41', '47'], '41': ['34', '40'], '43': ['36', '50'], '44': ['37', '45', '51'], '45': ['38', '44', '46', '52'], '46': ['39', '45', '47', '53'], '47': ['40', '46', '54'], '49': ['50', '56'], '50': ['43', '49', '51', '57'], '51': ['44', '50', '52', '58'], '52': ['45', '51', '53', '59'], '53': ['46', '52', '54', '60'], '54': ['47', '53', '55', '61'], '55': ['54', '62'], '56': ['49', '57', '63'], '57': ['50', '56', '58', '64'], '58': ['51', '57', '59', '65'], '59': ['52', '58', '60', '66'], '60': ['53', '59', '61', '67'], '61': ['54', '60', '62', '68'], '62': ['55', '61', '69'], '63': ['56', '64', '70'], '64': ['57', '63', '65', '71'], '65': ['58', '64', '66', '72'], '66': ['59', '65', '73'], '67': ['60', '68', '74'], '68': ['61', '67', '69', '75'], '69': ['62', '68', '76'], '70': ['63', '71', '77'], '71': ['64', '70', '72', '78'], '72': ['65', '71', '73', '79'], '73': ['66', '72', '74', '80'], '74': ['67', '73', '75', '81'], '75': ['68', '74', '76', '82'], '76': ['69', '75', '83'], '77': ['70', '78'], '78': ['71', '77', '79'], '79': ['72', '78', '80'], '80': ['73', '79', '81'], '81': ['74', '80', '82'], '82': ['75', '81', '83'], '83': ['76', '82']}\n"
8080
]
8181
}
8282
],
8383
"source": [
84-
"device = AwsDevice(Devices.Rigetti._Ankaa2)\n",
84+
"device = AwsDevice(Devices.Rigetti.Ankaa3)\n",
8585
"\n",
8686
"connectivity_graph = device.properties.paradigm.connectivity.connectivityGraph\n",
8787
"print(f\"the connectivity of {device.name} is: {connectivity_graph}\")"
@@ -95,7 +95,7 @@
9595
}
9696
},
9797
"source": [
98-
"Next, create a GHZ circuit with three qubits 0, 2, 4, and run it on the Ankaa 2 device. Notice that none of these qubits are connected on the Ankaa 2 connectivity graph."
98+
"Next, create a GHZ circuit with three qubits 0, 2, 4, and run it on the Ankaa-3 device. Notice that none of these qubits are connected on the Ankaa-3 connectivity graph."
9999
]
100100
},
101101
{
@@ -175,32 +175,32 @@
175175
"name": "stdout",
176176
"output_type": "stream",
177177
"text": [
178-
"Measurement counts: Counter({'111': 6, '000': 3, '101': 1})\n",
178+
"Measurement counts: Counter({'111': 4, '000': 4, '011': 1, '010': 1})\n",
179179
"The compiled circuit is:\n",
180180
" PRAGMA INITIAL_REWIRING \"NAIVE\"\n",
181181
"DECLARE ro BIT[3]\n",
182182
"PRAGMA PRESERVE_BLOCK\n",
183-
"RX(1.5707963267948966) 5\n",
184-
"RZ(3.141592653589793) 5\n",
185-
"ISWAP 5 12\n",
186-
"RZ(1.5707963267948966) 5\n",
187-
"RX(1.5707963267948966) 5\n",
188-
"RZ(4.71238898038469) 5\n",
189-
"ISWAP 5 12\n",
190-
"RZ(1.5707963267948966) 5\n",
191-
"RZ(3.141592653589793) 12\n",
192-
"ISWAP 5 6\n",
193-
"RX(1.5707963267948966) 12\n",
194-
"RZ(1.5707963267948966) 5\n",
195-
"RX(1.5707963267948966) 5\n",
196-
"RZ(4.71238898038469) 5\n",
197-
"ISWAP 5 6\n",
198-
"RZ(3.141592653589793) 6\n",
199-
"RX(1.5707963267948966) 6\n",
183+
"RX(1.5707963267948966) 77\n",
184+
"RZ(3.141592653589793) 77\n",
185+
"ISWAP 77 70\n",
186+
"RZ(1.5707963267948966) 77\n",
187+
"RX(1.5707963267948966) 77\n",
188+
"RZ(4.71238898038469) 77\n",
189+
"ISWAP 77 70\n",
190+
"RZ(3.141592653589793) 70\n",
191+
"RZ(1.5707963267948966) 77\n",
192+
"RX(1.5707963267948966) 70\n",
193+
"ISWAP 77 78\n",
194+
"RZ(1.5707963267948966) 77\n",
195+
"RX(1.5707963267948966) 77\n",
196+
"RZ(4.71238898038469) 77\n",
197+
"ISWAP 77 78\n",
198+
"RZ(3.141592653589793) 78\n",
199+
"RX(1.5707963267948966) 78\n",
200200
"PRAGMA END_PRESERVE_BLOCK\n",
201-
"MEASURE 12 ro[1]\n",
202-
"MEASURE 5 ro[0]\n",
203-
"MEASURE 6 ro[2]\n"
201+
"MEASURE 70 ro[1]\n",
202+
"MEASURE 77 ro[0]\n",
203+
"MEASURE 78 ro[2]\n"
204204
]
205205
}
206206
],
@@ -251,17 +251,20 @@
251251
"name": "stdout",
252252
"output_type": "stream",
253253
"text": [
254-
"T : │ 0 │ 1 │\n",
255-
" ┌──────────┐ \n",
256-
"q0 : ─┤ Rz(1.57) ├───●───\n",
257-
" └──────────┘ │ \n",
258-
" ┌─┴─┐ \n",
259-
"q1 : ──────────────┤ X ├─\n",
260-
" └───┘ \n",
261-
" ┌───┐ \n",
262-
"q7 : ────┤ X ├───────────\n",
263-
" └───┘ \n",
264-
"T : │ 0 │ 1 │\n"
254+
"T : │ 0 │\n",
255+
" ┌──────────┐ \n",
256+
"q0 : ─┤ Rz(1.57) ├─\n",
257+
" └──────────┘ \n",
258+
" ┌───┐ \n",
259+
"q7 : ────┤ X ├─────\n",
260+
" └───┘ \n",
261+
" ┌───┐ \n",
262+
"q17 : ────┤ X ├─────\n",
263+
" └─┬─┘ \n",
264+
"\n",
265+
"q24 : ──────●───────\n",
266+
" \n",
267+
"T : │ 0 │\n"
265268
]
266269
}
267270
],
@@ -303,22 +306,23 @@
303306
"name": "stdout",
304307
"output_type": "stream",
305308
"text": [
306-
"Measurement counts: Counter({'001': 7, '000': 2, '011': 1})\n",
309+
"Measurement counts: Counter({'0001': 7, '0101': 1, '0000': 1, '0011': 1})\n",
307310
"The compiled circuit is:\n",
308311
" PRAGMA INITIAL_REWIRING \"NAIVE\"\n",
309-
"DECLARE ro BIT[3]\n",
312+
"DECLARE ro BIT[4]\n",
310313
"PRAGMA PRESERVE_BLOCK\n",
311-
"RX(1.5707963267948966) 0\n",
312314
"RX(1.5707963267948966) 7\n",
313-
"RZ(4.71238898038469) 0\n",
315+
"RX(1.5707963267948966) 24\n",
314316
"RX(1.5707963267948966) 7\n",
315-
"ISWAP 0 1\n",
316-
"RZ(3.141592653589793) 1\n",
317-
"RX(1.5707963267948966) 1\n",
317+
"RZ(4.71238898038469) 24\n",
318+
"ISWAP 24 17\n",
319+
"RZ(3.141592653589793) 17\n",
320+
"RX(1.5707963267948966) 17\n",
318321
"PRAGMA END_PRESERVE_BLOCK\n",
319-
"MEASURE 7 ro[2]\n",
320322
"MEASURE 0 ro[0]\n",
321-
"MEASURE 1 ro[1]\n"
323+
"MEASURE 7 ro[3]\n",
324+
"MEASURE 24 ro[1]\n",
325+
"MEASURE 17 ro[2]\n"
322326
]
323327
}
324328
],
@@ -359,7 +363,7 @@
359363
{
360364
"data": {
361365
"text/plain": [
362-
"['RX', 'RZ', 'CZ', 'ISWAP']"
366+
"['RX', 'RZ', 'ISWAP']"
363367
]
364368
},
365369
"execution_count": 10,
@@ -396,29 +400,22 @@
396400
" raise ValueError(f\"The input gate must be one of {gates_uppercase}.\")\n",
397401
"\n",
398402
" # load all calibration data from device.properties\n",
399-
" calibration_2Q = device.properties.provider.specs[\"2Q\"]\n",
400-
" highest_fidelity = 0\n",
401-
"\n",
403+
" calibration_2Q = device.properties.standardized.twoQubitProperties\n",
404+
" \n",
402405
" # iterate through all calibration data to find the highest fidelity\n",
403-
" for pair in calibration_2Q.keys():\n",
404-
" # if the particular gate type is supported by the qubit pair\n",
405-
" if (\"f\" + gate) in calibration_2Q[pair].keys():\n",
406-
" if calibration_2Q[pair][\"f\" + gate] > highest_fidelity:\n",
407-
" # update the highest_fidelity and the best_pair\n",
408-
" highest_fidelity = calibration_2Q[pair][\"f\" + gate]\n",
409-
" best_pair = pair\n",
406+
" fidelities = []\n",
407+
" for pair, entry in calibration_2Q.items():\n",
408+
" for g in entry.twoQubitGateFidelity:\n",
409+
" name = g.gateName\n",
410+
" fidelity = g.fidelity\n",
411+
" if name == gate:\n",
412+
" fidelities.append((pair, fidelity))\n",
413+
" (best_pair, highest_fidelity) = max(fidelities, key=lambda item: item[1])\n",
410414
"\n",
411415
" # generate the two qubits as integers\n",
412-
" q1 = best_pair[0]\n",
413-
" i = 1\n",
414-
" while best_pair[i] != \"-\":\n",
415-
" q1 += best_pair[i]\n",
416-
" i += 1\n",
416+
" q1, q2 = tuple(map(int, best_pair.split('-')))\n",
417417
"\n",
418-
" q1 = int(q1)\n",
419-
" q2 = int(best_pair[i + 1 :])\n",
420-
"\n",
421-
" return q1, q2, highest_fidelity"
418+
" return q1, q2, highest_fidelity\n"
422419
]
423420
},
424421
{
@@ -445,14 +442,14 @@
445442
"name": "stdout",
446443
"output_type": "stream",
447444
"text": [
448-
"The highest fidelity for ISWAP gate is: 0.99312484820244\n",
449-
"And the corresponding qubit pair is: qubit 73 and qubit 74\n",
445+
"The highest fidelity for ISWAP gate is: 0.9944077775042964\n",
446+
"And the corresponding qubit pair is: qubit 70 and qubit 77\n",
450447
"T : │ 0 │\n",
451448
" \n",
452-
"q73 : ───●───\n",
449+
"q70 : ───●───\n",
453450
"\n",
454451
" ┌─┴─┐ \n",
455-
"q74 : ─┤ Z ├─\n",
452+
"q77 : ─┤ Z ├─\n",
456453
" └───┘ \n",
457454
"T : │ 0 │\n"
458455
]
@@ -471,7 +468,7 @@
471468
"circuit = Circuit()\n",
472469
"circuit.cz(q1, q2)\n",
473470
"print(circuit)\n",
474-
"rigetti_task = device.run(circuit, shots=1000, disable_qubit_rewiring=True)"
471+
"rigetti_task = device.run(circuit, shots=100, disable_qubit_rewiring=True)"
475472
]
476473
},
477474
{
@@ -521,9 +518,9 @@
521518
"output_type": "stream",
522519
"text": [
523520
"Quantum Task Summary\n",
524-
"{<_Rigetti.Ankaa2: 'arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2'>: {'shots': 1020, 'tasks': {'COMPLETED': 2, 'QUEUED': 1}}}\n",
521+
"{<_Rigetti.Ankaa3: 'arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-3'>: {'shots': 120, 'tasks': {'COMPLETED': 2, 'QUEUED': 1}}}\n",
525522
"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",
526-
"Estimated cost to run this example: 1.82 USD\n"
523+
"Estimated cost to run this example: 1.01 USD\n"
527524
]
528525
}
529526
],
@@ -537,11 +534,18 @@
537534
" f\"Estimated cost to run this example: {t.qpu_tasks_cost() + t.simulator_tasks_cost():.2f} USD\"\n",
538535
")"
539536
]
537+
},
538+
{
539+
"cell_type": "code",
540+
"execution_count": null,
541+
"metadata": {},
542+
"outputs": [],
543+
"source": []
540544
}
541545
],
542546
"metadata": {
543547
"kernelspec": {
544-
"display_name": "braket",
548+
"display_name": "3.10.10",
545549
"language": "python",
546550
"name": "python3"
547551
},
@@ -555,7 +559,7 @@
555559
"name": "python",
556560
"nbconvert_exporter": "python",
557561
"pygments_lexer": "ipython3",
558-
"version": "3.10.11"
562+
"version": "3.10.10"
559563
}
560564
},
561565
"nbformat": 4,

0 commit comments

Comments
 (0)
Please sign in to comment.