# Is there a systematic way how to generate the Hamiltonian from a given circuit?

If I have a designed circuit to solve a particular problem. Is there a systematic way how to generate the Hamiltonian from it?

• Can you show the circuit (or a portion of it?) you can reconstruct it but may depend on the circuits complexity Feb 15, 2021 at 7:14
• You mean you're specifying a unitary $U$ that you want to implement as a circuit, and you would like to convert that into a Hamiltonian $H$ such that $U=e^{iHt}$? If so, the simple answer is: no. Feb 15, 2021 at 7:55
• @kang it is basically a combination of grovers and QPE Feb 15, 2021 at 14:30
• @DaftWullie, we know we can go from $H$ to something very close to $U$ for nice enough hamiltonians (e.g. $k$-sparse with oracle access), but in what sense is this not reversible? Is it too under-specified? Feb 16, 2021 at 1:47
• @MarkS For example, even if we first computed $U$ (which would entirely miss the point of computing!), of course we could evaluate $H=-i\ln U$. However, there is a lot of freedom here to modify the $H$, because you can add arbitrary multiples of $2\pi$ to each eigenvalue, and there's even more freedom if the eigenvalues of $U$ are not unique. How you control those choices in order to impose some sort of reasonable properties on the Hamiltonian structure is a horrific question. Feb 16, 2021 at 7:35