Skip to content

Commit

Permalink
restored docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lranzani committed Nov 22, 2024
1 parent 931c0b0 commit 35599b8
Show file tree
Hide file tree
Showing 8 changed files with 79,960 additions and 0 deletions.
1,236 changes: 1,236 additions & 0 deletions doc/examples/Example-APS2-2Qubit.ipynb

Large diffs are not rendered by default.

167 changes: 167 additions & 0 deletions doc/examples/Example-Calibrations.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example Q6: Calibrations\n",
"This example notebook shows how to use the pulse calibration framework.\n",
"\n",
"© Raytheon BBN Technologies 2019"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from QGL import *\n",
"from auspex.qubit import *"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We use a pre-existing database containing a channel library and pipeline we have established."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"cl = ChannelLibrary(\"my_config\")\n",
"pl = PipelineManager()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Calibrating Mixers\n",
"\n",
"The APS2 requires mixers to upconvert to qubit and cavity frequencies. We must tune the offset of these mixers and the amplitude factors of the quadrature channels to ensure the best possible results. We repeat the definition of the spectrum analyzer here, assuming that the LO driving this instrument is present in the channel library as `spec_an_LO`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"spec_an = cl.new_spectrum_analzyer(\"SpecAn\", \"ASRL/dev/ttyACM0::INSTR\", cl[\"spec_an_LO\"])\n",
"cal = MixerCalibration(q2, spec_an, mixer=\"measure\")\n",
"cal.calibrate()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If the plot server and client are open, then the data will be plotted along with fits from the calibration procedure. The calibration procedure automatically knows which digitizer and AWG units are needed in the process. The relevant instrument parameters are updated but not commited to the database. Therefore they may be rolled back if undesirable results are found."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pulse Calibrations\n",
"\n",
"A simple set of calibrations is performed as follows."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cals = RabiAmpCalibration(q2)\n",
"cal.calibrate()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cal = RamseyCalibration(q2)\n",
"cal.calibrate()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Of course this is somewhat repetetive and can be sped up:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cals = [RabiAmpCalibration, RamseyCalibration, Pi2Calibration, PiCalibration]\n",
"[cal(q2).calibrate() for cal in cals]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Automatic Tuneup\n",
"\n",
"While we develop algorithms for fully automated tuneup, some segments of the analysis are (primitively) automated as seen below:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cal = QubitTuneup(q2, f_start=5.2e9, f_stop=5.8e9, coarse_step=50e6, fine_step=0.5e6, averages=250, amp=0.1)\n",
"cal.calibrate()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": false,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": false,
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 35599b8

Please sign in to comment.