class_docstr: Tests for the QutritUnitary class.
class_docstr_tok: ["Tests","for","the","QutritUnitary","class","."]
docstr: Test qutrit unitary raised to an integer power.
docstr_tok: ["Test","qutrit","unitary","raised","to","an","integer","power","."]
code: def test_qutrit_unitary_pow(self, n):
      """Test qutrit unitary raised to an integer power."""
      op = qml.QutritUnitary(U_thadamard_01, wires="a")
      new_ops = op.pow(n)
  
      assert len(new_ops) == 1
      assert new_ops[0].wires == op.wires
  
      mat_to_pow = qml.math.linalg.matrix_power(qml.matrix(op), n)
      new_mat = qml.matrix(new_ops[0])
  
      assert qml.math.allclose(mat_to_pow, new_mat)
  
imports: import pytest
  import numpy
  from scipy.stats import unitary_group
  from gate_data import TSWAP
  import pennylane
  from pennylane.wires import Wires
  from pennylane.operation import DecompositionUndefinedError
label_desc: Use image node_id 3 for calling the TestQutritUnitary obj's underlying member method code with example usage: obj.test_qutrit_unitary_pow(n) without return types