Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions qiskit_algorithms/minimum_eigensolvers/adapt_vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def _compute_gradients(
# The excitations operators are applied later as exp(i*theta*excitation).
# For this commutator, we need to explicitly pull in the imaginary phase.
commutators = [1j * (operator @ exc - exc @ operator) for exc in self._excitation_pool]
# We have to call simplify on it since Qiskit doesn't do so in versions 2.1.0 and 2.1.1, see
# We have to call simplify on it since Qiskit doesn't do so in versions 2.1.X, see
# Qiskit/qiskit/issues/14567
if get_qiskit_version_info() in ["2.1.0", "2.1.1"]:
if get_qiskit_version_info() in ["2.1.0", "2.1.1", "2.1.2"]:
commutators = [obs.simplify() for obs in commutators]

# If the ansatz has been transpiled
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
:class:`.AdaptVQE` now works correctly when using qiskit in version 2.1.2.
Loading