-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiplication of SparsePauliOp and ParameterExpression (#10264)
* Allow multiplication of SparsePauliOp and ParameterExpression * Add unit tests for SparsePauliOp and ParameterExpression multiplication * Add release note for the new feature
- Loading branch information
1 parent
791a454
commit c693852
Showing
3 changed files
with
35 additions
and
6 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
15 changes: 15 additions & 0 deletions
15
releasenotes/notes/support-SparsePauliOp-Parameter-multiplication-245173f0b232f59b.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,15 @@ | ||
features: | ||
- | | ||
Adds support for multiplication of :class:`.SparsePauliOp` objects | ||
with :class:`.Parameter` objects by using the * operator, for example:: | ||
from qiskit.circuit import Parameter | ||
from qiskit.quantum_info import SparsePauliOp | ||
param = Parameter("a") | ||
op = SparsePauliOp("X") | ||
param * op | ||
fixes: | ||
- | | ||
Fixes issue `#10185 <https://github.com/Qiskit/qiskit-terra/issues/10185>`. |
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