Qiskit / qiskit-tutorials

A collection of Jupyter notebooks showing how to use the Qiskit SDK
Apache License 2.0
2.33k stars 1.29k forks source link

Tutorial uses deprecated 'node.condition' blocking removal of deprecations in qiskit-terra #1302

Closed enavarro51 closed 2 years ago

enavarro51 commented 2 years ago

Informations

What is the current behavior?

The tutorial https://github.com/Qiskit/qiskit-tutorials/blob/721d67ac97e8f0ca3b9b4156cc35a9a777363d12/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.ipynb uses the a previously deprecated node.condition instead of node.op.condition when node is a DAGOpNodeobject. This is blocking removal of the deprecation in qiskit-terra.

In addition any references on this page to the DAGNode class should be changed to the DAGOpNode class.

Steps to reproduce the problem

Run the tutorial https://qiskit.org/documentation/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.html. The deprecation will be shown.

What is the expected behavior?

No deprecation shown after change to node.op.condition.

Suggested solutions

Change the https://github.com/Qiskit/qiskit-tutorials/blob/721d67ac97e8f0ca3b9b4156cc35a9a777363d12/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.ipynb file to change node.condition to node.op.condition wherever it is used.