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

Add a Hardware section in the documentation #781

Open
wants to merge 44 commits into
base: docs-v2
Choose a base branch
from
Open

Conversation

a-corni
Copy link
Collaborator

@a-corni 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

@HGSilveri HGSilveri marked this pull request as draft December 12, 2024 10:59
@a-corni a-corni changed the base branch from develop to docs-v2 January 15, 2025 16:07
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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.

Let's try to fix the build to help the review

docs/source/hardware.md Outdated Show resolved Hide resolved
docs/source/hardware.md Outdated Show resolved Hide resolved
docs/source/hardware.ipynb Outdated Show resolved Hide resolved
@a-corni a-corni marked this pull request as ready for review January 20, 2025 09:14
"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`. "
Copy link
Collaborator

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.

"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`. "
Copy link
Collaborator

@ferrulli1pasqal ferrulli1pasqal Jan 20, 2025

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.

Copy link
Collaborator Author

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 in pulser.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 a VirtualDevice is the MockDevice provided in the pulser.devices, which gives full liberty to write a quantum program. VirtualDevice is detailed in an advanced tutorial.

"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",
Copy link
Collaborator

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.

"\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",
Copy link
Collaborator

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

Copy link
Collaborator Author

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 $C_6$... (in programming.md, in Register)

"cell_type": "markdown",
"metadata": {},
"source": [
"### The `AnalogDevice`"
Copy link
Collaborator

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>.

"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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice :)

"cell_type": "markdown",
"metadata": {},
"source": [
"The channel is characterized by:\n",
Copy link
Collaborator

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

Copy link
Collaborator Author

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

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 really nice, great job @a-corni !

docs/source/hardware.ipynb Show resolved Hide resolved
docs/source/hardware.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! I'd just suggest redirecting from the Programming page to here like I did here: 81954ad

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