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 a NoneType.
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() returns NoneType
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.
Issue: Bug Report
When using
Circuit.simplifyon 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()returnsNoneTypePossible Solution
If the simplified circuit contains zero gates,
simplifyneeds to return a circuit of 0 gates, containing the same number of qubits as the input circuit.