Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling xxz #34

Closed
wants to merge 135 commits into from
Closed

Compiling xxz #34

wants to merge 135 commits into from

Conversation

marekgluza
Copy link
Contributor

@marekgluza marekgluza commented May 30, 2024

This PR delivers the current code which compiles into CNOT+R different DBI strategies:

  1. Start by running https://github.com/qiboteam/boostvqe/blob/compiling_XXZ/notebooks/running_boosting.ipynb
  2. You can explore the different settings:
  • loading of different vqe results based on stating the number of qubits and layers etc
  • target epoch of the VQE circuit that will be boosted
  • how many steps will be evaluated
  • you can use different initializations which use different parametrizations of $D=H(B,J=0)$ or $D=H(B,J)$
  • number of gradient epochs
  • the notebook runs on verbose and visual so it will provide plots and outputs about the performance
  1. The goal of this PR is to have a version of the code which will be evaluated on the cluster
  1. 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

@marekgluza
Copy link
Contributor Author

marekgluza commented Jun 21, 2024

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$
Przechwycenie obrazu ekranu_2024-05-30_05-50-19
can be implemented with the circuit
Przechwycenie obrazu ekranu_2024-05-30_05-51-37

This is a simplification from what Kay was trying to use and found a bug.

  • Please find the error in the notebook in notebooks/Compiling XXZ.ipynb for 2 qubits XXZ
    (Solution from Jeongrak: For 2q there is PBC.)

  • demonstrate that for whatever delta parameter of hamiltonians.XXZ it works by fixing appropriate angles
    Denote by $H^{(a)} = X_aX_{a+1}+ Y_aY_{a+1} + \delta Z_aZ_{a+1}$ and so $H_{XXZ} = \sum_a H^{(a)}$.
    Show that we have $e^{-it H^{(a)}} = e^{-it H_{XXZ, Qibo}}$ where the LHS is decomposed into CNOT and R.

  • demonstrate that it works for whatever time $t$

  • 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$$

  • please demonstrate the polynomial scaling of the error $O(t^2/M)$ @khanhuyengiang please ask Jeongrak

  • compare with a symbolic Hamiltonian .circuit

@marekgluza marekgluza marked this pull request as ready for review June 21, 2024 09:24
@marekgluza
Copy link
Contributor Author

Closing for clarity: we will merge #52 into the master which will be easier to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants