code: def orthonormality(V, ip_B=None):
      
      return norm(numpy.eye(V.shape[1]) - inner(V, V, ip_B=ip_B))
docs: Measure orthonormality of given basis.
  
      :param V: a matrix :math:`V=[v_1,\ldots,v_n]` with ``shape==(N,n)``.
      :param ip_B: (optional) the inner product to use, see :py:meth:`inner`.
  
      :return: :math:`\\| I_n - \\langle V,V \\rangle \\|_2`.