class_docstr: Test the expansion of multi-parameter gates.
class_docstr_tok: ["Test","the","expansion","of","multi-parameter","gates","."]
docstr: Test that a gate is decomposed correctly if it has
  generator[0]==None.
docstr_tok: ["Test","that","a","gate","is","decomposed","correctly","if","it","has","generator","[","0","]","==None","."]
code: def test_no_generator_expansion(self):
      """Test that a gate is decomposed correctly if it has
      generator[0]==None."""
  
      # pylint: disable=invalid-overridden-method
      class _CRX(qml.CRX):
          @property
          def has_generator(self):
              return False
  
          def generator(self):
              raise qml.operations.GeneratorUndefinedError()
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(1.5, wires=0)
          qml.RZ(-2.1, wires=1)
          qml.RY(0.2, wires=1)
          qml.RZ(-0.418, wires=1)
          _CRX(1.5, wires=[0, 2])
  
      tape = qml.tape.QuantumScript.from_queue(q)
      new_tape = qml.transforms.expand_multipar(tape)
      new_ops = new_tape.operations
      expected = [
          "RX",
          "RZ",
          "RY",
          "RZ",
          "RZ",
          "RY",
          "CNOT",
          "RY",
          "CNOT",
          "RZ",
      ]
      assert [op.name for op in new_ops] == expected
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 2 for calling the TestExpandMultipar obj's underlying member method code with example usage: obj.test_no_generator_expansion() and returns: False