Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: Use Ankaa-2 instead of Aspen-M-3 in pulse examples #48

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def cal_1(theta: float):
# The calibration is applicable for any rotation angle,
# so we accept it as an input argument
pulse.barrier("$0")
pulse.shift_frequency(q0_rf_frame, -321047.14178613486)
pulse.play(q0_rf_frame, waveform(theta))
pulse.shift_frequency(q0_rf_frame, 321047.14178613486)
pulse.shift_frequency(control_frame, -321047.14178613486)
pulse.play(control_frame, waveform(theta))
pulse.shift_frequency(control_frame, 321047.14178613486)
pulse.barrier("$0")
```

Expand Down
24 changes: 12 additions & 12 deletions examples/5_Pulse_programming_and_dynamical_decoupling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"id": "2eeb58e3",
"metadata": {},
"source": [
"We start with basic imports, and initialize the Rigetti Aspen-M-3 device which is the targeted device for this example notebook."
"We start with basic imports, and initialize the Rigetti Ankaa-2 device which is the targeted device for this example notebook."
]
},
{
Expand Down Expand Up @@ -53,7 +53,7 @@
"metadata": {},
"outputs": [],
"source": [
"device = AwsDevice(Devices.Rigetti.AspenM3)"
"device = AwsDevice(Devices.Rigetti.Ankaa2)"
]
},
{
Expand Down Expand Up @@ -86,7 +86,7 @@
"\n",
"@aq.main\n",
"def idle():\n",
rmshaffer marked this conversation as resolved.
Show resolved Hide resolved
" control_frame = device.frames[f\"q{qubit}_rf_frame\"]\n",
" control_frame = device.frames[f\"Transmon_{qubit}_charge_tx\"]\n",
rmshaffer marked this conversation as resolved.
Show resolved Hide resolved
" pulse.delay(control_frame, idle_duration)\n",
" pulse.capture_v0(control_frame)"
]
Expand All @@ -112,8 +112,8 @@
"OPENQASM 3.0;\n",
"bit __bit_0__;\n",
"cal {\n",
" delay[10.0us] q0_rf_frame;\n",
" __bit_0__ = capture_v0(q0_rf_frame);\n",
" delay[10.0us] Transmon_0_charge_tx;\n",
" __bit_0__ = capture_v0(Transmon_0_charge_tx);\n",
"}\n"
]
}
Expand Down Expand Up @@ -151,7 +151,7 @@
"id": "814647c1",
"metadata": {},
"source": [
"First, we create the X and Y $\\pi$ pulse in terms of the native gates of Rigetti Aspen-M-3 device. "
"First, we create the X and Y $\\pi$ pulse in terms of the native gates of Rigetti Ankaa-2 device. "
]
},
{
Expand Down Expand Up @@ -206,7 +206,7 @@
"def idle_with_dd():\n",
" dd_spacing = idle_duration / (4 * n_cycles)\n",
"\n",
" control_frame = device.frames[f\"q{qubit}_rf_frame\"]\n",
" control_frame = device.frames[f\"Transmon_{qubit}_charge_tx\"]\n",
"\n",
" pulse.delay(control_frame, dd_spacing)\n",
" for _ in aq.range(n_cycles):\n",
Expand Down Expand Up @@ -241,29 +241,29 @@
"text": [
"OPENQASM 3.0;\n",
"cal {\n",
" delay[833.333333333333ns] q0_rf_frame;\n",
" delay[833.333333333333ns] Transmon_0_charge_tx;\n",
"}\n",
"for int _ in [0:3 - 1] {\n",
" rx(3.141592653589793) $0;\n",
" cal {\n",
" delay[1.666666666667us] q0_rf_frame;\n",
" delay[1.666666666667us] Transmon_0_charge_tx;\n",
" }\n",
" rz(-1.5707963267948966) $0;\n",
" rx(3.141592653589793) $0;\n",
" rz(1.5707963267948966) $0;\n",
" cal {\n",
" delay[1.666666666667us] q0_rf_frame;\n",
" delay[1.666666666667us] Transmon_0_charge_tx;\n",
" }\n",
" rx(3.141592653589793) $0;\n",
" cal {\n",
" delay[1.666666666667us] q0_rf_frame;\n",
" delay[1.666666666667us] Transmon_0_charge_tx;\n",
" }\n",
" rz(-1.5707963267948966) $0;\n",
" rx(3.141592653589793) $0;\n",
" rz(1.5707963267948966) $0;\n",
"}\n",
"cal {\n",
" delay[833.333333333333ns] q0_rf_frame;\n",
" delay[833.333333333333ns] Transmon_0_charge_tx;\n",
"}\n"
]
}
Expand Down
43 changes: 18 additions & 25 deletions examples/6_Customize_gate_calibrations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"\n",
"The pulse implementation of a gate is called \"gate calibration\". Gaining access to gate calibrations empowers you to experiment with quantum gate designs and execute quantum programs with customized, improved gate calibrations. This notebook shows you how to access the native gate calibrations provided by quantum hardware providers, and shows you how to define custom gate calibrations for your quantum programs.\n",
"\n",
"We start with basic imports, and initialize the Rigetti Aspen-M-3 device which is the targeted device for this example notebook."
"We start with basic imports, and initialize the Rigetti Ankaa-2 device which is the targeted device for this example notebook."
]
},
{
Expand Down Expand Up @@ -41,7 +41,7 @@
"metadata": {},
"outputs": [],
"source": [
"device = AwsDevice(Devices.Rigetti.AspenM3)"
"device = AwsDevice(Devices.Rigetti.Ankaa2)"
]
},
{
Expand Down Expand Up @@ -90,11 +90,9 @@
"text": [
"OPENQASM 3.0;\n",
"cal {\n",
" waveform wf_drag_gaussian_1 = drag_gaussian(24.0ns, 2.547965400864ns, 2.3223415460834803e-10, 0.28585537029609, false);\n",
" waveform wf_drag_gaussian_153 = drag_gaussian(40.0ns, 8.49321800288ns, -2.618211817882948e-10, 0.19930451095449803, false);\n",
" barrier $0;\n",
" shift_frequency(q0_rf_frame, -321047.14178613486);\n",
" play(q0_rf_frame, wf_drag_gaussian_1);\n",
" shift_frequency(q0_rf_frame, 321047.14178613486);\n",
" play(Transmon_0_charge_tx, wf_drag_gaussian_153);\n",
" barrier $0;\n",
"}\n"
]
Expand Down Expand Up @@ -127,12 +125,7 @@
"OPENQASM 3.0;\n",
"cal {\n",
" input float theta;\n",
" barrier $1;\n",
" shift_phase(q1_rf_frame, -1.0 * theta);\n",
" shift_phase(q0_q1_xy_frame, 0.5 * theta);\n",
" shift_phase(q1_q2_xy_frame, 0.5 * theta);\n",
" shift_phase(q1_q16_xy_frame, 0.5 * theta);\n",
" barrier $1;\n",
" shift_phase(Transmon_1_charge_tx, -1.0 * theta);\n",
"}\n"
]
}
Expand Down Expand Up @@ -202,15 +195,15 @@
"wf = DragGaussianWaveform(\n",
" 24e-9, 2.547965400864e-9, 2.370235498840002e-10, 0.293350447987059, False, \"wf_drag_gaussian_1\"\n",
")\n",
"q0_rf_frame = device.frames[\"q0_rf_frame\"]\n",
"q0_control_frame = device.frames[\"Transmon_0_charge_tx\"]\n",
"\n",
"\n",
"@aq.gate_calibration(implements=rx, target=\"$0\", theta=np.pi / 2)\n",
"def my_rx_cal():\n",
" pulse.barrier(\"$0\")\n",
" pulse.shift_frequency(q0_rf_frame, -321047.14178613486 - 100)\n",
" pulse.play(q0_rf_frame, wf)\n",
" pulse.shift_frequency(q0_rf_frame, 321047.14178613486 + 100)\n",
" pulse.shift_frequency(q0_control_frame, -321047.14178613486 - 100)\n",
" pulse.play(q0_control_frame, wf)\n",
" pulse.shift_frequency(q0_control_frame, 321047.14178613486 + 100)\n",
" pulse.barrier(\"$0\")"
]
},
Expand Down Expand Up @@ -277,9 +270,9 @@
"}\n",
"defcal rx(1.5707963267948966) $0 {\n",
" barrier $0;\n",
" shift_frequency(q0_rf_frame, -321147.14178613486);\n",
" play(q0_rf_frame, wf_drag_gaussian_1);\n",
" shift_frequency(q0_rf_frame, 321147.14178613486);\n",
" shift_frequency(Transmon_0_charge_tx, -321147.14178613486);\n",
" play(Transmon_0_charge_tx, wf_drag_gaussian_1);\n",
" shift_frequency(Transmon_0_charge_tx, 321147.14178613486);\n",
" barrier $0;\n",
"}\n",
"rx(1.5707963267948966) $0;\n",
Expand Down Expand Up @@ -309,13 +302,13 @@
"metadata": {},
"outputs": [],
"source": [
"q1_rf_frame = device.frames[\"q1_rf_frame\"]\n",
"q1_control_frame = device.frames[\"Transmon_1_charge_tx\"]\n",
"\n",
"\n",
"@aq.gate_calibration(implements=rz, target=\"$1\")\n",
"def my_rz_cal(theta: float):\n",
" pulse.barrier(\"$1\")\n",
" pulse.shift_frequency(q1_rf_frame, -1.0 * theta)\n",
" pulse.shift_frequency(q1_control_frame, -1.0 * theta)\n",
" pulse.barrier(\"$1\")"
]
},
Expand Down Expand Up @@ -343,14 +336,14 @@
"}\n",
"defcal rx(1.5707963267948966) $0 {\n",
" barrier $0;\n",
" shift_frequency(q0_rf_frame, -321147.14178613486);\n",
" play(q0_rf_frame, wf_drag_gaussian_1);\n",
" shift_frequency(q0_rf_frame, 321147.14178613486);\n",
" shift_frequency(Transmon_0_charge_tx, -321147.14178613486);\n",
" play(Transmon_0_charge_tx, wf_drag_gaussian_1);\n",
" shift_frequency(Transmon_0_charge_tx, 321147.14178613486);\n",
" barrier $0;\n",
"}\n",
"defcal rz(angle[32] theta) $1 {\n",
" barrier $1;\n",
" shift_frequency(q1_rf_frame, -1.0 * theta);\n",
" shift_frequency(Transmon_1_charge_tx, -1.0 * theta);\n",
" barrier $1;\n",
"}\n",
"rx(1.5707963267948966) $0;\n",
Expand Down