Closed marekgluza closed 4 months ago
Hi @marekgluza and @jeongrak-son, I have pushed the concise compiling code, see compiling_XXZ.py
and compiling_XXZ_test.py
. Please check and let me know if there is any issue. Thanks!
For future reference moving here our description of a previous feature:
Following Vatan and Williams https://arxiv.org/pdf/quant-ph/0308006
the 2 qubit Heisenberg gate defined in their notation as $N$ can be implemented with the circuit
This is a simplification from what Kay was trying to use and found a bug.
[x] Please find the error in the notebook in notebooks/Compiling XXZ.ipynb for 2 qubits XXZ (Solution from Jeongrak: For 2q there is PBC.)
[x] demonstrate that for whatever delta parameter of hamiltonians.XXZ
it works by fixing appropriate angles
Denote by $H^{(a)} = XaX{a+1}+ YaY{a+1} + \delta ZaZ{a+1}$ and so $H_{XXZ} = \suma H^{(a)}$.
Show that we have $e^{-it H^{(a)}} = e^{-it H{XXZ, Qibo}}$ where the LHS is decomposed into CNOT and R.
[x] demonstrate that it works for whatever time $t$
[x] generalize the code to make a CNOT+R circuit which implements 1 and then M steps of the Trotter-Suzuki decomposition for $L$ qubits $$e^{-it H_{XXZ, Qibo}}=( \prod_a e^{-it/M H^{(a)}})^M$$
[x] please demonstrate the polynomial scaling of the error $O(t^2/M)$ @khanhuyengiang please ask Jeongrak
[ ] compare with a symbolic Hamiltonian .circuit
Closing for clarity: we will merge #52 into the master which will be easier to review
This PR delivers the current code which compiles into CNOT+R different DBI strategies:
Start by running https://github.com/qiboteam/boostvqe/blob/compiling_XXZ/notebooks/running_boosting.ipynb
You can explore the different settings:
The goal of this PR is to have a version of the code which will be evaluated on the cluster
This PR doesn't deliver systematic plots and storing - this remains to be done in the load_vqe.py conventions
Please review with priority - we need to run using this stuff asap so that we have results that we can discuss at TII.
Thanks @Sam-XiaoyueLi for helping out!
Also, thanks @khanhuyengiang @jeongrak-son and @shangtai for contributions