Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9506764
Fix scheme names and make private function names consistent
charmasaur Sep 4, 2020
737562d
Merge branch 'master' into docs
charmasaur Sep 4, 2020
18f02f3
Fix some docstring formatting
charmasaur Sep 4, 2020
849defb
Consistency
charmasaur Sep 4, 2020
6ee2860
Lots of documentation
charmasaur Sep 4, 2020
c5302df
Fix scaling of amplitudes when exporting controls
charmasaur Sep 4, 2020
69dd02b
Merge branch 'fix_export' into more_docs
charmasaur Sep 4, 2020
5928584
docs docs docs
charmasaur Sep 4, 2020
afcd30d
tweaks
charmasaur Sep 4, 2020
7b397bf
Merge branch 'master' into more_docs
charmasaur Sep 4, 2020
19e6c01
Temporarily add HTML for viewing convenience
charmasaur Sep 4, 2020
b3f3036
remove html, didn't work
charmasaur Sep 4, 2020
6573638
raw
charmasaur Sep 4, 2020
2246e7e
work
charmasaur Sep 4, 2020
0f7de73
bump
charmasaur Sep 6, 2020
3ac68b6
Update documentation for predefined driven controls
charmasaur Sep 4, 2020
00841c1
Fix lint errors
charmasaur Sep 6, 2020
c80a2c1
Make functions public
charmasaur Sep 6, 2020
5ddb791
Merge branch 'more_docs' into QENG-1118
charmasaur Sep 6, 2020
4a24742
Merge branch 'pulses' into QENG-1118
charmasaur Sep 6, 2020
4486765
Fix see alsos
charmasaur Sep 6, 2020
b088caa
Update qctrlopencontrols/utils.py
charmasaur Sep 7, 2020
a46738d
Update qctrlopencontrols/driven_controls/driven_control.py
charmasaur Sep 7, 2020
98e3c2f
Update qctrlopencontrols/driven_controls/driven_control.py
charmasaur Sep 7, 2020
4c6be0e
Lower case amplitudes
charmasaur Sep 7, 2020
6424e98
Update qctrlopencontrols/driven_controls/driven_control.py
charmasaur Sep 7, 2020
8a228e8
Merge branch 'more_docs' of github.com:qctrl/python-open-controls int…
charmasaur Sep 7, 2020
b5fe04b
Fix maximum Rabi rate in example
charmasaur Sep 7, 2020
8d24a7b
Add information about driven control time evolution
charmasaur Sep 7, 2020
2523c0b
lint
charmasaur Sep 7, 2020
aaacade
more lint
charmasaur Sep 7, 2020
8c0013f
uncapitalise non-proper-noun acronym expansions
charmasaur Sep 7, 2020
815f0e0
Merge branch 'more_docs' into QENG-1118
charmasaur Sep 7, 2020
13eef08
Merge branch 'pulses' into QENG-1118
charmasaur Sep 7, 2020
aa9def0
Merge branch 'master' into QENG-1118
charmasaur Sep 7, 2020
0db7a26
add comment
charmasaur Sep 7, 2020
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
24 changes: 21 additions & 3 deletions qctrlopencontrols/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@

