class_docstr: Test the state_vector() method of QutritBasisState operation.
class_docstr_tok: ["Test","the","state_vector","(",")","method","of","QutritBasisState","operation","."]
docstr: Tests that QutritBasisState gives a clear error if a value other than 0, 1, or 2 is given.
docstr_tok: ["Tests","that","QutritBasisState","gives","a","clear","error","if","a","value","other","than","0",",","1",",","or","2","is","given","."]
code: def test_QutritBasisState_explicitly_checks_0_1_2(self):
      """Tests that QutritBasisState gives a clear error if a value other than 0, 1, or 2 is given."""
      op = qml.QutritBasisState([3, 1], wires=[0, 1])
      with pytest.raises(
          ValueError,
          match="QutritBasisState parameter must consist of 0, 1 or 2 integers.",
      ):
          _ = op.state_vector()
  
file_path: pennylane/tests/ops/qutrit/test_qutrit_state_prep.py
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.wires import WireError
label_desc: Use image node_id 5 for calling the TestStateVector obj's underlying member method code with example usage: obj.test_QutritBasisState_explicitly_checks_0_1_2() without return types