def rx(rads: value.TParamVal) -> XPowGate:
Returns a gate with the matrix e^{-i X rads / 2}.
pi = sympy.pi if protocols.is_parameterized(rads) else np.pi
return XPowGate(exponent=rads / pi, global_shift=-0.5)
def ry(rads: value.TParamVal) -> YPowGate:
After Change
def rx(rads: value.TParamVal) -> Rx:
Returns a gate with the matrix e^{-i X rads / 2}.
return Rx(rads=rads)
def ry(rads: value.TParamVal) -> Ry:
Returns a gate with the matrix e^{-i Y rads / 2}.