class_docstr: Tests for the QuantumMonteCarlo template
class_docstr_tok: ["Tests","for","the","QuantumMonteCarlo","template"]
docstr: Test if a ValueError is raised when a non-flat array is input
docstr_tok: ["Test","if","a","ValueError","is","raised","when","a","non-flat","array","is","input"]
code: def test_non_flat(self):
      """Test if a ValueError is raised when a non-flat array is input"""
      p = np.ones((4, 1)) / 4
      with pytest.raises(
          ValueError,
          match="The probability distribution must be specified as a",
      ):
          QuantumMonteCarlo(p, self.func, range(3), range(3, 5))
  
imports: import numpy
  import pytest
  from scipy.stats import norm
  import pennylane
  from pennylane.templates.subroutines.qmc import QuantumMonteCarlo, _make_V, _make_Z, func_to_unitary, make_Q, probs_to_unitary
  from pennylane.wires import Wires
label_desc: Use image node_id 3 for calling the TestQuantumMonteCarlo obj's underlying member method code with example usage: obj.test_non_flat() without return types