Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
5.1k stars 2.34k forks source link

Added new way to assign parameters to pulse schedule, #13140

Open arthurostrauss opened 2 weeks ago

arthurostrauss commented 2 weeks ago

Summary

It is now possible to assign pulse parameters to a pulse schedule using a sequence of parameter names or parameters as keys to the value_dict argument of the assign_parameters method. This allows for more flexible assignment of parameters to pulse schedules. Notably, it is possible to directly assign parameters through slices of a BindingsArray class, used in the primitives interface for assigning parameters. This could be useful for future implementations custom pulse-based primitives implementations (e.g. Qiskit Dynamics custom primitive implementation). Moreover, we have a new class attribute for Schedule and ScheduleBlock enabling the disabling of parameter validation when assigning parameters to a schedule. This is useful for advanced users who want to integrate Qiskit Pulse schedule creations within a JIT compiled function (notably to accelerate simulations in Qiskit Dynamics).

qiskit-bot commented 2 weeks ago

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

coveralls commented 2 weeks ago

Pull Request Test Coverage Report for Build 10827028527

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/pulse/parameter_manager.py 14 24 58.33%
<!-- Total: 18 28 64.29% -->
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 6 92.23%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build 10821154060: 0.01%
Covered Lines: 73148
Relevant Lines: 82319

💛 - Coveralls
1ucian0 commented 1 day ago

Hi @arthurostrauss,

Heads up, we are on the way to deprecate pulses, so new features on those modules have very low priority.