class_docstr: Test that amplitude embedding gates are combined into a single.
docstr: Check that AmplitudeEmbedding cannot be applied if the qubit has already been used.
docstr_tok: ["Check","that","AmplitudeEmbedding","can","not","be","applied","if","the","qubit","has","already","been","used","."]
code: def test_repeated_qubit(self):
      """Check that AmplitudeEmbedding cannot be applied if the qubit has already been used."""
  
      def qfunc():
          qml.CNOT(wires=[0.0, 1.0])
          qml.AmplitudeEmbedding([0.0, 1.0], wires=1)
  
      transformed_qfunc = merge_amplitude_embedding(qfunc)
  
      dev = qml.device("default.qubit", wires=2)
      qnode = qml.QNode(transformed_qfunc, dev)
  
      with pytest.raises(
          DeviceError, match="applied in the same qubit"
      ):
          qnode()
  
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 3 for calling the TestMergeAmplitudeEmbedding obj's underlying member method code with example usage: obj.test_repeated_qubit() without return types