qiboteam / boostvqe

Using DBI to boost VQE optimization
4 stars 1 forks source link

Boostvqe status #10

Closed Edoardo-Pedicillo closed 2 weeks ago

Edoardo-Pedicillo commented 9 months ago

Screenshot from 2024-01-18 17-50-13

The image above is generated using the Hamiltonian $\mathit{H}$ of the XXZ model for six qubits and a VQE $U(\theta)$ with 6 qubits and one layer.

The blue line is the expectation value of the Hamiltonian during the VQE training, i.e., we want to find the $\overrightarrow{\theta}$ such that

$$ \min_{\overrightarrow{\theta}} \langle 0 | U^{\dagger}(\overrightarrow{\theta})~H~U(\overrightarrow{\theta}) | 0 \rangle $$

The VQE is trained until it gets stuck and is not able to decrease the energy further. We can interpret $H' = U^{\dagger}(\overrightarrow{\theta{\text{best}}})HU(\overrightarrow{\theta{\text{best}}})$ as our new Hamiltonian. At this point, we apply n DBI steps

$$ H'_{\text{new}} = V^{\dagger}~H'~V $$

where $V = V_1V_2 ... Vn$ collects all the DBI steps. The yellow dashed line represents the expectation value of the new Hamiltonian ($\langle 0 | H{\text{new}} | 0 \rangle$) after ten DBI steps, each one performing optimization on the step size.

After the DBI steps, we continue with the VQE training (green line), i.e.

$$ \min{\overrightarrow{\theta}} \langle 0 | U^{\dagger}(\overrightarrow{\theta})~H'{\text{new}}~U(\overrightarrow{\theta}) | 0 \rangle $$

In the last training, the first guess of $\overrightarrow{\theta}$ is the one that satisfies the equation $U(\theta_{\text{guess}}) = \mathbb{I}$ ( in our case $\overrightarrow{\theta} = \overrightarrow{0}$ ); in this way, the VQE starts to explore near the configuration found by the DBI.

MatteoRobbiati commented 9 months ago

What if we use $N_{\rm steps} \leq 5$? Discussing with @marekgluza he pointed out 10 steps leads to a huge overhead with the future unfolding transpilation approach.

marekgluza commented 8 months ago

@Edoardo-Pedicillo @MatteoRobbiati @andrea-pasquale

The recap of the meeting is in #15 where diagnostics are described.

Zoe said though that before looking at that more deeply do #23 so train VQE with inclusion of shot noise modelling what would happen if you train from scratch on quantum hardware. Do you have experience with that?

The idea is that VQE will perform worse because shot noise will limit how much you will be able to decrease the loss function. If DBI takes that 'noisy' VQE unitary and takes over to decrease further algorithmically then it will be a nice qualitative showcasing of the methods coming together.

Next, please let me know

I will get in touch with Kosuke and Kishor still. The zoom tomorrow you can safely skip and you will see the results once there will be some PRs :)