Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Fix ConvertIdToDelay with conditional IGates #688

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

jakelishman
Copy link
Member

Summary

The logic of DAGCircuit.substitute_node already contains logic that propagates the condition from one node to another. The provider was previously duplicating this and before Terra 0.25, Qiskit would silently buggily overwrite any condition in the substitution. Now Qiskit will refuse, but the behaviour of propagating a set condition persists.

Details and comments

Work in Qiskit/qiskit#10314 may switch from directly setting .condition to using Instruction.c_if, which could pose problems for Terra's inbuilt Delay, which claims not to support conditional operations. We can look at relaxing that, if it's something you guys need - I'm not sure it's Terra's domain to be saying that.

The logic of `DAGCircuit.substitute_node` already contains logic that
propagates the condition from one node to another.  The provider was
previously duplicating this and before Terra 0.25, Qiskit would silently
buggily overwrite any condition in the substitution.  Now Qiskit will
refuse, but the behaviour of propagating a set condition persists.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5715631452

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.008%) to 51.485%

Totals Coverage Status
Change from base Build 5661420544: -0.008%
Covered Lines: 3173
Relevant Lines: 6163

💛 - Coveralls

@kt474 kt474 merged commit 8730f57 into Qiskit:main Jul 31, 2023
@kt474 kt474 added the Changelog: Bugfix Include in the Fixed section of the changelog label Jul 31, 2023
@kt474 kt474 added this to the 0.6.3 milestone Jul 31, 2023
@jakelishman jakelishman deleted the fix-id-to-delay-condition branch August 31, 2023 14:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog: Bugfix Include in the Fixed section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants