class_docstr: Tests for the broadcast_expand transform
class_docstr_tok: ["Tests","for","the","broadcast_expand","transform"]
docstr: Test that unbroadcasted operators are not copied
docstr_tok: ["Test","that","unbroadcasted","operators","are","not","copied"]
code: def test_not_copied(self):
      """Test that unbroadcasted operators are not copied"""
      x = np.array([0.5, 0.7, 0.9])
      y = np.array(1.5)
  
      ops = [qml.RX(x, wires=0), qml.RY(y, wires=0)]
      meas = [qml.expval(qml.PauliZ(0))]
      tape = qml.tape.QuantumScript(ops, meas)
  
      tapes = qml.transforms.broadcast_expand(tape)[0]
      assert len(tapes) == 3
      assert all(t.batch_size is None for t in tapes)
  
      for t in tapes:
          # different instance of RX
          assert t.operations[0] is not tape.operations[0]
  
          # same instance of RY
          assert t.operations[1] is tape.operations[1]
  
file_path: pennylane/tests/transforms/test_broadcast_expand.py
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 4 for calling the TestBroadcastExpand obj's underlying member method code with example usage: obj.test_not_copied() without return types