qiboteam / qibo

A framework for quantum computing
https://qibo.science
Apache License 2.0
283 stars 55 forks source link

Double-bracket iterations #1034

Closed marekgluza closed 9 months ago

marekgluza commented 11 months ago

Context

In https://arxiv.org/abs/2206.11772 I proposed something that I will refer to below as a double-bracket iteration (DBI) quantum algorithms, in particular they can be applied to the task of diagonalization and eigenstate preparation.

My code https://github.com/marekgluza/double_bracket_flow_as_a_diagonalization_quantum_algorithm/ exemplifies what DBIs can do, in particular it showcases the expressive power of DBI quantum circuits. In this feature request I will motivate why it is realistic to add it to QIBO.

Short definition of DBI

Let $D_k$ be a sequence of operators diagonal in the computational basis and let $s_k$ be a sequence of numbers which will serve as DBI recursion step durations. A variational diagonalizing DBI for some input Hamiltonian $H0$ is a recursion for $k\ge 0$ with the recursion step given by $$H{k+1} = e^{s_k W_k} H_k e^{-s_k W_k}\ , $$ where $$W_k = [D_k, H_k] = D_k H_k - H_k D_k\ .$$

It can be shown that there exist $D_k$'s and $sk$'s such that the magnitude of the off-diagonal terms in $H{k+1}$ are smaller than those of $H_k$ as captured by the $2$-norm. Such a DBI is a sequence of unitary rotations so it is a diagonalization iteration.

Feature 1: Group commutators

Define the unitary $$V = e^{i s D_0}e^{i s H_0}e^{-i s D_0}e^{-i s H_0}$$ then if $s=s_0$ we have an approximation to the first DBI recursion step $$|| H_1 - V H_0 V^\dagger|| = O(s^3)$$

Adding a module allowing to work with group commutators will allow to additionally explore compiling, cf Solovay-Kitaev algorithm.

Feature 2: Unfolding frame-shifting covariant quantum recursions.

Let $\left(Qk\right){k=0,\ldots K}$ by $K$ unitary matrices $U(d)$ of dimension $d$ and define $U^{(\cdot)}: U(d) \rightarrow U(d)$ which maps $$U(d) \ni \psi \mapsto U^{(\psi)} = Q_0 \psi Q_1 \psi Q_2 \ldots \psi Q_K\ .$$ This gives rise to quantum recursions which are covariant under frame shifting in the sense that for an initial state $$|\psi_0\rangle = \psi_0 |0\rangle$$ with some reference state $|0\rangle$ we have the first quantum recursion step induced by $U^{(\cdot)}$ $$|\psi_1\rangle = U^{(\psi_0)}|\psi_0\rangle = Q_0 \psi_0 Q_1 \psi_0 Q_2 \ldots \psi_0 Q_K\psi_0 |0\rangle$$ What is nice is that we can now shift the frame $$|\psi_2\rangle = U^{(\psi_1)}|\psi_1\rangle = Q_0 \psi_1 Q_1 \psi_1 Q_2 \ldots \psi_1 Q_K\psi_1 |0\rangle$$ where $\psi_1 = Q_0 \psi_0 Q_1 \psi_0 Q_2 \ldots \psi_0 Q_K \psi_0$ such that again $|\psi_1\rangle = \psi_1 |0\rangle$. In other words we shifted the frame in that the state preparation oracle was updated $\psi_0 \rightarrow\psi_1= U^{(\psi_0)}\psi_0$ and the form of the recursion proved to be covariant. Proceeding in this fashion we get a quantum recursion for all $k\ge 0$.

Unfolding of such a quantum recursion is a circuit which involves only queries to $\left(Qk\right){k=0,\ldots K}$ and $\psi_0$.

Feature 3: Unitary evolution oracles

There are a few models which have a different underlying physical setting but in QIBO could play out to serve the same purpose: apply $e^{-itH_0}$ to an input state $|\psi_0\rangle$. Any of these should work with the DBI module because DBIs work with oblivious quantum evolution oracles. F For example above we saw how to turn evolutions under an input Hamiltonian into a diagonalizing iteration and it was oblivious to the structure of $H_0$.

Possible unitary evolution oracles:

marekgluza commented 7 months ago

@scarrazza thanks for the comment: here it is #1198