class_docstr: Tests that the template defines the correct decomposition.
class_docstr_tok: ["Tests","that","the","template","defines","the","correct","decomposition","."]
docstr: Checks the queue for the default settings.
docstr_tok: ["Checks","the","queue","for","the","default","settings","."]
code: def test_expansion(self, n_wires, expected_names, expected_wires):
      """Checks the queue for the default settings."""
  
      shapes = expected_shapes(1, n_wires)
      weights = [np.random.random(shape) for shape in shapes]
  
      op = qml.CVNeuralNetLayers(*weights, wires=range(n_wires))
      tape = op.expand()
  
      i = 0
      for gate in tape.operations:
          if gate.name != "Interferometer":
              assert gate.name == expected_names[i]
              assert gate.wires.labels == tuple(expected_wires[i])
              i = i + 1
          else:
              for gate_inter in gate.expand().operations:
                  assert gate_inter.name == expected_names[i]
                  assert gate_inter.wires.labels == tuple(
                      expected_wires[i]
                  )
                  i = i + 1
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultGaussian
label_desc: Use image node_id 1 for calling the TestDecomposition obj's underlying member method code with example usage: obj.test_expansion(n_wires, expected_names, expected_wires) without return types