class_docstr: Test the state_vector() method of various state-prep operations.
class_docstr_tok: ["Test","the","state_vector","(",")","method","of","various","state-prep","operations","."]
docstr: Tests that wires get re-ordered as expected with broadcasting.
docstr_tok: ["Tests","that","wires","get","re-ordered","as","expected","with","broadcasting","."]
code: def test_StatePrep_reordering_broadcasted(self):
      """Tests that wires get re-ordered as expected with broadcasting."""
      qsv_op = qml.StatePrep(
          np.array([[1, -1, 1j, -1j], [1, -1j, -1, 1j]]) / 2,
          wires=[0, 1],
      )
      ket = qsv_op.state_vector(wire_order=[2, 1, 3, 0])
      expected = np.zeros((2,) * 5, dtype=np.complex128)
      expected[0, 0, :, 0, :] = np.array([[1, 1j], [-1, -1j]]) / 2
      expected[1, 0, :, 0, :] = np.array([[1, -1], [-1j, 1j]]) / 2
      assert np.array_equal(ket, expected)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.wires import WireError
label_desc: Use image node_id 4 for calling the TestStateVector obj's underlying member method code with example usage: obj.test_StatePrep_reordering_broadcasted() without return types