mimiqcircuits.operations.utils¶
Operation utilities.
Functions
|
Return |
|
Return |
- power_idempotent(op, pow)[source]¶
Return
opraised topowfor an operation that squares to the identity.The exponent is reduced modulo 2: even exponents give the identity on
op.num_qubitsqubits, odd exponents giveop, and other values give aPowerwith the reduced exponent.- Raises:
ValueError – If the exponent is even and
opacts on no qubits.