-
Notifications
You must be signed in to change notification settings - Fork 66
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
Create getting started notebook #776
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There seem to be some formatting issues, the ReviewNB rendering looked weird and the RTD build failed with some warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A first review of the tutorial
@ferulli1pasqal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking quite nice! Now it would be good to fix the RTD build so we can check what it will look like in the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's go 🚀
tutorials/creating_sequences.ipynb
Outdated
"To reach the desired antiferromagentic state, we can take advantage of the [adiabatic theorem](https://en.wikipedia.org/wiki/Adiabatic_theorem). The idea is to use a time-dependent Hamiltonian that changes slowly so that the system stays in its ground state. Therefore, we must choose a final Hamiltonian that has the antiferromagnetic state as its ground state.\n", | ||
"\n", | ||
"This final Hamiltonian should simultaneously favor having the largest number of atoms in the $\\left|r\\right>$ state (by having $\\delta > 0$) and discourage nearest neighbors from being both in $\\left|r\\right>$ (via the [interaction Hamiltonian](../programming.md#ising-hamiltonian)). When these contributions are appropriately balanced, we get an Hamiltonian with $\\left|rgrgrgrgr\\right>$ as its ground state.\n", | ||
"\n", | ||
"Let's follow the protocol from [this paper](https://journals.aps.org/prx/abstract/10.1103/PhysRevX.8.021070), where we define the parameters with respect to the interaction strength between nearest neighbours, $U$ (see Table 1 of the paper):\n", | ||
"\n", | ||
"$$\n", | ||
"U = 2\\pi\\ rad/\\mu s\\\\\n", | ||
"\\Omega_{max} = 2 U\\\\\n", | ||
"\\delta_0 = -6 U\\\\\n", | ||
"\\delta_f = 2U\\\\\n", | ||
"t_{rise} = 252\\ ns,\\ t_{fall} = 500\\ ns\\\\\n", | ||
"t_{sweep} = \\frac{\\delta_f - \\delta_0 [rad\\cdot\\mu s^{-1}]}{2 \\pi \\cdot 10\\ [rad\\cdot\\mu s^{-2}]}\n", | ||
"$$\n", | ||
"\n", | ||
"and define $\\Omega(t)$ and $\\delta(t)$ over time as (see Figure 1 (b)): \n", | ||
"<center>\n", | ||
"<img src=\"../files/AF_Ising_program.png\" alt=\"AF Pulse Sequence\" width=\"300\">\n", | ||
"</center>\n", | ||
"\n", | ||
"The [Hamiltonian](../programming.md#hamiltonian-evolves-state) we are implementing is (the phase is constant and equal to $0$ over time):\n", | ||
"\n", | ||
"$$H = \\hbar \\sum_i \\left (\\frac{\\Omega(t)}{2} \\left(|g\\rangle\\langle r| + |r\\rangle\\langle g|\\right) - \\delta(t) |r\\rangle\\langle r| + \\sum_{j<i}U_{ij}\\hat{n}_i \\hat{n}_j \\right)$$\n", | ||
"\n", | ||
"where $U_{ij} = \\frac{C_6}{\\hbar R_{ij}^6}$." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ferrulli1pasqal you don't think that's enough then ? My problem is that it's not explained much in the article itself why they took these pulses, except "we wanted to do adiabatic state preparation, finish in an hamiltonian having as a ground state an antiferromagnetic state, pure adiabatic pulses were not implementable because the duration would have been too long, so we adapted the receipe, it still works there your go". That's why we decided to just redirect to the article saying "We do this because these guys developed the receipe and it worked".
If let you comment with your suggestion, or I ask for Louis-Paul to provide a brief explanation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I had in mind was a more practical/simple explanation. Something along the line: first third (constant) is to make entanglement, second third is to drive the adiabatic transformation and third (constant) is for .
Please consider this comment just in its qualitative shape :) Do you see my point?
(I'm trying to reply fast to not block you but I am in the process of writing two more document, so I might be quite clumsy in what I say here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that I don't have the background to explain it. This can also be programmed with one smooth pulse https://pulser--776.org.readthedocs.build/en/776/tutorials/optimization.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand. Maybe asking the application team can be the best way. Do you want me to ask in the channel or you do it yourself (latter option would be way easier for me tbh <3 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the meantime, if there are not other changes to be done we can close and merge and then modify later once someone will bless us with some insight :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Louis-PaulHenry I could need your input here. TL,DR: We are writing a notebook aiming at presenting very simply two examples of quantum programs that can be written with Pulser to run on a QPU. First one is a simple excitation of an atom from its ground to the Rydberg state. Second is the preparation of an anti-ferromagnetic state using the protocol that was presented in your paper: https://journals.aps.org/prx/abstract/10.1103/PhysRevX.8.021070, as an example of "Adiabatic Quantum Programming".
We have so far not provided much information about the shape of the pulses in the protocol, because we don't know how to provide a simple explanation. We have only redirected people to the paper. Would you be able to explain in simple terms the role of each pulse in the protocol (if I try to summarize @ferrulli1pasqal 's question) or at least the shape of the pulse. Remember: this is going to be one of the first document a Pulser user will see, so we don't want to scare them 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To check the notebook: https://pulser--776.org.readthedocs.build/en/776/tutorials/creating.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are merging for our needs, but we can discuss it here anyway
…old tutorials (#790) * Deleting tutorials * Adding the Register user manual * Adding links * Undo deleting the tutorials for the repo * Retire tutorials instead * Do the same for the tutorials deleted in #776 * Address review comments * Fix notebook reference * Clear all outputs * Adressing review comments * Address review comments * Add section in conventions on indexed operator notation * Small fixes * Improve formula rendering
A getting started notebook is created: