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
If the simplified circuit contains zero gates, simplify needs to return a circuit of 0 gates, containing the same number of qubits as the input circuit.
The text was updated successfully, but these errors were encountered:
Issue: Bug Report
When using
Circuit.simplify
on a Circuit where all gates simply (ex: a circuit with 1 qubit, 2 consecutive H gates), the result is aNoneType
.Expected Behavior
It should instead be a circuit with 0 gates, containing the same number of qubits as before
simplify
.Current Behavior
Tell us what happens instead of the expected behavior. Try to be clear and concise if you can. Feel free to add screenshots.
Steps to Reproduce (minimal example)
Circuit([Gate("H", 0)]*2).simplify()
returnsNoneType
Possible Solution
If the simplified circuit contains zero gates,
simplify
needs to return a circuit of 0 gates, containing the same number of qubits as the input circuit.The text was updated successfully, but these errors were encountered: