class_docstr: Tests that non-Gaussian gates are properly handled.
docstr: ops: Tests that proper exceptions are raised if we try to call the
  Heisenberg transformation of non-Gaussian gates.
docstr_tok: ["ops",":","Tests","that","proper","exceptions","are","raised","if","we","try","to","call","the","Heisenberg","transformation","of","non-Gaussian","gates","."]
code: def test_heisenberg_transformation_nongaussian(self):
      """ops: Tests that proper exceptions are raised if we try to call the
      Heisenberg transformation of non-Gaussian gates."""
      op = cv.Kerr(0.1, wires=0)
      with pytest.raises(
          RuntimeError, match=r"not a Gaussian operation"
      ):
          op.heisenberg_tr(Wires(range(op.num_wires)))
  
      op = cv.CrossKerr(0.1, wires=[0, 1])
      with pytest.raises(RuntimeError):
          op.heisenberg_tr(Wires(range(op.num_wires)))
  
      cv.CubicPhase(0.1, wires=0)
      with pytest.raises(RuntimeError):
          op.heisenberg_tr(Wires(range(op.num_wires)))
  
imports: import pytest
  import numpy.testing
  from pennylane import numpy
  from pennylane.operation import AnyWires
  from pennylane.ops import cv
  from pennylane.wires import Wires
label_desc: Use image node_id 2 for calling the TestNonGaussian obj's underlying member method code with example usage: obj.test_heisenberg_transformation_nongaussian() without return types