class_docstr: Test that the class is intialized correctly.
class_docstr_tok: ["Test","that","the","class","is","intialized","correctly","."]
docstr: Test that all of the attributes are initalized correctly.
docstr_tok: ["Test","that","all","of","the","attributes","are","initalized","correctly","."]
code: def test_init_correctly(
      self, coeffs, ops, time, n, seed
  ):  # pylint: disable=too-many-arguments
      """Test that all of the attributes are initalized correctly."""
      h = qml.dot(coeffs, ops)
      op = qml.QDrift(h, time, n=n, seed=seed)
  
      qml.ops.functions.assert_valid(op)
  
      assert op.wires == h.wires
      assert op.parameters == [time]
      assert op.data == (time,)
  
      assert op.hyperparameters["n"] == n
      assert op.hyperparameters["seed"] == seed
      assert op.hyperparameters["base"] == h
  
      for term in op.hyperparameters["decomposition"]:
          # the decomposition is solely made up of exponentials of ops sampled from hamiltonian terms
          assert term.base in ops
  
imports: import copy
  from functools import reduce
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.math import allclose, isclose
  from pennylane.templates.subroutines.qdrift import _sample_decomposition
label_desc: Use image node_id 1 for calling the TestInitialization obj's underlying member method code with example usage: obj.test_init_correctly(coeffs, ops, time, n, seed) without return types