-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Enable lo frequencies to be passed in circuits #6167
Conversation
if 'qubit_lo_range' in out_dict: | ||
out_dict['qubit_lo_range'] = [ | ||
[min_range * 1e9, max_range * 1e9] for |
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 matches the pulse case
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 will allow the user to set the LO once for all circuits in the job or can the user set this on a per-circuit basis?
…valent job and expt level los
Updated--can now set los both at the job level, as well as the individual circuit/schedule level (via |
04e4b5a
to
cbc3cb2
Compare
It seems like this one was "almost there" and got hit by the black-conflict tsunami . Any chance to have a look at them @zachschoenfeld33 ? |
Updated @1ucian0 |
I had to simplify the |
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.
Based on the previews review from @taalexander, I'm approving this PR.
This commit addresses a performance regression in assemble() introduced in Qiskit#6167. That PR added the ability for users to configure pulse properties via assemble kwargs (such as lo frequencies). While this should really only be exposed via a Backend's options object and terra shouldn't have to deal with it, for legacy/backwards compat reasons we need to expose these options via assemble(). However, that PR was a bit aggressive in when it needed to parse the pulse defaults and properties to determine if input was valid. The intent there was for circuits jobs that users were configuring pulse configuration we'd be providing the same checks as with pulse jobs. However for circuits jobs this additional validation is only needed if the user has specified a pulse configuration options and we need to check that they're valid. If a user doesn't we shouldn't be touching anything pulse, especially as just loading pulse defaults can result in a large performance regression (roughly 2 orders of magnitude over assembly without it). To fix this is commit adjusts the logic when we parse the pulse defaults (and all the subsequent logic that uses them) to be if it's a pulse job, or if it's a circuit job and one of the named pulse paramters has been set. This returns the performance for pure circuits job to what it was prior to PR Qiskit#6167 but still retains the functionality that Qiskit#6167 provided when it's needed.
…7047) * Avoid configuring pulse defaults in circuit assembly unless needed This commit addresses a performance regression in assemble() introduced in #6167. That PR added the ability for users to configure pulse properties via assemble kwargs (such as lo frequencies). While this should really only be exposed via a Backend's options object and terra shouldn't have to deal with it, for legacy/backwards compat reasons we need to expose these options via assemble(). However, that PR was a bit aggressive in when it needed to parse the pulse defaults and properties to determine if input was valid. The intent there was for circuits jobs that users were configuring pulse configuration we'd be providing the same checks as with pulse jobs. However for circuits jobs this additional validation is only needed if the user has specified a pulse configuration options and we need to check that they're valid. If a user doesn't we shouldn't be touching anything pulse, especially as just loading pulse defaults can result in a large performance regression (roughly 2 orders of magnitude over assembly without it). To fix this is commit adjusts the logic when we parse the pulse defaults (and all the subsequent logic that uses them) to be if it's a pulse job, or if it's a circuit job and one of the named pulse paramters has been set. This returns the performance for pure circuits job to what it was prior to PR #6167 but still retains the functionality that #6167 provided when it's needed. * Make expected logic more explicit
…7047) * Avoid configuring pulse defaults in circuit assembly unless needed This commit addresses a performance regression in assemble() introduced in #6167. That PR added the ability for users to configure pulse properties via assemble kwargs (such as lo frequencies). While this should really only be exposed via a Backend's options object and terra shouldn't have to deal with it, for legacy/backwards compat reasons we need to expose these options via assemble(). However, that PR was a bit aggressive in when it needed to parse the pulse defaults and properties to determine if input was valid. The intent there was for circuits jobs that users were configuring pulse configuration we'd be providing the same checks as with pulse jobs. However for circuits jobs this additional validation is only needed if the user has specified a pulse configuration options and we need to check that they're valid. If a user doesn't we shouldn't be touching anything pulse, especially as just loading pulse defaults can result in a large performance regression (roughly 2 orders of magnitude over assembly without it). To fix this is commit adjusts the logic when we parse the pulse defaults (and all the subsequent logic that uses them) to be if it's a pulse job, or if it's a circuit job and one of the named pulse paramters has been set. This returns the performance for pure circuits job to what it was prior to PR #6167 but still retains the functionality that #6167 provided when it's needed. * Make expected logic more explicit (cherry picked from commit 9ffd69b)
…7047) (#7049) * Avoid configuring pulse defaults in circuit assembly unless needed This commit addresses a performance regression in assemble() introduced in #6167. That PR added the ability for users to configure pulse properties via assemble kwargs (such as lo frequencies). While this should really only be exposed via a Backend's options object and terra shouldn't have to deal with it, for legacy/backwards compat reasons we need to expose these options via assemble(). However, that PR was a bit aggressive in when it needed to parse the pulse defaults and properties to determine if input was valid. The intent there was for circuits jobs that users were configuring pulse configuration we'd be providing the same checks as with pulse jobs. However for circuits jobs this additional validation is only needed if the user has specified a pulse configuration options and we need to check that they're valid. If a user doesn't we shouldn't be touching anything pulse, especially as just loading pulse defaults can result in a large performance regression (roughly 2 orders of magnitude over assembly without it). To fix this is commit adjusts the logic when we parse the pulse defaults (and all the subsequent logic that uses them) to be if it's a pulse job, or if it's a circuit job and one of the named pulse paramters has been set. This returns the performance for pure circuits job to what it was prior to PR #6167 but still retains the functionality that #6167 provided when it's needed. * Make expected logic more explicit (cherry picked from commit 9ffd69b) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Summary
Closes #5874. This PR allows users to provide drive and measure lo frequencies from
execute/assemble
in qasm jobs. It also provides support for returningqubit_lo_range
andmeas_lo_range
from qasm backends so that users know the allowed values of the lo frequencies.Details and comments
default_qubit_los
/default_meas_los
inexecute
to set job level lo freqsqubit_lo_freq
/meas_lo_freq
inassemble
to set job level lo freqsschedule_los
inexecute/assemble
to set expt level (circuit or schedule level) lo freqsqubit_lo_range
andmeas_lo_range
viabackend.configuration().qubit_lo_range/backend.configuration().meas_lo_range
A schema update was provided at Qiskit/ibm-quantum-schemas#9