-
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.
Browse files
Browse the repository at this point in the history
* Fix handling of empty operators list in EvolvedOperatorAnsatz * Add test for empty operator list in EvolvedOperatorAnsatz * add release note for fixing evolved operator ansatz * Update releasenotes/notes/fix-evolved-operator-ansatz-empty-ops-bf8ecfae8f1e1001.yaml Co-authored-by: Julien Gacon <[email protected]> * add a note to fix-evolved-operator-ansatz-empty-ops-bf8ecfae8f1e1001.yaml * Update fix-evolved-operator-ansatz-empty-ops-bf8ecfae8f1e1001.yaml * merge two conditions in evolved_operator_ansatz Co-authored-by: Julien Gacon <[email protected]> --------- Co-authored-by: Julien Gacon <[email protected]> (cherry picked from commit 8b6e4fe) Co-authored-by: Seyed Sajad Kahani <[email protected]> Co-authored-by: Luciano Bello <[email protected]>
- Loading branch information
1 parent
8db5490
commit 939dd93
Showing
3 changed files
with
23 additions
and
2 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
11 changes: 11 additions & 0 deletions
11
releasenotes/notes/fix-evolved-operator-ansatz-empty-ops-bf8ecfae8f1e1001.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,11 @@ | ||
--- | ||
fixes: | ||
- | | ||
The :class:`.EvolvedOperatorAnsatz` now correctly handles the case where the | ||
`operators` argument is an empty list. Previously, this would result in an | ||
error. | ||
- | | ||
From now on, :class:`.EvolvedOperatorAnsatz` will not have any `qregs` when | ||
thera are zero qubits, instead of having a :class:`.QuantumRegister` instance | ||
with zero qubits. This behavior aligns more consistently with its superclass | ||
:class:`.QuantumCircuit`. |
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