# How to implement a matrix exponential in a quantum circuit?

Maybe it is a naive question, but I cannot figure out how to actually exponentiate a matrix in a quantum circuit. Assuming to have a generic square matrix A, if I want to obtain its exponential, $e^{A}$, i can use the series

$$e^{A} \simeq I+ A+\frac{A^2}{2!}+\frac{A^3}{3!}+...$$

To have its approximation. I do not get how to do the same using quantum gates then apply it for instance to perform an Hamiltonian simulation. Some help?

• It's not clear whether you are talking of a quantum circuit that takes $A$ as input and outputs $e^A$ or Hamiltonian simulation (i.e. build a circuit whose unitary matrix match $e^{iA}$). Commented Jun 27, 2018 at 14:45
• My bad; what I meant is, taken a matrix A, I want to have in my circuit its exponential, $e^{iA}$.
– FSic
Commented Jun 27, 2018 at 17:22

How to perform Hamiltonian Simulation for a generic square matrix $A$?

Quick answer: it is not possible.

The goal of Hamiltonian Simulation (HS) is to find a quantum circuit (i.e. a succession of gates) that acts like $U(t) = e^{-iAt}$ on a quantum state. Here $U(t)$ needs to be unitary (because of the properties of quantum gates) and so $e^{-iAt}$ needs also to be unitary.

So the HS algorithm is only applicable to matrices $A$ such that $e^{-iAt}$ is unitary. Every hermitian matrix satisfy this property, but not every generic square matrix does. Depending on your problem, this limitation may or may not be an issue but you can't use HS if $e^{-iAt}$ is not unitary.

For example for the HHL algorithm (that use HS of $A$ as a subroutine) with a system $Ax=b$, if $e^{-iAt}$ is not unitary you can instead consider the problem $$Cy = \begin{pmatrix} 0 & A \\ A^\dagger & 0 \end{pmatrix} \begin{pmatrix} 0 \\ x\end{pmatrix} = \begin{pmatrix}b \\ 0\end{pmatrix},$$ solve it with HHL (which is now possible because the new matrix $C$ is hermitian) and recover $x$.

So the interesting question is now:

How to perform Hamiltonian Simulation for a given hermitian matrix $A$?

And the answer will depend on the properties of $A$.

This is a huge research topic and there are plenty of things to say on it. I will not present every methods here as they are quite complicated and I did not understand all of them. Here is a list of papers/presentations that are related to HS and that may be interesting to start with HS:

1. Simulating Hamiltonian dynamics on a small quantum computer: slides about HS. Even if it is a presentation, this is the most complete source I found on Hamiltonian Simulation. It presents quickly 3 different methods and cites interesting papers for each method.
2. Lecture Notes on Quantum Algorithms (Andrew M. Childs, 2017): recent and rather complete. HS is discussed in chapter 25 (page 123).
3. Exponential improvement in precision for simulating sparse Hamiltonians: presents in details one of the 3 methods presented in 1.
4. Efficient quantum algorithms for simulating sparse Hamiltonians: presents in details another of the 3 methods presented in 1.
• Thank you, especially for the references, I will take a look at them!
– FSic
Commented Jun 28, 2018 at 12:32
• I recommend you to start with the first reference. It's the most complete and it gives link to other articles. For me (personal point of view), the first technique using Trotter-Suzuki formula is the most understandable. But it may not be the same for you! Commented Jun 28, 2018 at 12:40
• Every hermitian matrix satisfy this property: more specifically, all and only Hermitian matrices have this property
– glS
Commented Jul 6, 2018 at 12:35