Skip to content

Commit

Permalink
Deprecate qiskit.extensions (Qiskit/qiskit#10725)
Browse files Browse the repository at this point in the history
* big moves, import still works

* most tests pass (some I cannot seem to run locally)

* fix tests -- how to remove DiagonalGate?

* typehints and docs

* more type hints

* Deprecate SQU

* deprecate Snapshot

* Fix missing future annotations import

* minimize deprecation effort

* Change to pending deprecation, no exact-location import supported

* fix MCG<->MGC typo and snapshot deprecation

* fix pylint, try fixing docs

* remove gates from extensions toctree

* Add reno, fully deprecate SQU and Snapshot

* Apply Sasha's review comments

- fix usage of .squ and .snapshot w/o import
- fix docstring usage of extensions
- fix tests

* capture snapshot deprecation warning

* review comments

- capture warning of SQU
- update reno to explicitly mention pending deprecation, add DiagonalGate and ExtensionError

* missed `diagonal` method

---------

Co-authored-by: Alexander Ivrii <[email protected]>
  • Loading branch information
Cryoris and alexanderivrii authored Sep 29, 2023
1 parent c7b3824 commit 7273fac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qiskit-docs/migration_guides/opflow_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,8 @@ delayed synthesis of the gates or efficient transpilation of the circuits, so th
(for example, :class:`~qiskit.algorithms.time_evolvers.trotterization.TrotterQRTE`\).

In a similar manner, the :class:`qiskit.opflow.evolutions.MatrixEvolution` class performs evolution by classical matrix exponentiation,
constructing a circuit with :class:`.UnitaryGate`\s or :class:`.HamiltonianGate`\s containing the exponentiation of the operator.
This class is no longer necessary, as the :class:`.HamiltonianGate`\s can be directly handled by the algorithms.
constructing a circuit with :class:`~.library.UnitaryGate`\s or :class:`~.library.HamiltonianGate`\s containing the exponentiation of the operator.
This class is no longer necessary, as the :class:`~.library.HamiltonianGate`\s can be directly handled by the algorithms.

Trotterizations
---------------
Expand Down Expand Up @@ -1046,7 +1046,7 @@ Other Evolution Classes
- No direct replacement. The workflow no longer requires a specific operator for evolutions.

* - :class:`~qiskit.opflow.evolutions.MatrixEvolution`
- :class:`.HamiltonianGate`
- :class:`~.library.HamiltonianGate`

* - :class:`~qiskit.opflow.evolutions.PauliTrotterEvolution`
- :class:`.PauliEvolutionGate`
Expand Down

0 comments on commit 7273fac

Please sign in to comment.