Closed lsschmid closed 3 months ago
For some reason some other tests fail, not sure why.
Also, probably I don't need the functionality any more, so feel free to delete the PR
For some reason some other tests fail, not sure why.
Also, probably I don't need the functionality any more, so feel free to delete the PR
Just from a Quick Look: The main reason for the tests failing is that the previous identity removal would also remove (multi-)controlled identities, while your version only removes single-qubit identities without controls. That should be rather easy to fix though by adding a special case for the identity.
In general, I'd be in favour of getting this merged. It seems like a useful generalisation.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.6%. Comparing base (
2782f37
) to head (992da1a
). Report is 98 commits behind head on main.
Now it should work. As said, I don't really need it anymore though.
Also: I wrote a comment on the compound operations. Please remove it if it looks fine.
Description
To not only remove Identities but also other Operations I wrote a function that generalizes that concept and allows one to remove arbitrary operation types.
Checklist: