mindquantum.core.gates.Power
- class mindquantum.core.gates.Power(gate, exponent=0.5)[source]
Power operator on a non parameterized gate.
- Parameters
gates (
NoneParameterGate
) – The basic gate you need to apply power operator.
Examples
>>> from mindquantum.core.gates import Power >>> import numpy as np >>> rx1 = RX(0.5) >>> rx2 = RX(1) >>> assert np.all(np.isclose(Power(rx2,0.5).matrix(), rx1.matrix()))