class_docstr: Tests that the template defines the correct decomposition.
class_docstr_tok: ["Tests","that","the","template","defines","the","correct","decomposition","."]
docstr: Test that attempting to decompose a MottonenStatePreparation operation with
  broadcasting raises an error.
docstr_tok: ["Test","that","attempting","to","decompose","a","MottonenStatePreparation","operation","with","broadcasting","raises","an","error","."]
code: def test_batched_decomposition_fails(self):
      """Test that attempting to decompose a MottonenStatePreparation operation with
      broadcasting raises an error."""
      state = np.array(
          [[1 / 2, 1 / 2, 1 / 2, 1 / 2], [0.0, 0.0, 0.0, 1.0]]
      )
  
      op = qml.MottonenStatePreparation(state, wires=[0, 1])
      with pytest.raises(
          ValueError, match="Broadcasting with MottonenStatePreparation"
      ):
          _ = op.decomposition()
  
      with pytest.raises(
          ValueError, match="Broadcasting with MottonenStatePreparation"
      ):
          _ = qml.MottonenStatePreparation.compute_decomposition(
              state, qml.wires.Wires([0, 1])
          )
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.templates.state_preparations.mottonen import gray_code, _get_alpha_y
label_desc: Use image node_id 5 for calling the TestDecomposition obj's underlying member method code with example usage: obj.test_batched_decomposition_fails() without return types