def test_gate_power_not_implemented(gate, power):
    """Tests that any power other than 1 and -1 is not implemented."""
    with pytest.raises(TypeError):
        _ = gate**power
Tests that any power other than 1 and -1 is not implemented.
cirq-ionq/cirq_ionq/ionq_native_gates_test.py