class_docstr: Tests for the Local Hilbert-Schmidt template.
docstr: Test if the LHS operation is correctly decomposed for 2 qubits.
docstr_tok: ["Test","if","the","LHS","operation","is","correctly","decomposed","for","2","qubits","."]
code: def test_lhs_decomposition_2_qubits(self):
      """Test if the LHS operation is correctly decomposed for 2 qubits."""
      with qml.queuing.AnnotatedQueue() as q_U:
          qml.SWAP(wires=[0, 1])
  
      U = qml.tape.QuantumScript.from_queue(q_U)
  
      def v_circuit(params):
          qml.RZ(params[0], wires=2)
          qml.CNOT(wires=[2, 3])
  
      op = qml.LocalHilbertSchmidt(
          [0.1], v_function=v_circuit, v_wires=[2, 3], u_tape=U
      )
  
      with qml.queuing.AnnotatedQueue() as q_tape_dec:
          op.decomposition()
  
      tape_dec = qml.tape.QuantumScript.from_queue(q_tape_dec)
      expected_operations = [
          qml.Hadamard(wires=[0]),
          qml.Hadamard(wires=[1]),
          qml.CNOT(wires=[0, 2]),
          qml.CNOT(wires=[1, 3]),
          qml.SWAP(wires=[0, 1]),
          qml.RZ(-0.1, wires=[2]),
          qml.CNOT(wires=[2, 3]),
          qml.CNOT(wires=[0, 2]),
          qml.Hadamard(wires=[0]),
      ]
      assert tape_dec.operations == expected_operations
  
imports: import pytest
  import pennylane
label_desc: Use image node_id 3 for calling the TestLocalHilbertSchmidt obj's underlying member method code with example usage: obj.test_lhs_decomposition_2_qubits() without return types