-
Notifications
You must be signed in to change notification settings - Fork 37
Expand documentation for predefined driven controls #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Largely based on the wiki, although some of the references have been fixed, and the description of WAMF1 now more accurately matches the code. https://q-ctrl.atlassian.net/browse/QENG-1118
leoadec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one minor comment about style
| Notes | ||
| ----- | ||
| A BB1 driven control [#]_ consists of four control segments: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, I didn't know [#]_ worked. Very neat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's pretty cool. Could be an option for the api2 docs too (the converter could just convert all the [^n]'s into [#]_s).
| """ | ||
| SCROFULOUS control to compensate for pulse length errors. | ||
| r""" | ||
| Creates a Short Composite ROtation For Undoing Length Over and Under Shoot (SCROFULOUS) driven |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't need to "capitalize the spelled-out form of an acronym unless it's a proper noun" (https://docs.microsoft.com/en-us/style-guide/capitalization)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL, thanks!
| def _new_primitive_control( | ||
| rabi_rotation: float, | ||
| azimuthal_angle: float = 0.0, | ||
| maximum_rabi_rate: float = 2.0 * np.pi, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc translates np.pi to float number, can we disable that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to be a clear way to do this, since Sphinx doesn't even see the fact that it's an np.pi (it gets expanded to its float value as soon as Python loads the module). See https://stackoverflow.com/questions/29257961/sphinx-documentation-how-to-disable-default-argument-expansion too.
tachikoma-li
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
leoadec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just have one final tweak left, for consistency
Co-authored-by: Leonardo Andreta de Castro <leonardo.andreta@q-ctrl.com>
This covers the single qubit driven control library section of the wiki.
Changes are largely based on the wiki, although some of the references
have been fixed, and the description of WAMF1 now more accurately
matches the code.
The styling of the tables isn't great, but I'm hoping that's something that
can be fixed separately on the frontend side.
In a subsequent PR I'll make all these functions public, to be used instead
of
new_predefined_driven_control.Preview: https://qeng-1118.docs.q-ctrl.com/references/python/qctrl-open-controls/qctrlopencontrols.html
(for that preview I've made the functions public, but you get the idea)
https://q-ctrl.atlassian.net/browse/QENG-1118