7

I am experimenting with https://journals.aps.org/prx/pdf/10.1103/PhysRevX.8.041015 and in equation 36 I find that they use the norm of the Hamiltonian.

Is there a clean way to compute it, or an upper bound lower than $\lambda = \sum_j |w_j|$ for the Hamiltonian $H = \sum_j w_j H_j$ and $H_j$ unitary, other than taking the Jordan-Wigner or Bravyi Kitaev, constructing the matrix and finding the norm of the matrix?

I expect this way to be quite slow and would avoid it if possible, but do not see how. Extra points if can be done cleanly using OpenFermion (notice that OpenFermion helps with DiagonalCoulombOperator but not in any other case). Thanks!

Pablo
  • 603
  • 3
  • 11

1 Answers1

6

The spectral norm $\|H\|$ (sometimes denoted$^1$ $\|H\|_2$ or $\|H\|_\infty$) in this case is the largest eigenvalue of $H$. There's no meaningful bound for this number without having additional details about the system. On the other hand if you are indeed working in a basis where $H$ is diagonal than the spectral norm is trivially the largest diagonal element.

In Openfermion the largest eigenvalue is very easy to compute by defining an operator H containing your Hamiltonian and then finding the largest number returned by

openfermion.linalg.eigenspectrum(H)

However this is wasting a lot of resources since you only need the largest eigenvalue. A more efficient route would probably be to cast H as a sparse matrix and then use scipy's sparse utilities to get only the largest eigenvalue:

sparse_mat = openfermion.get_sparse_operator(H)
max_eigenvalue, _ = scipy.sparse.linalg.eigsh(sparse_mat, k=1, which="LM")

Those keyword arguments tell scipy to find the one eigenvalue with the Largest Magnitude. This runs faster than computing the entire spectrum of $H$ and so it might be suitable for your needs. However, depending on the structure of $H$ it might be more prudent to use a dense eigensolver, in which case you can take a look at this question for an alternative approach.


$^1$Also called "induced L2 norm" as $\|A\|_2 \equiv \max_{\|u\|_2=1} \|Au\|_2$, which is why I chose the subscript "2". But be careful though as sometimes $\|\cdot\|_2$ will sometimes denote "Frobenius norm" which is another name for the Schatten 2-norm. All of these are good reasons to always explicitly describe the norm you are talking about.

Adam Zalcman
  • 25,770
  • 3
  • 43
  • 95
forky40
  • 8,168
  • 2
  • 13
  • 33