class_docstr: Test different interface matrices with qutrit.
class_docstr_tok: ["Test","different","interface","matrices","with","qutrit","."]
docstr: Interface independent helper method.
docstr_tok: ["Interface","independent","helper","method","."]
code: def check_interface(self, mat):
      """Interface independent helper method."""
  
      op = qml.QutritUnitary(mat, wires=0)
  
      cache = {"matrices": []}
      assert op.label(cache=cache) == "U(M0)"
      assert qml.math.allclose(cache["matrices"][0], mat)
  
      cache = {"matrices": [0, mat, 0]}
      assert op.label(cache=cache) == "U(M1)"
      assert len(cache["matrices"]) == 3
  
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 1 for calling the TestInterfaceMatricesLabel obj's underlying member method code with example usage: obj.check_interface(mat) without return types