Skip to content

Commit

Permalink
Merge pull request #429 from qutech/issues/422_parallel_constant_channel
Browse files Browse the repository at this point in the history
Issues/422 parallel constant channel
  • Loading branch information
terrorfisch committed Feb 26, 2019
2 parents 134b9d1 + 49aeebd commit 1e1e0c6
Show file tree
Hide file tree
Showing 14 changed files with 1,479 additions and 16 deletions.
1 change: 1 addition & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Add `AbstractPulseTemplate` class
- `PointPulseTemplate`:
- Fixed bug in integral evaluation
- Add `ParallelConstantChannelPulseTemplate` which allows adding a constant valued channel to an arbitrary pulse template

- Expressions:
- Make ExpressionScalar hashable
Expand Down
41 changes: 38 additions & 3 deletions doc/source/examples/10FreeInductionDecayExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,6 @@
" t_step=5,\n",
" N_fid_steps=5, N_repetitions=2)\n",
"\n",
"# convert lists to numpy arrays\n",
"example_values = {k: np.array(v) if isinstance(v, list) else v\n",
" for k, v in example_values.items()}\n",
"from qupulse.pulses.plotting import plot\n",
"\n",
"_ = plot(experiment, example_values)"
Expand Down Expand Up @@ -1756,6 +1753,44 @@
"\n",
"_ = plot(experiment, example_values)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As a last step we will save the pulse and some example parameters so we can use it in other examples."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Successfully saved pulse and example parameters\n"
]
}
],
"source": [
"import json\n",
"from qupulse.serialization import FilesystemBackend, PulseStorage\n",
"\n",
"pulse_storage = PulseStorage(FilesystemBackend('./serialized_pulses'))\n",
"\n",
"# overwrite all pulses explicitly\n",
"pulse_storage.overwrite('adprep', adprep)\n",
"pulse_storage.overwrite('S_init', S_init)\n",
"pulse_storage.overwrite('adread', adread)\n",
"pulse_storage.overwrite('free_induction_decay', experiment)\n",
"\n",
"with open('parameters/free_induction_decay.json', 'w') as parameter_file:\n",
" json.dump(example_values, parameter_file)\n",
"\n",
"print('Successfully saved pulse and example parameters')"
]
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 1e1e0c6

Please sign in to comment.