class_docstr: Tests for the projector observable.
class_docstr_tok: ["Tests","for","the","projector","observable","."]
docstr: Test that we obtain a _StateVectorProjector when input is a state vector.
docstr_tok: ["Test","that","we","obtain","a","_StateVectorProjector","when","input","is","a","state","vector","."]
code: def test_statevector_projector(self):
      """Test that we obtain a _StateVectorProjector when input is a state vector."""
      state_vector = np.array([1, 1, 1, 1]) / 2
      wires = [0, 1]
      state_vector_projector = qml.Projector(state_vector, wires)
      assert isinstance(state_vector_projector, StateVectorProjector)
  
      second_projector = qml.Projector(state_vector, wires)
      assert qml.equal(second_projector, state_vector_projector)
  
      qml.ops.functions.assert_valid(state_vector_projector)
  
imports: import functools
  import pickle
  import pytest
  import numpy
  from gate_data import I, X, Y, Z, H
  import pennylane
  from pennylane.ops.qubit.observables import BasisStateProjector, StateVectorProjector
label_desc: Use image node_id 2 for calling the TestProjector obj's underlying member method code with example usage: obj.test_statevector_projector() without return types