class_docstr: Test the construction of composite ops.
class_docstr_tok: ["Test","the","construction","of","composite","ops","."]
docstr: Test that an error is raised if the operands have different batch sizes.
docstr_tok: ["Test","that","an","error","is","raised","if","the","operands","have","different","batch","sizes","."]
code: def test_different_batch_sizes_raises_error(self):
      """Test that an error is raised if the operands have different batch sizes."""
      base = qml.RX(np.array([1.2, 2.3, 3.4]), 0)
      op = ValidOp(
          base, qml.RY(1, 0), qml.RZ(np.array([1, 2, 3, 4]), wires=2)
      )
      with pytest.raises(
          ValueError,
          match="Broadcasting was attempted but the broadcasted dimensions",
      ):
          _ = op.batch_size
  
imports: from copy import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.operation import DecompositionUndefinedError
  from pennylane.ops.op_math import CompositeOp, Prod, Sum, SProd
  from pennylane.wires import Wires
label_desc: Use image node_id 12 for calling the TestConstruction obj's underlying member method code with example usage: obj.test_different_batch_sizes_raises_error() without return types