def METHOD_NAME(self):
    """Verifies that exception is raised if the
    number of dimensions of features is incorrect."""
    dev = qml.device("default.qubit", wires=2)
    @qml.qnode(dev)
    def circuit(basis_state):
        qml.BasisStatePreparation(basis_state, wires=range(2))
        return qml.expval(qml.PauliZ(0))
    with pytest.raises(ValueError, match="Basis states must be one-dimensional"):
        basis_state = np.array([[[0, 1]]])
        circuit(basis_state)
    with pytest.raises(ValueError, match="Basis states must be of length"):
        basis_state = np.array([0, 1, 0])
        circuit(basis_state)
    with pytest.raises(ValueError, match="Basis states must only consist of"):
        basis_state = np.array([0, 2])
        circuit(basis_state)