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
Circuit.simplify should remove small rotations, but it currently only looks whether the angle is sufficiently close to 0.
If the angle somehow ends up being 2pi or 4 pi, we would also like the gate to be removed, as it is the identity operation. It is currently not the case.
remove_small_rotations should remove rotations with angles that are 0 modulo 2*pi instead of just 0.
easy test:
import numpy as np
from tangelo.linq import Gate, Circuit
c = Circuit([Gate('H',0), Gate('Rx, 0, parameter=4*np.pi)])
c.simplify
# Assert c is now just a single H gate.
The text was updated successfully, but these errors were encountered:
Circuit.simplify should remove small rotations, but it currently only looks whether the angle is sufficiently close to 0.
If the angle somehow ends up being 2pi or 4 pi, we would also like the gate to be removed, as it is the identity operation. It is currently not the case.
remove_small_rotations should remove rotations with angles that are 0 modulo 2*pi instead of just 0.
easy test:
The text was updated successfully, but these errors were encountered: