parameters: (
      hilbert: _AbstractHilbert, site: int, dtype: _DType = float
  )
return_statement: return _LocalOperator(hilbert, mat, [site], dtype=dtype)
docstring: Builds the boson destruction operator :math:`\\hat{a}` acting on the `site`-th of
      the Hilbert space `hilbert`.
  
      If `hilbert` is a non-Bosonic space of local dimension M, it is considered
      as a bosonic space of local dimension M.
  
      Args:
          hilbert: The hilbert space
          site: the site on which this operator acts
  
      Returns:
          The resulting Local Operator
docstring_summary: Builds the boson destruction operator :math:`\\hat{a}` acting on the `site`-th of
      the Hilbert space `hilbert`.
docstring_tokens: Builds the boson destruction operator : math : \\ hat { a } acting on the site - th of the Hilbert space hilbert .
function: def destroy(
      hilbert: _AbstractHilbert, site: int, dtype: _DType = float
  ) -> _LocalOperator:
      """
      Builds the boson destruction operator :math:`\\hat{a}` acting on the `site`-th of
      the Hilbert space `hilbert`.
  
      If `hilbert` is a non-Bosonic space of local dimension M, it is considered
      as a bosonic space of local dimension M.
  
      Args:
          hilbert: The hilbert space
          site: the site on which this operator acts
  
      Returns:
          The resulting Local Operator
      """
      import numpy as np
  
      N = hilbert.size_at_index(site)
  
      D = np.array([np.sqrt(m) for m in np.arange(1, N)])
      mat = np.diag(D, 1)
      return _LocalOperator(hilbert, mat, [site], dtype=dtype)
function_tokens: def destroy ( hilbert : _AbstractHilbert , site : int , dtype : _DType = float ) -> _LocalOperator : import numpy as np N = hilbert . size_at_index ( site ) D = np . array ( [ np . sqrt ( m ) for m in np . arange ( 1 , N ) ] ) mat = np . diag ( D , 1 ) return _LocalOperator ( hilbert , mat , [ site ] , dtype = dtype )