You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 1.3.0rc2 and main branch
1.3.0rc2
┌──────────┐
q: ┤ U(0,0,0) ├
└────╥─────┘
┌────╨────┐
c: 1/╡ c_0=0x0 ╞═
└─────────┘
Traceback (most recent call last):
File "/Users/ima/tasks/4_2024/qiskit/terra/tmp/cond.py", line 8, in <module>
print(qc.decompose())
^^^^^^^^^^^^^^
File "/Users/ima/envs/q130/lib/python3.12/site-packages/qiskit/circuit/quantumcircuit.py", line 3288, in decompose
dag = pass_.run(dag)
^^^^^^^^^^^^^^
File "/Users/ima/envs/q130/lib/python3.12/site-packages/qiskit/transpiler/passes/basis/decompose.py", line 72, in run
node_as_dag = _node_to_dag(node)
^^^^^^^^^^^^^^^^^^
File "/Users/ima/envs/q130/lib/python3.12/site-packages/qiskit/transpiler/passes/basis/decompose.py", line 130, in _node_to_dag
dag.apply_operation_back(node.op, node.qargs, node.cargs)
qiskit.dagcircuit.exceptions.DAGCircuitError: 'invalid clbits in condition for u'
What should happen?
No error should be raised as same as 1.2.4
Any suggestions?
The following procedure, which exists in stable/1.2, is perhaps necessary to handle UGate.c_if in _apply_op_node_back?
t-imamichi
changed the title
QuantumCircuit.decompose raises an error with a conditional gate for Qiskit 1.3.0rc2 and the main branchQuantumCircuit.decompose raises an error with a conditional U gate for Qiskit 1.3.0rc2 and the main branch
Nov 27, 2024
t-imamichi
changed the title
QuantumCircuit.decompose raises an error with a conditional U gate for Qiskit 1.3.0rc2 and the main branchQuantumCircuit.decompose raises an error with a conditional U gate for Qiskit 1.3.0 and the main branch
Nov 29, 2024
Environment
What is happening?
A circuit with a conditional gate raises an error when
decompose
is invoked. It does not happen for 1.2.4How can we reproduce the issue?
What should happen?
No error should be raised as same as 1.2.4
Any suggestions?
The following procedure, which exists in stable/1.2, is perhaps necessary to handle
UGate.c_if
in_apply_op_node_back
?qiskit/qiskit/dagcircuit/dagcircuit.py
Lines 722 to 726 in cd26d49
The text was updated successfully, but these errors were encountered: