Skip to content

Conversation

mtreinish
Copy link
Member

@mtreinish mtreinish commented Jun 4, 2019

Summary

This commit adds an additional check that none of the ops output from
the dagcircuit's collect_runs() function have a condition. There
is a check on the first op in the run, but we never check if any other
nodes in the run have a condition. A condition on any node in the run
would end the run. This commit fixes the behavior to match this so we
never return a node with a condition on it.

Details and comments

Fixes #2571

This commit adds an additional check that none of the ops output from
the dagcircuit's collect_runs() function do not have a condition. There
is a check on the first op in the run, but we never check if any other
nodes in the run have a condition. A condition on any node in the run
would end the run. This commit fixes the behavior to match this so we
never return a node with a condition on it.

Fixes Qiskit#2571
1ucian0
1ucian0 previously requested changes Jun 5, 2019
Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding a test?

@mtreinish
Copy link
Member Author

Do you mind adding a test?

Added in: dbe1f07

@mtreinish mtreinish requested a review from 1ucian0 June 6, 2019 13:46
@mtreinish mtreinish dismissed 1ucian0’s stale review June 6, 2019 13:47

The tests were added

@1ucian0 1ucian0 merged commit 1f99806 into Qiskit:master Jun 6, 2019
@mtreinish mtreinish deleted the fix-collect_runs branch July 23, 2019 02:45
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* Ensure collect runs doesn't return an op with a condition

This commit adds an additional check that none of the ops output from
the dagcircuit's collect_runs() function do not have a condition. There
is a check on the first op in the run, but we never check if any other
nodes in the run have a condition. A condition on any node in the run
would end the run. This commit fixes the behavior to match this so we
never return a node with a condition on it.

Fixes Qiskit#2571
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

Successfully merging this pull request may close these issues.

internal error from optimize_1q_gates from conditional cy gate
3 participants