class_docstr: Tests for the ControlledQutritUnitary operation
class_docstr_tok: ["Tests","for","the","ControlledQutritUnitary","operation"]
docstr: Tests the metadata and unitary for an adjoint ControlledQutritUnitary operation.
docstr_tok: ["Tests","the","metadata","and","unitary","for","an","adjoint","ControlledQutritUnitary","operation","."]
code: def test_adjoint(self):
      """Tests the metadata and unitary for an adjoint ControlledQutritUnitary operation."""
      U1 = unitary_group.rvs(3, random_state=10)
  
      op = qml.ControlledQutritUnitary(
          U1, control_wires=("b", "c"), wires="a", control_values="01"
      )
  
      adjoint_op = op.adjoint()
      assert isinstance(adjoint_op, qml.ControlledQutritUnitary)
  
      assert (
          adjoint_op.hyperparameters["u_wires"]
          == op.hyperparameters["u_wires"]
      )
      assert adjoint_op.control_wires == op.control_wires
      assert adjoint_op.control_values == op.control_values
  
      adjoint_mat = op.data[0].T.conj()
      assert qml.math.allclose(adjoint_op.data[0], adjoint_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 15 for calling the TestControlledQutritUnitary obj's underlying member method code with example usage: obj.test_adjoint() without return types