docs: def bra(i, Ne):
      r"""This function returns the transpose of the i-th element of the
      canonical basis of a Hilbert space of dimension Ne (in the form of a
      row vector).
  
      >>> bra(2,4)
      Matrix([[0, 1, 0, 0]])
  
      This will return an error if i is not in [1 .. Ne]:
  
      >>> bra(5,3)
      Traceback (most recent call last):
      ...
      ValueError: i must be in [1 .. Ne].
  
      """
      if i not in range(1, Ne+1):
          raise ValueError("i must be in [1 .. Ne].")
      return Matrix([KroneckerDelta(i-1, j) for j in range(Ne)]).transpose()