class_docstr: Test that amplitude embedding gates are combined into a single.
docstr: Test that the transformation is working correctly by joining two AmplitudeEmbedding.
docstr_tok: ["Test","that","the","transformation","is","working","correctly","by","joining","two","AmplitudeEmbedding","."]
code: def test_multi_amplitude_embedding(self):
      """Test that the transformation is working correctly by joining two AmplitudeEmbedding."""
  
      def qfunc():
          qml.AmplitudeEmbedding([0.0, 1.0], wires=0)
          qml.AmplitudeEmbedding([0.0, 1.0], wires=1)
          qml.Hadamard(wires=0)
          qml.Hadamard(wires=0)
          return qml.state()
  
      transformed_qfunc = merge_amplitude_embedding(qfunc)
      ops = qml.tape.make_qscript(transformed_qfunc)().operations
  
      assert len(ops) == 3
  
      # Check that the solution is as expected.
      dev = qml.device("default.qubit", wires=2)
      assert np.allclose(qml.QNode(transformed_qfunc, dev)()[-1], 1)
  
file_path: pennylane/tests/transforms/test_optimization/test_merge_amplitude_embedding.py
imports: import pytest
  from pennylane import numpy
  import pennylane
  from pennylane.transforms.optimization import merge_amplitude_embedding
  from pennylane._device import DeviceError
label_desc: Use image node_id 1 for calling the TestMergeAmplitudeEmbedding obj's underlying member method code with example usage: obj.test_multi_amplitude_embedding() and returns: qml