class_docstr: CosineWindow(wires)
  Prepares an initial state with a cosine wave function.
  
  The wave function is defined below where :math:`m` is the number of wires.
  
  .. math::
  
      |\psi\rangle = \sqrt{2^{1-m}} \sum_{k=0}^{2^m-1} \cos(\frac{\pi k}{2^m} - \frac{\pi}{2}) |k\rangle,
  
  .. 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.
  
  For more details see `Phys. Rev. D 106 (2022) <https://journals.aps.org/prd/abstract/10.1103/PhysRevD.106.034503>`_.
  
  .. seealso:: :class:`~.QuantumPhaseEstimation` and :class:`~.QFT`.
  
  Args:
      wires (Sequence[int] or int): the wire(s) the operation acts on
  
  **Example**
  
  >>> dev = qml.device('default.qubit', wires=2)
  >>> @qml.qnode(dev)
  ... def example_circuit():
  ...     qml.CosineWindow(wires=range(2))
  ...     return qml.probs()
  >>> print(example_circuit())
  [1.87469973e-33 2.50000000e-01 5.00000000e-01 2.50000000e-01]
code: def label(self, decimals=None, base_label=None, cache=None):
      return "CosineWindow"
  
file_path: pennylane/pennylane/templates/state_preparations/cosine_window.py
imports: import numpy
  import pennylane
  from pennylane.operation import StatePrepBase
  from pennylane import math
  from pennylane.wires import Wires, WireError
label_desc: Use image node_id 2 for calling the CosineWindow obj's underlying member method code with example usage: obj.label(decimals, base_label, cache) and returns: str