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

Implement frequency changes for pulse #3467

Closed
eggerdj opened this issue Nov 14, 2019 · 9 comments · Fixed by #3468
Closed

Implement frequency changes for pulse #3467

eggerdj opened this issue Nov 14, 2019 · 9 comments · Fixed by #3468
Assignees
Labels
mod: pulse Related to the Pulse module type: enhancement It's working, but needs polishing

Comments

@eggerdj
Copy link
Contributor

eggerdj commented Nov 14, 2019

What is the expected enhancement?

PulseChannels create the control fields Re[exp(i 2pi j dt f + phi)d_j]. There should be a Command to change the frequency f of the PulseChannel.

This instruction will be implemented by class SetChannelFrequency(Command). It will have

  • one attribute, the new frequency of the channel, i.e. self._frequency,
  • the prefix scf,
  • and will result in the command_dict {'name': 'scf', 't0': ..., 'ch': ..., 'frequency': ... }
@taalexander taalexander added the type: enhancement It's working, but needs polishing label Nov 14, 2019
@taalexander
Copy link
Contributor

I think this is an excellent idea! Only recommendation I might have is to call this SetFrequency since pulse commands are implicitly on channels.

Are you planning on implementing @eggerdj?

@eggerdj
Copy link
Contributor Author

eggerdj commented Nov 14, 2019

@taalexander Yes I'll implement this. Please assign me.

SetFrequency is also an option and it makes sense given that Commands are applied on channels. My reason for making channel explicit is that for flux-tunable qubits I can imagine a command named SetQubitFrequency. I.e. to avoid any ambiguity I would prefer to have SetChannelFrequency.

@taalexander
Copy link
Contributor

Yes, I can see that being the case. One option would be accept both types into the command in that case. Any thoughts @ajavadia on instruction operand type overloading? I know this is how LLVM does it.

@eggerdj
Copy link
Contributor Author

eggerdj commented Nov 14, 2019

I guess accepting both types is an option. I worry that might make Pulse a little confusing for the end user?

@taalexander
Copy link
Contributor

I agree it could, it would help if there was a formal language definition associated with pulse, eg., The equivalent of QASM in which typing in explicit.

@eggerdj
Copy link
Contributor Author

eggerdj commented Nov 14, 2019

The WIP PR outlines what this would look like. Changing the name of the command is easy. Let me know if I forgot anything here.

@lcapelluto
Copy link
Contributor

SetQubitFrequency would not be the best approach. The qubit frequency isn't something that can be set directly, but rather something that is controlled via other channels (the flux bias line, in that case). Pulse inherently always operates on channels, and cannot operate on qubits, so I think SetFrequency is still clear.

@eggerdj
Copy link
Contributor Author

eggerdj commented Nov 22, 2019

Thinking about this a bit more I am now comfortable with SetFrequency. Changing the qubit frequency for a fixed duration T would require a square pulse (implemented as ConstantPulse(ParametricPulse) or SamplePulse) of duration T on the flux bias line. (If the frequency change is to be until the end of the schedule then a persistent value would probably better). At this point its up to the user to know that his square pulse will change the frequency of the qubit.

@taalexander
Copy link
Contributor

Yes, I agree with this. Frequency should only reference the LO of a given drive channel.

@mergify mergify bot closed this as completed in #3468 Mar 17, 2020
@1ucian0 1ucian0 added the mod: pulse Related to the Pulse module label Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: pulse Related to the Pulse module type: enhancement It's working, but needs polishing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants