# General Shape of the Hamiltonian for a Desired Unitary

Suppose that, the unitary(the gate) that we want to have is 8*8 matrix. Now I want to write the most general shape of the Hamiltonian for my unitary and I want to prove that the unitary can be implemented by the Hamiltonian?

How can I do that? How to define mathematically the minimum requirements of the Hamiltonian?

• If you look for a Hamiltonian $H$ such that its time evolution gives your unitary $U=e^{-iHt}$, you can do the following. In the diagonal basis a unitary has the form $U=\sum_ne^{i\phi_n}|n\rangle\langle n|$. Choosing $H=-\sum_n\frac{\phi_n}{t} |n\rangle\langle n|$ will do it. Jul 11 at 14:09
• Thanks for the answer. Forgive my ignorence but how to show for example if A_1*S1*e is suitable for this type of HAmiltonian or not? What phi_n represents in the equation Jul 12 at 0:02
• All eigenvalues $\lambda_n$ of a unitary satisfy $|\lambda_n|=1$ and can be represented as $\lambda_n=e^{\phi_n}$ with real $\phi_n$, so I just wrote the most general unitary in the diagonal basis. If you want a matrix that this unitary is an exponent of (Hamiltonian) you can explicitly construct it in the same basis. I'm not sure what you mean by A_1S1*e. Jul 12 at 13:20
• Excellent, thanks for the answer. One more question, when I want to show that to construct this unitary two body interaction Hamiltonian is enough, can I use the same method? Jul 13 at 3:38
• This is more difficult I think. In principle, any quantum circuit can be decomposed into local gates and in this sense any Hamiltonian can be represented as a sequence of local interactions. However, for highly nonlocal Hamiltonians the decomposition may be impractically (exponentially) large. Jul 13 at 9:25