Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate propagate_condition argument in DAGCircuit substitutions #13700

Open
jakelishman opened this issue Jan 21, 2025 · 4 comments
Open

Deprecate propagate_condition argument in DAGCircuit substitutions #13700

jakelishman opened this issue Jan 21, 2025 · 4 comments
Milestone

Comments

@jakelishman
Copy link
Member

Once #13506 merges, the propagate_condition argument to substitute_node_with_dag will no longer have any effect. We will be able to remove the code, and to deprecate the argument.

We could remove the argument directly in 2.0, but that would make it unnecessarily difficult to support 1.x and 2.y simultaneously, and it costs us near enough nothing to issue a Python-space deprecation on it.

@jakelishman jakelishman added this to the 2.0.0 milestone Jan 21, 2025
@mtreinish
Copy link
Member

On #13506 I already have it removed (I haven't pushed up the change locally yet but will soon). I was thinking we should deprecate it in 1.4, you were thinking we should keep it for all of 2.x?

@jakelishman
Copy link
Member Author

Once the condition code is gone, we can just ignore the argument at no cost to us. Seems better to me to then keep it through the 2.x series, so it's easier to support 1.x and 2.x simultaneously for a transpiler pass during the cross-over - you don't have to do dynamic setting of the propagate_condition argument.

I feel like the effects of all the warnings we get from Aer are more indication that deprecations should probably be staged a bit more: users need time to adjust to the deprecations, but libraries still need to support deprecated code and beyond, so to me there's an argument that the "consumption" methods should get deprecated only once they've become no-ops, where possible.

@1ucian0
Copy link
Member

1ucian0 commented Jan 28, 2025

Am I understanding this correctly and this issue to 2.1 milestone? Or do. we want to introduce this deprecation in 2.0?

@jakelishman
Copy link
Member Author

Depends what we decide to do with Matt's PR, but in my world, we'd issue the deprecation in 2.0. The alternative ("don't use Instruction.condition on non-control-flow ops") has been around since before the 1.0 days, and in 2.0, the option won't have any effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants