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 given an array of some type, the resulting state vector is also that type.
docstr_tok: ["Tests","that","given","an","array","of","some","type",",","the","resulting","state","vector","is","also","that","type","."]
code: def test_StatePrep_state_vector_preserves_parameter_type_broadcasted(
      self, interface
  ):
      """Tests that given an array of some type, the resulting state vector is also that type."""
      qsv_op = qml.StatePrep(
          qml.math.array([[0, 0, 0, 1], [1, 0, 0, 0]], like=interface),
          wires=[1, 2],
      )
      assert qml.math.get_interface(qsv_op.state_vector()) == interface
      assert (
          qml.math.get_interface(
              qsv_op.state_vector(wire_order=[0, 1, 2])
          )
          == interface
      )
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.wires import WireError
label_desc: Use image node_id 6 for calling the TestStateVector obj's underlying member method code with example usage: obj.test_StatePrep_state_vector_preserves_parameter_type_broadcasted(interface) without return types