# Hermitian quantum gate's Hamiltonian

Looking the formal solution of Schrödinger's equation:

$$\tag 1 \Psi (t) = \hat{\mathrm T} \exp\left[-i \int \limits_{0}^{t} \hat{H}(t^{\prime})~\mathrm dt^{\prime}\right]\Psi (0), \qquad t>0,$$

I find it hard to understand how a Hermitian gate is physically realised. Because in general: $$\tag 2 \exp\left[-i \int \limits_{0}^{t} \hat{H}(t^{\prime})~\mathrm dt^{\prime}\right]^\dagger \neq \exp\left[-i \int \limits_{0}^{t} \hat{H}(t^{\prime})~\mathrm dt^{\prime}\right]$$ How is Hermitian gate realised them? What is the Hamiltonian for CNOT gate?

• You are aware of the difference between "it can be done" and "it always happens"? Do you still find "I find it hard to understand" a justified statement, or is all you are asking "How can I realize a CNOT"? Not to mentioned that CNOT is unitary and ANY unitary can be obtained from a time evolution. – Norbert Schuch Jul 11 '18 at 22:03
• I think a simple example as in your answer solves my question. I am really missing the phase freedom! @NorbertSchuch – taper Jul 12 '18 at 15:41

The CNOT gate is "its own Hamiltonian", since $\mathrm{CNOT}^2=\mathbb{1}$ and for any $H$ with $H^2=\mathbb{1}$, $$\exp[-iHt] = \cos(t)\,\mathbb{1} - i\,\sin(t)\,H$$ (as can be seen from the Taylor series), so choosing $H=\mathrm{CNOT}$ and $t=\pi/2$ does the job.

• Oh. I think I missed the point that $CNOT\approx i CNOT$ in quantum mechanics! – taper Jul 12 '18 at 15:42
• Well, otherwise you just add a constant $E_0$ to your Hamiltonian such that $\exp[-iE_0 \pi/2]=i$. – Norbert Schuch Jul 12 '18 at 16:04

If I understand the question, what you are asking is how do we find a Hamiltonian which implements a given quantum gate (such as CNOT, Haddamard etc).

Well there are many Hamiltonian's you can find that will do the job. I'll start with the (easy) time independent case. Given an evolution under H implements U after some time and H has no time dependence, it must be true that eigenvectors of H are also eigenvectors of U. By basic counting arguments you should also be able to convince yourself that this works in the other direction as well (eigenvectors of U are the eigenvectors of H). Suppose I have an eigenvector of H which by definition satisfies $H|\lambda\rangle = \lambda |\lambda \rangle$. Then after some time evolution we would have $e^{ i\lambda t / 2 \pi}|\lambda\rangle$. This implies that $U|\lambda\rangle = e^{ i\lambda t / 2 \pi}|\lambda\rangle$. So the procedure to calculate H from U is to diagonalize U into $SDS^{-1}$ and then change all the elements in D over to their phase in the complex plane (divided by whatever evolution time you desire). Simple right.

Now the time dependent case is harder. There is no general, analytic solution. What we have is algorithms which given a few time dependent Hamiltonians $\{ H_0, H_1 ...\}$ will try to generate a sum $a_0 H_0 + a_1 H_1 ...$ which does the job. This is very useful for lab setups where you have access to a handful of time dependent Hamiltonians (eg laser pulses) and you want to find the appropiate combination. The algorithms for doing this are basically gradient decent on the parameter space $\{a_0, a_1 ...\}$. Examples off the top of my head include GOAT and CRAB.

• Hi, I love your general attack on this. Although I could not understand what exactly do you mean by divided by whatever evolution time you desire? – taper Jul 12 '18 at 16:00
• The eigenvalues of U cane be used to compute $\lambda t$. You are free to decrease t by increasing lambda or vice versa. In other words you have a degree of freedom to speed up or slow down your evolution time. Faster evolution times require higher energy. Computation cost in the time resource can be replaced with computation cost in the energy resource. – IIAOPSW Jul 13 '18 at 0:45
• Not to mention that one can add any integer multiple of $2\pi$ to $\lambda t$. The Hamiltonian is highly non-unique. – Norbert Schuch Jul 13 '18 at 10:29