# Decomposing Hamiltonian into qubit model representation

One of the main applications of VQE is its application to find the approximation to the ground state energy (smallest eigenvalue of the Hamiltonian) for a particular molecule through an iterative method.

To be able to do this, we first need to write the Hamiltonian of the molecule in the second quantization form: $$H_{fer} = \sum h_{pq} a_p^\dagger a_q + \sum h_{pqrs} a_p^\dagger a_q^\dagger a_r a_s$$ then we map $$H_{fer}$$ to $$H_{qubit}$$ by one of the maps (JW, parity, BK) so it's easier to calculate the expectation value. That is

$$H_{fer} = \sum h_{pq} a_p^\dagger a_q + \sum h_{pqrs} a_p^\dagger a_q^\dagger a_r a_s \rightarrow H_{qubit} = \sum_{i\alpha} h^i_\alpha \sigma^i_\alpha + \sum_{ij\alpha \beta} h_{\alpha \beta}^{ij}\sigma_\alpha^i \sigma_\beta^j + ...$$

I understand that the set $$\{\sigma^i\}^{\otimes n}$$ forms a basis for an $$n \times n$$ Hermitian operator so it's reasonable to consider the map from $$H_{fer}$$ to $$H_{qubit}$$

However, the advantage of VQE is to be able to find the min energy in an efficient manner, and to be able to do that one needs to evaluate the expectation value of $$H_{qubit}$$, that is, $$\langle H_{qubit} \rangle$$. To be able to do this, you must make sure that $$H_{qubit}$$ has an efficient decomposition. That is, you don't want to use all $$4^n$$ terms to describe the Hamiltonian... since this will kill off all the efficiency you want to achieve.

So my question is, how do we know that we can always write the Hamiltonian for a particular system in the Pauli matrices basis using only polynomial terms? It turns out that this is true for electronic structure Hamiltonian for a molecule, but why?

Given some arbitrary physical system, how do I know whether I can write out a specific Hamiltonian for that system in a polynomial number of terms for the Pauli decomposition? Can you give me an example where this is not the case?

• Is the question focused on the process of guaranteeing the polynomial size of $H_{qubit}$ given a valid $H_{fer}$ or knowing in the first place that $H_{fer}$ scales polynomially? Sep 11 '20 at 20:45

In general, it's not true that you can always write the Hamiltonian for a particular system in the Pauli matrices basis using only polynomial terms. If you think about it, decomposing a matrix is the same as when you decompose a vector in a basis: it can happen that that vector has only a few components along that basis but in the most general case, its decomposition will have $$N$$ terms. Similarly, a $$N\times N$$ matrix has $$N^2$$ independent entries, so in the most general case, you will need $$N^2$$ terms in your decomposition.

I don't know why that's true for electronic structure Hamiltonian, it probably has to do with the role the Pauli matrices have in chemistry and how they were used to assemble that matrix in the first place.

I suggest you check this answer: Can arbitrary matrices be decomposed using the Pauli basis?. Using that formula you can write a simple code that decomposes any arbitrary matrix of your choice, and you can see how many terms it takes. Obviously, a random matrix will take $$N^2$$, but in general, you might have fewer terms.

Note that this poses a serious limitation on the applicability of VQE outside chemistry: every matrix that has an exponential number of terms in its decomposition will not yield a substantial quantum advantage.

It is true for the electronic structure Hamiltonian you have written - $$H_{\rm{fer}} = \sum h_{pq}a_p^\dagger a_q + \sum h_{pqrs} a_p^\dagger a_q^\dagger a_r a_s$$ because this $$H_{\rm{fer}}$$ is explicitly restricted to two-body interactions, and thus a quartic $$O(n^4)$$ number of terms. All the qubit mappings we use map each term to a constant $$O(1)$$ number of terms, so the qubit Hamiltonian $$H_{\rm{qubit}}$$ is also bounded to a quartic number of terms.

Note that the restriction to two-body interactions is an approximation, but an adequate one since the three-body integrals $$h_{pqrstu}$$ and higher-orders will usually be vanishingly small in chemical systems.