qiskit icon indicating copy to clipboard operation
qiskit copied to clipboard

Added new way to assign parameters to pulse schedule,

Open arthurostrauss opened this issue 1 year ago • 3 comments

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).

arthurostrauss avatar Sep 12 '24 08:09 arthurostrauss

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:

  • @Qiskit/terra-core
  • @nkanazawa1989

qiskit-bot avatar Sep 12 '24 08:09 qiskit-bot

Pull Request Test Coverage Report for Build 11227321108

Details

  • 18 of 28 (64.29%) changed or added relevant lines in 2 files are covered.
  • 24 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.01%) to 88.861%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/pulse/parameter_manager.py 14 24 58.33%
<!-- Total: 18 28
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
crates/accelerate/src/two_qubit_decompose.rs 1 91.45%
crates/qasm2/src/lex.rs 4 93.48%
crates/qasm2/src/parse.rs 18 96.69%
<!-- Total: 24
Totals Coverage Status
Change from base Build 11225763971: -0.01%
Covered Lines: 74614
Relevant Lines: 83967

💛 - Coveralls

coveralls avatar Sep 12 '24 08:09 coveralls

Hi @arthurostrauss,

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

1ucian0 avatar Sep 30 '24 09:09 1ucian0