-
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
Add a Hardware section in the documentation #781
base: docs-v2
Are you sure you want to change the base?
Conversation
a-corni
commented
Dec 12, 2024
- Neutral-atom Hardware (A)
- What are the components of a neutral-atom QC ? How does it work ?
- Device
- What are the physical constraints explicited in a Device ?
- Channel
- What are the components of a Channel ?
- What are the example of devices present in Pulser ? (AnalogDevice, DigitalAnalogDevice, MockDevice)
- The simplest example: AnalogDevice
- Description of the contents of AnalogDevice
- The simplest example: AnalogDevice
… Device, adding the presence of EOM in Channel display
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Let's try to fix the build to help the review
docs/source/hardware.ipynb
Outdated
"source": [ | ||
"As presented in the [introduction to programming a neutral-atom QPU](programming.md#writing-a-pulser-program), the first step to writing a Pulser program is [the selection of a `Device`](programming.md#pick-a-device). \n", | ||
"\n", | ||
"The `Device` object stores **all the physical constraints a quantum program written with `Pulser` should verify**, for it to be run on a neutral-atom QPU. The quantum programs, the `pulser.Sequence`, verify that each operation added to them are valid with respect to the constraints of the `Device`. " |
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 just realised that we never mentioned in the quick-start notebooks about the sequence initialisation besides a short sentence. Probably worth a step itself.
docs/source/hardware.ipynb
Outdated
"source": [ | ||
"As presented in the [introduction to programming a neutral-atom QPU](programming.md#writing-a-pulser-program), the first step to writing a Pulser program is [the selection of a `Device`](programming.md#pick-a-device). \n", | ||
"\n", | ||
"The `Device` object stores **all the physical constraints a quantum program written with `Pulser` should verify**, for it to be run on a neutral-atom QPU. The quantum programs, the `pulser.Sequence`, verify that each operation added to them are valid with respect to the constraints of the `Device`. " |
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 sentence sounds a bit bizarre. We haven't said what a device is yet we say what it contains and why we care.
How about the Device object is a fundamental component of the abstract models of neutral atoms QPU used in Pulser. It stores inside the physical characteristics/aspects of the hardware, as for example the channels[link] which are supported.
Also, instead of saying physical constraints a program must verify, how about the physical constraint the user must be aware when writing a program in Pulser.
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.
-
When it comes to running a program on a QPU: Each QPU has an associated
Device
, which you can get from the cloud provider you use to access this QPU. -
For sole designing purposes:
Pulser
provides examples of typical physical devices inpulser.devices
. Notably,pulser.AnalogDevice
is an example of a QPU implementing an Ising Hamiltonian. -
For designing without physical constraints during the writing of your quantum program, you can use a
VirtualDevice
. An example of such aVirtualDevice
is theMockDevice
provided in thepulser.devices
, which gives full liberty to write a quantum program.VirtualDevice
is detailed in an advanced tutorial.
docs/source/hardware.ipynb
Outdated
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"If you want to run a quantum program on a QPU, start by selecting the `Backend` associated with this QPU. From this `Backend` the `Device` associated with the QPU can be accessed via the `get_available_devices` method.\n", |
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 feel we're mixing up the goals: do we want to present the devices or something different? I feel confused reading this sentence. Same applies for next two paragraphs.
docs/source/hardware.ipynb
Outdated
"\n", | ||
"- \"Register\" and \"Layout\" parameters are going to constrain the creation of your `Register`, that is, the number of atoms you can use and how you can place them in place. [As a reminder](programming.md#create-the-register), this impacts the [interaction strength in the interaction Hamiltonian](programming.md#interaction-hamiltonian). The creation of a `Register` is presented here. If the `Device` requires a `Layout` (as in the example here), then you have to associate a `RegisterLayout` to the `Register`, which adds more constraints. Check [this tutorial](./tutorials/reg_layouts.nblink) to see how to do it.\n", | ||
"\n", | ||
"- Among the \"Device\" parameters, the \"Rydberg level\" is going to complete the determination of the [interaction strength in the interaction Hamiltonian](programming.md#interaction-hamiltonian). This level determines the \"Ising interaction coefficient\", which is the $C_6$ coefficient of the [Ising Hamiltonian](./programming.md#ising-hamiltonian). The quantity $\\frac{C_6}{\\hbar}$ is accessible via `pulser.AnalogDevice.interaction_coeff`.\n", |
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.
If C_6 is the Ising interaction coefficient, I would avoid using the brackets to refer to it. I would also enforce the use of such naming in other pages so that if I read in the specs "Ising interaction coefficient" i know without doubt that it is C_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.
By brackets you mean $ ? We have always written this
docs/source/hardware.ipynb
Outdated
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### The `AnalogDevice`" |
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 would make a different section with one example: AnalogDevice and Rydberg channel and move it after the channel.
I'd put in there the code block print of device specs, and discuss the hamiltonian which is implemented ad you do here. In there also the rydberg global spec printed. A good reason for doing so is also that the interaction Hamiltonian presented here is exactly the general one you present in the CHannel section but spcialised to |r> and |g>.
docs/source/hardware.ipynb
Outdated
"source": [ | ||
"The third step to writing a Pulser program is [the selection of Channels among the Device](programming.md#pick-a-device).\n", | ||
"\n", | ||
"As a reminder, the selection of a `Channel` defines the [interaction Hamiltonian](programming.md#interaction-hamiltonian) and [the driving Hamiltonian](programming.md#driving-hamiltonian) $H_D$.\n", |
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.
Nice :)
docs/source/hardware.ipynb
Outdated
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The channel is characterized by:\n", |
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.
Same comment as done for the register. We can create a subsection which is "reading the channel specs" where you stay general making a list of bullet points and focus on the points which are more important. Can be also good to add a link tot he API
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.
Creating a subsection indeed, but as above I am following programming.md to regroup the specifications
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 really nice, great job @a-corni !
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! I'd just suggest redirecting from the Programming page to here like I did here: 81954ad