class_docstr: 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_broadcasted(
      self, n_wires, weight_shape, expected_names
  ):
      """Checks the queue for the default settings."""
  
      n_broadcast = 3
      features = list(range(n_wires))
      broadcasted_features = np.arange(n_wires * n_broadcast).reshape(
          (n_broadcast, n_wires)
      )
      weights = np.zeros(shape=weight_shape)
      broadcasted_weights = np.zeros(
          shape=(n_broadcast,) + weight_shape
      )
  
      # Only broadcast features
      op = qml.QAOAEmbedding(
          broadcasted_features, weights, wires=range(n_wires)
      )
      assert op.batch_size == n_broadcast
      tape = op.expand()
  
      for i, gate in enumerate(tape.operations):
          assert gate.name == expected_names[i]
          if gate.name == "RX":  # These are the feature-encoding gates
              assert gate.batch_size == n_broadcast
          else:  # These are the trainable weights gates
              assert gate.batch_size is None
  
      # Only broadcast weights
      op = qml.QAOAEmbedding(
          features, broadcasted_weights, wires=range(n_wires)
      )
      assert op.batch_size == n_broadcast
      tape = op.expand()
  
      for i, gate in enumerate(tape.operations):
          assert gate.name == expected_names[i]
          if gate.name == "RX":  # These are the feature-encoding gates
              assert gate.batch_size is None
          else:  # These are the trainable weights gates
              assert gate.batch_size == n_broadcast
  
      # Broadcast weights and features
      op = qml.QAOAEmbedding(
          broadcasted_features,
          broadcasted_weights,
          wires=range(n_wires),
      )
      assert op.batch_size == n_broadcast
      tape = op.expand()
  
      for i, gate in enumerate(tape.operations):
          assert gate.name == expected_names[i]
          assert gate.batch_size == n_broadcast
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 2 for calling the TestDecomposition obj's underlying member method code with example usage: obj.test_expansion_broadcasted(n_wires, weight_shape, expected_names) without return types