from .driven_controls.driven_control import DrivenControl
from .driven_controls.predefined import (
new_bb1_control,
new_corpse_control,
new_corpse_in_bb1_control,
new_corpse_in_scrofulous_control,
new_corpse_in_sk1_control,
new_modulated_gaussian_control,
new_predefined_driven_control,
new_primitive_control,
new_scrofulous_control,
new_sk1_control,
new_wamf1_control,
)
from .dynamic_decoupling_sequences.dynamic_decoupling_sequence import (
DynamicDecouplingSequence,
Expand All @@ -30,10 +39,19 @@
from .dynamic_decoupling_sequences.predefined import new_predefined_dds

__all__ = [
"DrivenControl",
"DynamicDecouplingSequence",
"convert_dds_to_driven_control",
"new_predefined_dds",
"new_bb1_control",
"new_corpse_control",
"new_corpse_in_bb1_control",
"new_corpse_in_scrofulous_control",
"new_corpse_in_sk1_control",
"new_modulated_gaussian_control",
"new_predefined_dds",
"new_predefined_driven_control",
"DrivenControl",
"DynamicDecouplingSequence",
"new_primitive_control",
"new_scrofulous_control",
"new_sk1_control",
"new_wamf1_control",
]
44 changes: 23 additions & 21 deletions qctrlopencontrols/driven_controls/predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def new_predefined_driven_control(scheme: str = PRIMITIVE, **kwargs):
"""
Creates a new driven control based on the given scheme.

Equivalent to calling the corresponding ``new_<scheme>_control`` function.

Parameters
----------
scheme : string, optional
Expand Down Expand Up @@ -75,23 +77,23 @@ def new_predefined_driven_control(scheme: str = PRIMITIVE, **kwargs):

# Raise error if the input driven_control_type is not known
if scheme == PRIMITIVE:
driven_control = _new_primitive_control(**kwargs)
driven_control = new_primitive_control(**kwargs)
elif scheme == BB1:
driven_control = _new_bb1_control(**kwargs)
driven_control = new_bb1_control(**kwargs)
elif scheme == SK1:
driven_control = _new_sk1_control(**kwargs)
driven_control = new_sk1_control(**kwargs)
elif scheme == WAMF1:
driven_control = _new_wamf1_control(**kwargs)
driven_control = new_wamf1_control(**kwargs)
elif scheme == CORPSE:
driven_control = _new_corpse_control(**kwargs)
driven_control = new_corpse_control(**kwargs)
elif scheme == CORPSE_IN_BB1:
driven_control = _new_corpse_in_bb1_control(**kwargs)
driven_control = new_corpse_in_bb1_control(**kwargs)
elif scheme == CORPSE_IN_SK1:
driven_control = _new_corpse_in_sk1_control(**kwargs)
driven_control = new_corpse_in_sk1_control(**kwargs)
elif scheme == SCROFULOUS:
driven_control = _new_scrofulous_control(**kwargs)
driven_control = new_scrofulous_control(**kwargs)
elif scheme == CORPSE_IN_SCROFULOUS:
driven_control = _new_corpse_in_scrofulous_control(**kwargs)
driven_control = new_corpse_in_scrofulous_control(**kwargs)
else:
raise ArgumentsValueError(
"Unknown predefined pulse type. See help(new_predefined_driven_control) to display all"
Expand Down Expand Up @@ -208,7 +210,7 @@ def _derive_segments(
return segments


def _new_primitive_control(
def new_primitive_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -257,7 +259,7 @@ def _new_primitive_control(
)


def _new_bb1_control(
def new_bb1_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -336,7 +338,7 @@ def _new_bb1_control(
)


def _new_sk1_control(
def new_sk1_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -415,7 +417,7 @@ def _new_sk1_control(
)


def _new_scrofulous_control(
def new_scrofulous_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -539,7 +541,7 @@ def degrees_to_radians(angle_in_degrees):
)


def _new_corpse_control(
def new_corpse_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -621,7 +623,7 @@ def _new_corpse_control(
)


def _new_corpse_in_bb1_control(
def new_corpse_in_bb1_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -652,7 +654,7 @@ def _new_corpse_in_bb1_control(

See Also
--------
_new_corpse_control, _new_bb1_control
new_corpse_control, new_bb1_control

Notes
-----
Expand Down Expand Up @@ -727,7 +729,7 @@ def _new_corpse_in_bb1_control(
)


def _new_corpse_in_sk1_control(
def new_corpse_in_sk1_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -758,7 +760,7 @@ def _new_corpse_in_sk1_control(

See Also
--------
_new_corpse_control, _new_sk1_control
new_corpse_control, new_sk1_control

Notes
-----
Expand Down Expand Up @@ -828,7 +830,7 @@ def _new_corpse_in_sk1_control(
)


def _new_corpse_in_scrofulous_control(
def new_corpse_in_scrofulous_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down Expand Up @@ -865,7 +867,7 @@ def _new_corpse_in_scrofulous_control(

See Also
--------
_new_corpse_control, _new_scrofulous_control
new_corpse_control, new_scrofulous_control

Notes
-----
Expand Down Expand Up @@ -992,7 +994,7 @@ def degrees_to_radians(angle_in_degrees):
)


def _new_wamf1_control(
def new_wamf1_control(
rabi_rotation: float,
azimuthal_angle: float = 0.0,
maximum_rabi_rate: float = 2.0 * np.pi,
Expand Down