# 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? – C. Kang 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 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.