-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ParameterVector support for pulse parameter assignment (#12045)
* Added test and release notes update * Reformatting * Added test and release notes update * Reformatting * Added compatibility of pulse ParameterManager with ParameterVector It is now possible to assign to a pulse schedule parameters in the form of a list of values that can be directly binded to ParameterVector. This PR is based on the current functioning of the analogous method for the QuantumCircuit class. * Commit requested changes Type for submitting a list of parameters has been set to Sequence for the case of ParameterVector. This enables the user to also pass a tuple of values/ParameterExpressions * Update pulse_parameter_manager_compat_with_ParameterVector-7d31395fd4019827.yaml Co-authored-by: TsafrirA <113579969+TsafrirA@users.noreply.github.com> * Added tests for Schedule and case of mix Parameter+numeric values Complementary tests have been added for checking the pulse.Schedule.assign_parameters() method, as well as the functioning of binding to a ParameterVector a collection of numeric values and new ParameterExpression (through Parameter). * Corrected error for schedule test An error was occurring when trying to get access to an instruction parameter within schedule.instructions * Correction to test schedule * Added test and release notes update * Reformatting * Added test and release notes update * Reformatting * Added compatibility of pulse ParameterManager with ParameterVector It is now possible to assign to a pulse schedule parameters in the form of a list of values that can be directly binded to ParameterVector. This PR is based on the current functioning of the analogous method for the QuantumCircuit class. * Commit requested changes Type for submitting a list of parameters has been set to Sequence for the case of ParameterVector. This enables the user to also pass a tuple of values/ParameterExpressions * Update pulse_parameter_manager_compat_with_ParameterVector-7d31395fd4019827.yaml Co-authored-by: TsafrirA <113579969+TsafrirA@users.noreply.github.com> * Added tests for Schedule and case of mix Parameter+numeric values Complementary tests have been added for checking the pulse.Schedule.assign_parameters() method, as well as the functioning of binding to a ParameterVector a collection of numeric values and new ParameterExpression (through Parameter). * Corrected error for schedule test An error was occurring when trying to get access to an instruction parameter within schedule.instructions * Correction to test schedule * Update releasenotes/notes/pulse_parameter_manager_compat_with_ParameterVector-7d31395fd4019827.yaml Co-authored-by: Will Shanks <wshaos@posteo.net> --------- Co-authored-by: TsafrirA <113579969+TsafrirA@users.noreply.github.com> Co-authored-by: Will Shanks <wshaos@posteo.net>
- Loading branch information
1 parent
b0d2062
commit 88b5193
Showing
4 changed files
with
100 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/pulse_parameter_manager_compat_with_ParameterVector-7d31395fd4019827.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
features_pulse: | ||
- | | ||
The ``assign_parameters`` methods of :class:`.Schedule` and :class:`.ScheduleBlock` | ||
now support assigning a :class:`.ParameterVector` to a list of parameter values | ||
simultaneously in addition to assigning individual :class:`.Parameter` instances to | ||
individual values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters