class_docstr: Tests for the ControlledQutritUnitary operation
class_docstr_tok: ["Tests","for","the","ControlledQutritUnitary","operation"]
docstr: Test if ControlledQutritUnitary properly handles invalid mixed-polarity
  control values.
docstr_tok: ["Test","if","ControlledQutritUnitary","properly","handles","invalid","mixed-polarity","control","values","."]
code: def test_invalid_mixed_polarity_controls(
      self, control_wires, wires, control_values, expected_error_message
  ):
      """Test if ControlledQutritUnitary properly handles invalid mixed-polarity
      control values."""
      target_wires = Wires(wires)
  
      with pytest.raises(ValueError, match=expected_error_message):
          qml.ControlledQutritUnitary(
              U_thadamard_01,
              control_wires=control_wires,
              wires=target_wires,
              control_values=control_values,
          ).matrix()
  
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 5 for calling the TestControlledQutritUnitary obj's underlying member method code with example usage: obj.test_invalid_mixed_polarity_controls(control_wires, wires, control_values, expected_error_message) without return types