In version 2 of the paper Quantum Circuit Design for Solving Linear Systems of Equations by Cao et al., they have given circuit decomposition for $e^{iA\frac{2\pi}{16}}$, given a particular $A_{4\times 4}$ matrix, in Fig 4. I am trying to find equivalent decomposition for a $2\times 2$ matrix like $A'=\begin{pmatrix} 1.5&0.5\\0.5&1.5 \end{pmatrix}$. Can anyone explain and summarize the standard method for this?
1 Answers
The simplest method to implement $e^{iA\theta}$ for a small, Hermitian matrix $A$ is to:
- Find the eigenvectors $|\lambda\rangle$ and eigenvalues $\lambda$ of $A$.
- Construct the unitary $U=\sum_i|i\rangle\langle\lambda_i|$.
- Implement the gate sequence:
- $U$
- $e^{i\theta\sum_i\lambda_i|i\rangle\langle i|}$
- $U^\dagger$
Now, for one qubit, you have the middle term is equivalent to $e^{i\theta(\lambda_0-\lambda_1) Z}$, up to an irrelevant global phase.
Technically, this answers your question. However, this is a silly way of doing it for solving a system of linear equations. If you can find the eigenvectors of $A$, you might as well directly invert the linear system.
So, instead, you need to proceed as if you cannot directly calculate the eigenvalues/vectors, because you're going to use your implementation of $A$ within a phase estimation protocol to find these. There are various methods for Hamiltonian simulation. A very basic summary of one method (there are much more efficient methods available) is here. But your given example is kind of trivial: I decompose $$ A'=\frac32\mathbb{I}+\frac12X, $$ and since you don't care about a global phase, one might as will implement $e^{i\theta X}$, for whatever the relevant $X$ is. Now it depends on what gates you're allowing in your quantum circuit as to how you decompose it. You might be able to implement it directly. Or, if you've only got a finite gate set such as $H$ and $T$, you might need to apply the Solovay-Kitaev algorithm to get a good decomposition.
- 63,351
- 4
- 57
- 142