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
New version of AER does not recognize cx gate with control state = 0, while it did recognize cnot with control state = 0, which was not removed in favor of cx in 0.1.
I'd like to work on this. Could you tell me what is supposed to be done? Do we need to check if _o is present in name in _assemble_op() in aer_compiler.py ?
This is not a bug. qc.cx(0, 1, ctrl_state=0) inserts cx_o0 gate which is not cx. The name is defined here. cx_o0 gate is not in basis_gates of AerSimulator. You need to transpile the circuit as follows:
Yes, in that sense it's a feature request. In previous version Aer seems to have accepted both cx and cx_o0.
Resolving it with transpilation adds some overhead in transpiling on larger circuits, but I suppose it might not be that big of an issue. I don't have a strong opinion on this one. I guess I am fine to resolve the issue here by just leaving it as is, and using the transpiler
Informations
What is the current behavior?
New version of AER does not recognize cx gate with control state = 0, while it did recognize cnot with control state = 0, which was not removed in favor of cx in 0.1.
Steps to reproduce the problem
What is the expected behavior?
Should handle the
qc.cx(0, 1, ctrl_state=0)
nativelySuggested solutions
Should be easy since we already had in there cnot with control on 0, just rename mapping
The text was updated successfully, but these errors were encountered: