wavepacket.operator =================== .. py:module:: wavepacket.operator .. autoapi-nested-parse:: This module contains classes that define operators on a given grid. .. !! processed by numpydoc !! Classes ------- .. autoapisummary:: wavepacket.operator.OperatorBase wavepacket.operator.CartesianKineticEnergy wavepacket.operator.PlaneWaveFbrOperator wavepacket.operator.FbrOperator1D wavepacket.operator.RotationalKineticEnergy wavepacket.operator.Projection wavepacket.operator.Constant wavepacket.operator.TimeDependentOperator wavepacket.operator.LaserField wavepacket.operator.Potential1D Package Contents ---------------- .. py:class:: OperatorBase(grid: wavepacket.grid.Grid, time_dependent: bool) Bases: :py:obj:`abc.ABC` Base class of an operator. An operator can be applied to a wave function or from the left or right to a density operator. It is defined on a grid, and can only operate on states on that grid. :Parameters: **grid** : wp.grid.Grid The grid on which the operator is defined. Particular operators may require additional parameters. **time_dependent: bool** If the operator is time-dependent or not. :Attributes: **grid: wp.grid.Grid** The grid on which the operator is defined. **time_dependent: bool, readonly** If the operator is time-dependent or not. Some functionality may not work for time-dependent operators. .. !! processed by numpydoc !! .. py:attribute:: grid :type: Final[wavepacket.grid.Grid] .. py:attribute:: time_dependent :type: Final[bool] .. py:method:: apply(state: wavepacket.grid.State, t: float) -> wavepacket.grid.State Applies the operator onto a wave function or a density operator from the left. This is a convenience function if you just want to apply the operator without detailed knowledge of the state. :Parameters: **state** : wp.grid.State The state that the operator is applied on. **t** : float The time at which the operator is applied. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wp.grid.State The result of applying the operator on the state. :Raises: wp.BadGridError If the state's grid does not match the grid of the operator. wp.BadStateError If the state is neither a wave function nor a density operator. .. !! processed by numpydoc !! .. py:method:: apply_to_wave_function(psi: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData :abstractmethod: Applies the operator on a wave function. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **psi** : wpt.ComplexData The coefficients describing the wave function on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting wave function. .. !! processed by numpydoc !! .. py:method:: apply_from_left(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData :abstractmethod: Applies the operator on a density operator from the left. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:method:: apply_from_right(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData :abstractmethod: Applies the operator on a density operator from the right. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:class:: CartesianKineticEnergy(grid: wavepacket.grid.Grid, dof_index: int, mass: float, cutoff: float | None = None) Bases: :py:obj:`PlaneWaveFbrOperator` Convenience class that implements the common Cartesian kinetic energy operator. The form of the operator is :math:`-\frac{1}{2m} \ \frac{\partial^2}{\partial x^2}`. It requires the degree of freedom to be a :py:class:`wavepacket.grid.PlaneWaveDof`. :Parameters: **grid** : wp.grid.Grid The grid on which the operator is defined. **dof_index** : int Degree of freedom along which the operator acts **mass** : float The mass of the particle. **cutoff: float | None, default=None** If set, truncate all operator values whose real value is above the cutoff. Default is not to truncate. :Attributes: **mass: float, readonly** The mass of the particle :Raises: wp.InvalidValueError If the mass is not positive, or if the degree of freedom does not describe a plane wave expansion. .. !! processed by numpydoc !! .. py:attribute:: mass :type: Final[float] .. py:class:: PlaneWaveFbrOperator(grid: wavepacket.grid.Grid, dof_index: int, generator: wavepacket.typing.Generator, cutoff: float | None = None) Bases: :py:obj:`wavepacket.operator.operatorbase.OperatorBase` Base class for one-dimensional operators that are diagonal in a plane wave basis. The :py:class:`wavepacket.grid.PlaneWaveDof` describes an expansion of the wave function in plane waves. In the corresponding FBR, derivatives are diagonal and essentially transform into a multiplication with the wave vector / FBR grid. Functionally, this operator is identical to :py:class:`wavepacket.operator.FbrOperator1D`, but uses the faster FFT transformation instead of a matrix multiplication. :Parameters: **grid** : wp.grid.Grid The grid on which the operator is defined. **dof_index** : int The degree of freedom along which the operator is defined. **generator** : wpt.Generator A callable that gives the operator value for each FBR point. **cutoff: float | None, default None** If set, truncate all operator values whose real value is above the cutoff. Default is not to truncate. :Raises: wp.InvalidValueError If the supplied degree of freedom is not a plane wave expansion. .. !! processed by numpydoc !! .. py:method:: apply_to_wave_function(psi: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a wave function. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **psi** : wpt.ComplexData The coefficients describing the wave function on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting wave function. .. !! processed by numpydoc !! .. py:method:: apply_from_left(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the left. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:method:: apply_from_right(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the right. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:class:: FbrOperator1D(grid: wavepacket.grid.Grid, dof_index: int, generator: wavepacket.typing.Generator, cutoff: float | None = None) Bases: :py:obj:`wavepacket.operator.operatorbase.OperatorBase` Base class for one-dimensional operators that are diagonal in the FBR. Whereas :py:class:`wavepacket.operator.Potential1D` describes potentials, which can be multiplied with a wave function or density operator at each grid point, this class describes operators that can be multiplied with a state at each FBR grid point. Examples would be a rotational kinetic energies along individual degrees of freedom. The numerics boil down to a matrix multiplication along the respective degree of freedom. For a faster alternative along plane wave degrees of freedom, see :py:class:`wavepacket.operator.PlaneWaveFbrOperator` :Parameters: **grid** : wp.grid.Grid The grid on which the operator is defined. **dof_index** : int Degree of freedom along which the operator acts **generator** : wpt.Generator A callable that gives the operator value for each FBR point. **cutoff: float | None, default None** If set, truncate all operator values whose real value is above the cutoff. Default is not to truncate. .. !! processed by numpydoc !! .. py:method:: apply_to_wave_function(psi: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a wave function. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **psi** : wpt.ComplexData The coefficients describing the wave function on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting wave function. .. !! processed by numpydoc !! .. py:method:: apply_from_left(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the left. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:method:: apply_from_right(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the right. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:class:: RotationalKineticEnergy(grid: wavepacket.grid.Grid, dof_index: int, inertia: float, cutoff: float | None = None) Bases: :py:obj:`FbrOperator1D` Convenience class that implements a typical rotational kinetic energy term. The form of the operator is :math:`-\frac{\hat L^2}{2I}` in terms of the angular momentum operator and a moment of inertia. It requires the degree of freedom to be a :py:class:`wavepacket.grid.SphericalHarmonicsDof`. :Parameters: **grid** : wp.grid.Grid The grid on which the operator is defined. **dof_index** : int Degree of freedom along which the operator acts **inertia** : float The fixed moment of inertia of the rotor. **cutoff: float | None, default None** If set, truncate all operator values whose real value is above the cutoff. Default is not to truncate. :Attributes: **inertia: float, readonly** The fixed moment of inertia of the rotor. **Raises** .. **------** .. **wp.InvalidValueError** If the moment of inertia is not positive, or if the degree of freedom does not describe a spherical harmonics expansion. .. !! processed by numpydoc !! .. py:attribute:: inertia :type: Final[float] .. py:class:: Projection(basis: wavepacket.grid.State | Sequence[wavepacket.grid.State]) Bases: :py:obj:`wavepacket.operator.operatorbase.OperatorBase` Projects onto a subspace defined by one or more basis functions. This class represents an idempotent projection operator, :math:`\hat P = \sum_i |\psi_i\rangle\langle\psi_i|`, where the basis functions :math:`\psi_i` span the subspace on which the operator projects. The basis functions need not be orthogonal, they are orthonormalized using :func:`wp.orthonormalize`. :Parameters: **basis: wp.grid.State | Sequence[wp.grid.State]** The basis functions :math:`\psi_i` that span the subspace onto which the operator projects. Need not be orthogonal, but should be linearly independent. In case of one basis function, it can be supplied directly without a list. :Raises: wp.BadStateException Thrown if any basis function is not a wave function or has norm zero. wp.InvalidValueError Thrown if no basis functions are supplied. .. seealso:: :obj:`wavepacket.grid.population` if you only want to calculate the population of some states. .. !! processed by numpydoc !! .. py:method:: apply_to_wave_function(psi: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a wave function. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **psi** : wpt.ComplexData The coefficients describing the wave function on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting wave function. .. !! processed by numpydoc !! .. py:method:: apply_from_left(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the left. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:method:: apply_from_right(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the right. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:class:: Constant(grid: wavepacket.grid.Grid, value: complex) Bases: :py:obj:`wavepacket.operator.operatorbase.OperatorBase` Operator that encapsulates a simple constant. Normally, you will not use this operator directly. It is only a wrapper to enable numbers where an operator is expected, in particular when doing operator arithmetic. :Parameters: **grid: wp.grid.Grid** The grid on which this operator is defined. **value: complex** The value that this operator wraps. :Attributes: **value: complex, readonly** The wrapped value. .. !! processed by numpydoc !! .. py:attribute:: value :type: Final[complex] .. py:method:: apply_to_wave_function(psi: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a wave function. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **psi** : wpt.ComplexData The coefficients describing the wave function on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting wave function. .. !! processed by numpydoc !! .. py:method:: apply_from_left(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the left. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:method:: apply_from_right(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the right. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:class:: TimeDependentOperator(grid: wavepacket.grid.Grid, func: Callable[[float], complex]) Bases: :py:obj:`wavepacket.operator.operatorbase.OperatorBase` Wrapper for general time-dependent functions, usually laser fields. This operator gets a function f(t), and simply multiplies the input state with the function. It gets a full function f(t), which may also be complex. :Parameters: **grid: wp.grid.Grid** The grid on which this operator acts. **func: Callable[[float], float]** Functions that returns a potentially complex value for a given input time. .. !! processed by numpydoc !! .. py:method:: apply_to_wave_function(psi: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a wave function. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **psi** : wpt.ComplexData The coefficients describing the wave function on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting wave function. .. !! processed by numpydoc !! .. py:method:: apply_from_left(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the left. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:method:: apply_from_right(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the right. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:class:: LaserField(grid: wavepacket.grid.Grid, max_field: float, shape: Callable[[float], float], omega: float, phi: float = 0) Bases: :py:obj:`TimeDependentOperator` Operator that describes a common laser field. A usual laser field is defined as :math:`E(t) = E_0 f(t) \cos(\omega t + \phi)` in terms of the maximum field E_0, the pulse shape f, angular frequency omega and initial phase phi. This class is meant as a shorthand for common models. If you want to model more complex laser fields, define them in a separate function and supply it directly to the :py:class:`wavepacket.operator.TimeDependentOperator` base class. :Parameters: **grid: wp.grid.Grid** The grid on which this operator acts. **max_field: float** The maximum field strength E_0 **shape: Callable[[float], float]** The pulse shape f(t). For easier use, it should be normalized to a maximum value of 1. Wavepacket comes with several predefined shapes, such as :py:class:`wavepacket.Lorentzian`. **omega: float** The angular frequency omega **phi: float, default=0** The initial phase of the pulse .. !! processed by numpydoc !! .. py:class:: Potential1D(grid: wavepacket.grid.Grid, dof_index: int, generator: wavepacket.typing.Generator, cutoff: float = None) Bases: :py:obj:`wavepacket.operator.operatorbase.OperatorBase` Operator that represents a real-valued one-dimensional potential. Within the DVR approximation [Reb00f2ab5b8e-1]_, potential energy operators are diagonal in the DVR. That is, they are completely described by a value for each grid point. :Parameters: **grid** : wp.grid.Grid The grid on which the operator is defined **dof_index** : int the index of the degree of freedom along which the potential is defined. **generator** : wpt.Generator A callable that generates a potential energy value for each grid point of the respective DOF. Potential energy values may be complex, then the imaginary part describes absorption or emission of the wave function. **cutoff: float, default=None** If set, defines the maximum potential value. Values larger than the cutoff are set to the cutoff. For complex potentials, only the real part is truncated. .. rubric:: References .. [Reb00f2ab5b8e-1] https://sourceforge.net/p/wavepacket/wiki/Numerics.DVR> .. only:: latex [Reb00f2ab5b8e-1]_ .. rubric:: Examples Creation of a square potential along the grid's second degree of freedom >>> grid = ... >>> harmonicPotential = wp.operator.Potential1D(grid, 1, lambda x: x**2) .. !! processed by numpydoc !! .. py:method:: apply_to_wave_function(psi: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a wave function. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **psi** : wpt.ComplexData The coefficients describing the wave function on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting wave function. .. !! processed by numpydoc !! .. py:method:: apply_from_left(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the left. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !! .. py:method:: apply_from_right(rho: wavepacket.typing.ComplexData, t: float) -> wavepacket.typing.ComplexData Applies the operator on a density operator from the right. This function is mainly for Wavepacket-internal use. It ignores most error handling (usually done by the wrapping :py:class:`wavepacket.expression.ExpressionBase`), and operates directly on coefficients to avoid the creation of temporary states. :Parameters: **rho** : wpt.ComplexData The coefficients describing the density operator on which the operator acts. **t** : float The time at which the operator should be evaluated. Only really needed for time-dependent operators, but to keep the interface uniform, this parameter is required. :Returns: wpt.ComplexData The coefficients of the resulting density operator. .. !! processed by numpydoc !!