Skip to content

Commit

Permalink
Release 2.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lienemann committed Jul 20, 2023
1 parent af5087d commit bf486f5
Show file tree
Hide file tree
Showing 130 changed files with 7,972 additions and 3,057 deletions.
52 changes: 26 additions & 26 deletions examples/00_reference/00_session_reference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"id": "771e7eff",
"metadata": {},
"source": [
"# Prerequisites"
"# Session Reference"
]
},
{
Expand All @@ -25,7 +25,7 @@
"from laboneq.simple import *\n",
"\n",
"# pretty printing\n",
"from pprint import pprint\n"
"from pprint import pprint"
]
},
{
Expand Down Expand Up @@ -73,7 +73,7 @@
" device_pqsc:\n",
" - to: device_hdawg\n",
" port: ZSYNCS/0\n",
"\"\"\"\n"
"\"\"\""
]
},
{
Expand Down Expand Up @@ -155,7 +155,7 @@
" \"acquire_line\"\n",
" ].oscillator = Oscillator(\n",
" uid=\"acquire_q1_osc\", frequency=1e8, modulation_type=ModulationType.SOFTWARE\n",
" )\n"
" )"
]
},
{
Expand All @@ -176,7 +176,7 @@
" server_port=\"8004\",\n",
" setup_name=\"ZI_QCCS\",\n",
")\n",
"calibrate_devices(device_setup)\n"
"calibrate_devices(device_setup)"
]
},
{
Expand Down Expand Up @@ -245,7 +245,7 @@
" exp.play(\n",
" signal=\"q0_measure\",\n",
" pulse=pulse_library.const(length=1e-6, amplitude=0.0),\n",
" ) # KNOWN ISSUE: Need to wait for 1us to prevent QA holdoff error\n"
" ) # KNOWN ISSUE: Need to wait for 1us to prevent QA holdoff error"
]
},
{
Expand All @@ -270,7 +270,7 @@
"outputs": [],
"source": [
"session = Session(device_setup=device_setup)\n",
"session.connect(do_emulation=True)\n"
"session.connect(do_emulation=True)"
]
},
{
Expand All @@ -294,7 +294,7 @@
},
"outputs": [],
"source": [
"compiled_experiment = session.compile(experiment=exp)\n"
"compiled_experiment = session.compile(experiment=exp)"
]
},
{
Expand All @@ -318,7 +318,7 @@
},
"outputs": [],
"source": [
"compiled_experiment = session.compiled_experiment\n"
"compiled_experiment = session.compiled_experiment"
]
},
{
Expand All @@ -344,7 +344,7 @@
},
"outputs": [],
"source": [
"my_results = session.run(compiled_experiment)\n"
"my_results = session.run(compiled_experiment)"
]
},
{
Expand Down Expand Up @@ -387,7 +387,7 @@
},
"outputs": [],
"source": [
"results = session.results\n"
"results = session.results"
]
},
{
Expand All @@ -412,7 +412,7 @@
},
"outputs": [],
"source": [
"results_copy = session.get_results()\n"
"results_copy = session.get_results()"
]
},
{
Expand Down Expand Up @@ -442,7 +442,7 @@
"experiment_calibration = results.experiment_calibration\n",
"signal_map = results.signal_map\n",
"compiled_experiment = results.compiled_experiment\n",
"acquired_results = results.acquired_results\n"
"acquired_results = results.acquired_results"
]
},
{
Expand All @@ -468,7 +468,7 @@
"source": [
"recipe = compiled_experiment.recipe\n",
"src = compiled_experiment.src\n",
"waves = compiled_experiment.waves\n"
"waves = compiled_experiment.waves"
]
},
{
Expand All @@ -493,7 +493,7 @@
},
"outputs": [],
"source": [
"pprint(acquired_results)\n"
"pprint(acquired_results)"
]
},
{
Expand Down Expand Up @@ -529,7 +529,7 @@
"acquired_data = results.get_data(\"h\")\n",
"# 1D -> one axis only\n",
"axis_grid = results.get_axis(\"h\")[0]\n",
"axis_name = results.get_axis_name(\"h\")[0]\n"
"axis_name = results.get_axis_name(\"h\")[0]"
]
},
{
Expand Down Expand Up @@ -557,7 +557,7 @@
"metadata": {},
"outputs": [],
"source": [
"session.save(\"my_session.json\")\n"
"session.save(\"my_session.json\")"
]
},
{
Expand All @@ -582,7 +582,7 @@
"session.save_device_calibration(\"my_device_calibration.json\")\n",
"session.save_experiment_calibration(\"my_experiment_calibration.json\")\n",
"session.save_signal_map(\"my_signal_map.json\")\n",
"session.save_results(\"my_results.json\")\n"
"session.save_results(\"my_results.json\")"
]
},
{
Expand All @@ -601,7 +601,7 @@
"metadata": {},
"outputs": [],
"source": [
"new_session = Session.load(\"my_session.json\")\n"
"new_session = Session.load(\"my_session.json\")"
]
},
{
Expand All @@ -621,7 +621,7 @@
"outputs": [],
"source": [
"new_session.connect(do_emulation=True)\n",
"new_results = new_session.run()\n"
"new_results = new_session.run()"
]
},
{
Expand All @@ -645,7 +645,7 @@
"session.load_compiled_experiment(\"my_compiled_experiment.json\")\n",
"session.load_device_calibration(\"my_device_calibration.json\")\n",
"session.load_experiment_calibration(\"my_experiment_calibration.json\")\n",
"session.load_signal_map(\"my_signal_map.json\")\n"
"session.load_signal_map(\"my_signal_map.json\")"
]
},
{
Expand Down Expand Up @@ -674,7 +674,7 @@
"# Signal Maps can only be loaded on and applied to an existing Experiment:\n",
"my_experiment.load_signal_map(\"my_signal_map.json\")\n",
"\n",
"print(my_device_setup)\n"
"print(my_device_setup)"
]
},
{
Expand Down Expand Up @@ -711,7 +711,7 @@
"import numpy as np\n",
"\n",
"plt.plot(axis_grid, np.absolute(acquired_data))\n",
"plt.xlabel(axis_name)\n"
"plt.xlabel(axis_name)"
]
},
{
Expand All @@ -732,7 +732,7 @@
"source": [
"from laboneq.simulator.output_simulator import OutputSimulator\n",
"\n",
"simulator = OutputSimulator(compiled_experiment)\n"
"simulator = OutputSimulator(compiled_experiment)"
]
},
{
Expand All @@ -748,7 +748,7 @@
"acquire_port = qb[\"acquire_line\"].physical_channel\n",
"\n",
"snippet_measure = simulator.get_snippet(measure_iq_port, start=0, output_length=1e-5)\n",
"snippet_acquire = simulator.get_snippet(acquire_port, start=0, output_length=1e-5)\n"
"snippet_acquire = simulator.get_snippet(acquire_port, start=0, output_length=1e-5)"
]
},
{
Expand All @@ -772,7 +772,7 @@
"\n",
"time = snippet_acquire.time\n",
"ax[2].plot(time, snippet_acquire.wave.real)\n",
"ax[2].set_title(\"QA trigger\")\n"
"ax[2].set_title(\"QA trigger\")"
]
}
],
Expand Down
Loading

0 comments on commit bf486f5

Please sign in to comment.