class_docstr: Tests for the projector observable.
class_docstr_tok: ["Tests","for","the","projector","observable","."]
docstr: Test that the projector raised to a positive integer is just a copy.
docstr_tok: ["Test","that","the","projector","raised","to","a","positive","integer","is","just","a","copy","."]
code: def test_pow_non_zero_positive_int(self, n):
      """Test that the projector raised to a positive integer is just a copy."""
      # Basis state projector
      basis_state = np.array([0, 1])
      op = qml.Projector(basis_state, wires=(0, 1))
      pow_op = op.pow(n)[0]
      assert qml.equal(op, pow_op)
  
      # State vector projector
      state_vector = np.array([0, 1])
      op = qml.Projector(state_vector, wires=[0])
      pow_op = op.pow(n)[0]
      assert qml.equal(op, pow_op)
  
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 4 for calling the TestProjector obj's underlying member method code with example usage: obj.test_pow_non_zero_positive_int(n) without return types