Skip to content

Commit

Permalink
Update idle example
Browse files Browse the repository at this point in the history
  • Loading branch information
rmshaffer committed Sep 26, 2024
1 parent 8fab8b8 commit 43cf951
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions examples/5_Pulse_programming_and_dynamical_decoupling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"metadata": {},
"source": [
"## Customize delay with pulse programming\n",
"As a hello-world example, the pulse program below includes a `delay` instruction on the frame of the physical qubit `$0` followed by a capture instruction on the same frame. The pulse program represents measuring a qubit after a variable idling duration. It can be used quantify the decoherence of a qubit by comparing the measured state and the initial state after certain idling duration."
"As a hello-world example, the pulse program below includes a `delay` instruction on the drive frame of the physical qubit `$0` followed by a capture instruction on the readout frame of the same qubit. The pulse program represents measuring a qubit after a variable idling duration. It can be used to quantify the decoherence of a qubit by comparing the measured state and the initial state after a certain idling duration."
]
},
{
Expand All @@ -86,9 +86,11 @@
"\n",
"@aq.main\n",
"def idle():\n",
" control_frame = device.frames[f\"Transmon_{qubit}_readout_rx\"]\n",
" pulse.delay(control_frame, idle_duration)\n",
" pulse.capture_v0(control_frame)"
" drive_frame = device.frames[f\"Transmon_{qubit}_charge_tx\"]\n",
" pulse.delay(drive_frame, idle_duration)\n",
"\n",
" readout_frame = device.frames[f\"Transmon_{qubit}_readout_rx\"]\n",
" pulse.capture_v0(readout_frame)"
]
},
{
Expand All @@ -112,7 +114,7 @@
"OPENQASM 3.0;\n",
"bit __bit_0__;\n",
"cal {\n",
" delay[10.0us] Transmon_0_readout_rx;\n",
" delay[10.0us] Transmon_0_charge_tx;\n",
" __bit_0__ = capture_v0(Transmon_0_readout_rx);\n",
"}\n"
]
Expand Down Expand Up @@ -206,19 +208,19 @@
"def idle_with_dd():\n",
" dd_spacing = idle_duration / (4 * n_cycles)\n",
"\n",
" control_frame = device.frames[f\"Transmon_{qubit}_charge_tx\"]\n",
" drive_frame = device.frames[f\"Transmon_{qubit}_charge_tx\"]\n",
"\n",
" pulse.delay(control_frame, dd_spacing)\n",
" pulse.delay(drive_frame, dd_spacing)\n",
" for _ in aq.range(n_cycles):\n",
" x_pulse(qubit)\n",
" pulse.delay(control_frame, 2 * dd_spacing)\n",
" pulse.delay(drive_frame, 2 * dd_spacing)\n",
" y_pulse(qubit)\n",
" pulse.delay(control_frame, 2 * dd_spacing)\n",
" pulse.delay(drive_frame, 2 * dd_spacing)\n",
" x_pulse(qubit)\n",
" pulse.delay(control_frame, 2 * dd_spacing)\n",
" pulse.delay(drive_frame, 2 * dd_spacing)\n",
" y_pulse(qubit)\n",
"\n",
" pulse.delay(control_frame, dd_spacing)"
" pulse.delay(drive_frame, dd_spacing)"
]
},
{
Expand Down

0 comments on commit 43cf951

Please sign in to comment.