class_docstr: Test the expansion of operations without a unitary generator.
class_docstr_tok: ["Test","the","expansion","of","operations","without","a","unitary","generator","."]
docstr: Test that decompositions actually only contain unitarily
  generated operators (Bug #4055).
docstr_tok: ["Test","that","decompositions","actually","only","contain","unitarily","generated","operators","(","Bug","#","4055",")","."]
code: def test_decompose_all_nonunitary_generator(self):
      """Test that decompositions actually only contain unitarily
      generated operators (Bug #4055)."""
  
      # Corrected list of unitarily generated operators
      unitarily_generated = [
          "RX",
          "RY",
          "RZ",
          "MultiRZ",
          "PauliRot",
          "IsingXX",
          "IsingYY",
          "IsingZZ",
          "SingleExcitationMinus",
          "SingleExcitationPlus",
          "DoubleExcitationMinus",
          "DoubleExcitationPlus",
      ]
  
      with qml.queuing.AnnotatedQueue() as q:
          # All do not have unitary generator, but previously had this
          # attribute
          qml.IsingXY(0.35, wires=[0, 1])
          qml.SingleExcitation(1.61, wires=[1, 0])
          qml.DoubleExcitation(0.56, wires=[0, 1, 2, 3])
          qml.OrbitalRotation(1.15, wires=[1, 0, 3, 2])
          qml.FermionicSWAP(0.3, wires=[2, 3])
  
      tape = qml.tape.QuantumScript.from_queue(q)
      new_tape = qml.transforms.expand_nonunitary_gen(tape)
  
      for op in new_tape.operations:
          assert op.name in unitarily_generated or op.num_params == 0
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 5 for calling the TestExpandNonunitaryGen obj's underlying member method code with example usage: obj.test_decompose_all_nonunitary_generator() without return types