class_docstr: Test inputs and pre-processing.
class_docstr_tok: ["Test","inputs","and","pre-processing","."]
docstr: Tests that the correct error messages is raised when
  the basis state contains numbers different from 0 and 1.
docstr_tok: ["Tests","that","the","correct","error","messages","is","raised","when","the","basis","state","contains","numbers","different","from","0","and","1","."]
code: def test_error_basis_state_format(self, basis_state, wires):
      """Tests that the correct error messages is raised when
      the basis state contains numbers different from 0 and 1."""
  
      with pytest.raises(
          ValueError, match="Basis states must only (contain|consist)"
      ):
          qml.BasisStatePreparation(basis_state, wires)
  
file_path: pennylane/tests/templates/test_state_preparations/test_basis_state_prep.py
imports: import pytest
  import numpy
  import pennylane
label_desc: Use image node_id 2 for calling the TestInputs obj's underlying member method code with example usage: obj.test_error_basis_state_format(basis_state, wires) without return types