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

Support arbitrary phase-modulated pulses #688

Merged
merged 12 commits into from
Jun 13, 2024
Merged

Conversation

HGSilveri
Copy link
Collaborator

@HGSilveri HGSilveri commented May 29, 2024

The ability to define a Pulse with an arbitrary phase modulation has been recurrently requested. This is a working proposition of how this features can be incorporated in the existing codebase with minimal disruption:

  • Define Pulse.ArbitraryPhase(amplitude: Waveform, phase: Waveform, ...): Instead of a detuning waveform (ie a frequency modulation), we take a phase waveform, which is then internally converted to a detuning waveform and a phase offset.
  • Remove units from Waveform values whenever possible because in a phase waveform the values are not in rad/µs.
  • Allow Sequence drawing to show the phase modulation instead of the detuning: this is useful because users will likely want to see the phase waveform they gave to ArbitraryPhase() directly in the sequence (instead of it's detuning + phase offset equivalent)
  • Support serialization of parametrized Pulse.ArbitraryPhase() calls in the abstract representation

@HGSilveri HGSilveri requested a review from a-corni May 29, 2024 13:29
@HGSilveri HGSilveri added this to the Pulser v1 milestone May 29, 2024
@HGSilveri HGSilveri self-assigned this May 29, 2024
Copy link
Collaborator

@a-corni a-corni left a comment

Choose a reason for hiding this comment

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

Do you want to add a property phase_modulation or a method get_phase_modulation to the Pulse class, that would return the phase modulation as a waveform ?

pulser-core/pulser/pulse.py Outdated Show resolved Hide resolved
pulser-core/pulser/pulse.py Show resolved Hide resolved
pulser-core/pulser/waveforms.py Outdated Show resolved Hide resolved
pulser-core/pulser/waveforms.py Outdated Show resolved Hide resolved
pulser-core/pulser/waveforms.py Outdated Show resolved Hide resolved
@HGSilveri
Copy link
Collaborator Author

HGSilveri commented Jun 5, 2024

Do you want to add a property phase_modulation or a method get_phase_modulation to the Pulse class, that would return the phase modulation as a waveform ?

What I'll do instead because I think it's more natural is to add something like that to ChannelSamples. I'll need it for the plotting anyway

@HGSilveri HGSilveri marked this pull request as ready for review June 10, 2024 15:07
@HGSilveri HGSilveri mentioned this pull request Jun 10, 2024
8 tasks
Copy link
Collaborator

@a-corni a-corni left a comment

Choose a reason for hiding this comment

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

One typo found, other than it looks good to me !

pulser-core/pulser/pulse.py Outdated Show resolved Hide resolved
pulser-core/pulser/sampler/samples.py Show resolved Hide resolved
HGSilveri and others added 2 commits June 12, 2024 17:44
Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com>
@HGSilveri HGSilveri merged commit 873d3df into develop Jun 13, 2024
7 checks passed
@HGSilveri HGSilveri deleted the hs/arbitrary-phase branch June 13, 2024 09:35
@HGSilveri HGSilveri mentioned this pull request Jul 2, 2024
HGSilveri added a commit that referenced this pull request Jul 2, 2024
Main changes:
- Add option to switch the Sequence register (#684)
- Support arbitrary phase-modulated pulses (#688)
- Optionally skip JSON schema validation after serialization (#693) 
- Support for 3D registers and layouts in the abstract representation (#696)
- Allow backends to mimic QPU validation locally (#685)
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.

2 participants