Docathon! Docs for discrete pulse functions #3838
Merged
Merged
Conversation
taalexander
previously requested changes
Feb 13, 2020
Contributor
taalexander
left a comment
There was a problem hiding this comment.
Looks great, just some small changes recommended.
SooluThomas
reviewed
Feb 14, 2020
… sphinx table of contents
…yle appearance in the docs. Will need to revisit this once handling of citations is sorted
Co-Authored-By: Thomas Alexander <thomasalexander2718@gmail.com>
Co-Authored-By: Thomas Alexander <thomasalexander2718@gmail.com>
Co-Authored-By: SooluThomas <soolu.elto@gmail.com>
SooluThomas
previously approved these changes
Feb 14, 2020
Member
|
Thank you @DanPuzzuoli |
lcapelluto
suggested changes
Feb 14, 2020
Contributor
lcapelluto
left a comment
There was a problem hiding this comment.
This is wonderful!! Looks so good now when rendered.
I had a minor question about a factor of two, pretty sure we include it. Here is what I mean, from continuous:
def gaussian(times: np.ndarray, amp: complex, center: float, sigma: float,
zeroed_width: Optional[float] = None, rescale_amp: bool = False,
ret_x: bool = False) -> Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]:
times = np.asarray(times, dtype=np.complex_)
x = (times-center)/sigma
gauss = amp*np.exp(-x**2/2).astype(np.complex_)
Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>
Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>
Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>
Contributor
Author
|
Nice catch @lcapelluto, just committed |
lcapelluto
approved these changes
Feb 14, 2020
1 task
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
* adding math functions to doc strings in discrete.py, and messing with sphinx table of contents * further work on function documentation * completed another pass of discrete.py fixing sphinx issues * Updated pulse.rst and pulse/__init__.py to include docs correctly as per @SooluThomas' solution * reshuffling sphinx toc stuff * de-indented the second two lines in citation to avoid the 'header' style appearance in the docs. Will need to revisit this once handling of citations is sorted * Update qiskit/pulse/pulse_lib/discrete.py Co-Authored-By: Thomas Alexander <thomasalexander2718@gmail.com> * Update qiskit/pulse/pulse_lib/discrete.py Co-Authored-By: Thomas Alexander <thomasalexander2718@gmail.com> * Update qiskit/pulse/pulse_lib/discrete.py Co-Authored-By: SooluThomas <soolu.elto@gmail.com> * re-adding doc string to pulse_lib/__init__.py * fixed one more error in the drag function- mathematical description did not include beta * Update qiskit/pulse/__init__.py Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com> * Update qiskit/pulse/pulse_lib/discrete.py Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com> * Update qiskit/pulse/pulse_lib/discrete.py Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com> Co-authored-by: Thomas Alexander <thomasalexander2718@gmail.com> Co-authored-by: SooluThomas <soolu.elto@gmail.com> Co-authored-by: Lauren Capelluto <laurencapelluto@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3392
Summary
Adding math expressions for the functions being sampled in
discrete.py.Details and comments
discrete.pyto include math expressions, along with a couple of jupyter-execute sections for plotting pulses with a simple shape but whose mathematical expression may not be immediately recognizable (or at least weren't to me).pulse.rstandpulse/__init__.pyto include a section in the sphinx pulse toc called Pulse Library, which links to thediscretemodule.