Skip to content

Commit

Permalink
image
Browse files Browse the repository at this point in the history
  • Loading branch information
KetpuntoG committed Oct 16, 2023
1 parent fd23ba9 commit 4327304
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion pennylane/templates/state_preparations/cosine_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ class CosineWindow(StatePrepBase):
.. math::
|\psi\rangle = \sqrt{2^{1-m}}\frac{\sqrt{2}}{\sqrt{2^m}} \sum_{k=0}^{2^m-1} \cos(\frac{\pi k}{2^m} - \frac{\pi}{2}) |k\rangle,
|\psi\rangle = \sqrt{2^{1-m}} \sum_{k=0}^{2^m-1} \cos(\frac{\pi k}{2^m} - \frac{\pi}{2}) |k\rangle,
where :math:`m` is the number of wires.
.. figure:: ../../_static/templates/state_preparations/cosine_window.png
:align: center
:width: 65%
:target: javascript:void(0);
.. note::
The wave function is shifted by :math:`\frac{\pi}{2}` units so that the window is centered.
Expand Down

0 comments on commit 4327304

Please sign in to comment.