qiskit/test/visual
Matthew Treinish c6efb76c24
Deprecate the condition attribute and related functionality (#13223)
* Deprecate the condition attribute and related functionality

This commit deprecates the Instruction.condition and c_if() method for
removal in 2.0. This functionality has been superseded by the more
sophisiticated `IfElseOp` for some time now. Removing the condition
property will simplify the Qiskit data model as it is implemented in
a kind of ad-hoc manner that adds additional overhead to manually check
it in many places.

For the unittest modifications the deprecation warning for the .condtion
getter is suppressed for the entire suite because this gets triggered
internally by the transpiler and a lot of other places, including from
rust code as until it is removed we need to use it to check that piece
of the data model.

Fixes #9556

* Add missing assertWarns

* Handle deprecation warnings in visual tests too

* Apply suggestions from code review

Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>

* Use private attribute in py->rust conversion

* Avoid deprecation warning in non-deprecated code

This commit fixes some places in the code where we were using the
deprecated functionality where it needed a path to persist the behavior
or where the deprecation warning became a performance bottleneck. The
code is updated accordingly and to catch issues like this in the future
the warning filters are adjusted to be more selective.

* Add missing test updates

* Add filter for aer's condition usage and dag drawer

* Fix lint

---------

Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
2024-10-31 13:58:26 +00:00
..
mpl Deprecate the condition attribute and related functionality (#13223) 2024-10-31 13:58:26 +00:00
__init__.py move and enable visual tests (#9961) 2023-07-11 16:42:58 +00:00
mpl_tester.ipynb move and enable visual tests (#9961) 2023-07-11 16:42:58 +00:00
results.py Remove consider-using-f-string lint rule and updates (#12423) 2024-06-19 07:05:56 +00:00