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!

  • 2
    $\begingroup$ It is generally preferable to have posts be as self-contained as possible. Feel free to edit the question to add the necessary missing details. For example, what is $\lambda$ here? What type of norm are you asking about? And what kind of Hamiltonian are you interested about? $\endgroup$
    – glS
    Apr 12, 2021 at 20:23

1 Answer 1


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


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.

  • $\begingroup$ For Hamitonians you want to use the operator norm. This is indeed the largest eigenvalue (for hermitian operators), but why do you write $\|H\|_2$?? This is not standard for denoting the operator norm induced by the L2 norm, I believe. $\endgroup$ Apr 14, 2021 at 21:36
  • $\begingroup$ Given that its an induced norm i think it makes perfect sense to indicate what induces it. It also makes sense in the context of calling this a "matrix 2-norm" which is common terminology relevant since my answer is specifically about a matrix representation of an operator. I explicitly explained in my answer that this isn't a universal notation, but a quick google search of "induced L2 norm" reveals many, many course notes and other reputable materials using the exact same notation. $\endgroup$
    – forky40
    Apr 14, 2021 at 23:30
  • $\begingroup$ The notation feels rather uncommon to me. I would denote induced operator norms as $\|\cdot\|_{p\to q}$. Otherwise I would read $\|\cdot\|_p$ as the Schatten p norm, i.e. the norm you talk about would be $\|\cdot\|_\infty$. (Also, saying which norm induces an operator norm is only relevant when there are different underlying norms in play, which seems less common?) $\endgroup$ Apr 15, 2021 at 11:00
  • $\begingroup$ Fair enough, I've edited the question to reflect that there are many notations one can use. $\endgroup$
    – forky40
    Apr 22, 2021 at 19:48
  • 1
    $\begingroup$ +1 Good answer, but AFAICT, we don't have a guarantee that $H$ is positive semi-definite, so the spectral norm is the largest absolute value of the eigenvalues of $H$. $\endgroup$ Apr 26, 2021 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.