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