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

Create getting started notebook #776

Merged
merged 38 commits into from
Jan 15, 2025
Merged

Create getting started notebook #776

merged 38 commits into from
Jan 15, 2025

Conversation

a-corni
Copy link
Collaborator

@a-corni a-corni commented Dec 9, 2024

A getting started notebook is created:

  • Only tackles AnalogDevice operations.
  • Introduces and redirects to the various components of the documentation.
  • Introduces the further notebooks.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@HGSilveri
Copy link
Collaborator

There seem to be some formatting issues, the ReviewNB rendering looked weird and the RTD build failed with some warnings

Copy link
Collaborator

@HGSilveri HGSilveri left a 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

tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
@a-corni
Copy link
Collaborator Author

a-corni commented Jan 6, 2025

@ferulli1pasqal

tutorials/creating_sequences.ipynb Show resolved Hide resolved
tutorials/creating_sequences.ipynb Show resolved Hide resolved
tutorials/creating_sequences.ipynb Show resolved Hide resolved
tutorials/creating_sequences.ipynb Show resolved Hide resolved
tutorials/creating_sequences.ipynb Show resolved Hide resolved
tutorials/creating_sequences.ipynb Show resolved Hide resolved
Copy link
Collaborator

@HGSilveri HGSilveri left a 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

docs/source/programming.md Outdated Show resolved Hide resolved
docs/source/index.rst Outdated Show resolved Hide resolved
@HGSilveri HGSilveri changed the base branch from develop to docs-v2 January 8, 2025 15:52
docs/source/programming.md Outdated Show resolved Hide resolved
docs/source/programming.md Outdated Show resolved Hide resolved
docs/source/programming.md Show resolved Hide resolved
docs/source/programming.md Outdated Show resolved Hide resolved
docs/source/programming.md Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
Copy link
Collaborator

@HGSilveri HGSilveri left a 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 Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Outdated Show resolved Hide resolved
tutorials/creating_sequences.ipynb Show resolved Hide resolved
Comment on lines 282 to 306
"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}$."
Copy link
Collaborator Author

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".
image
If let you comment with your suggestion, or I ask for Louis-Paul to provide a brief explanation

Copy link
Collaborator

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)

Copy link
Collaborator Author

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

Copy link
Collaborator

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 )

Copy link
Collaborator

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 :)

Copy link
Collaborator Author

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 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

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

@a-corni a-corni merged commit bc4ac65 into docs-v2 Jan 15, 2025
9 checks passed
@a-corni a-corni deleted the ac/rebuild_doc branch January 15, 2025 11:44
HGSilveri added a commit that referenced this pull request Jan 15, 2025
HGSilveri added a commit that referenced this pull request Jan 27, 2025
…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
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.

3 participants