docs: def sigma_operator_indices(A):
      r"""If A is an outer-product type operator |a><b| return a, b.
  
      >>> sig = ket(2, 3)*bra(1, 3)
      >>> sigma_operator_indices(sig)
      (1, 0)
      >>> sigma_operator_indices(sig+sig.adjoint())
      (None, None)
  
      """
      Ne = A.shape[0]
      band = True
      if sum(A) != 1:
          band = False
  
      a = None; b = None
      for i in range(Ne):
          for j in range(Ne):
              if A[i, j] == 1:
                  a = i; b = j
              elif A[i, j] != 0:
                  band = False
      if band:
          return a, b
      else:
          return None, None