forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix evolved operator ansatz (Qiskit#11682)
* 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 <gaconju@gmail.com> * 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 <gaconju@gmail.com> --------- Co-authored-by: Julien Gacon <gaconju@gmail.com>
- Loading branch information
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