def test_gate_power1(gate):
    """Tests that power=1 for native gates are correct."""
    mat = cirq.protocols.unitary(gate)
    mat_power1 = cirq.protocols.unitary(gate**1)

    numpy.testing.assert_array_almost_equal(mat, mat_power1)
Tests that power=1 for native gates are correct.
cirq-ionq/cirq_ionq/ionq_native_gates_test.py