class_docstr: Test that adjacent rotation gates of the same type will add the angles.
docstr: Test that specifying a subset of operations to include merges correctly.
docstr_tok: ["Test","that","specifying","a","subset","of","operations","to","include","merges","correctly","."]
code: def test_two_qubits_merge_gate_subset(self):
      """Test that specifying a subset of operations to include merges correctly."""
  
      def qfunc():
          qml.CRX(0.1, wires=[0, 1])
          qml.CRX(0.2, wires=[0, 1])
          qml.RY(0.3, wires=["a"])
          qml.RY(0.5, wires=["a"])
          qml.RX(-0.5, wires=[2])
          qml.RX(0.2, wires=[2])
          qml.RZ(0.2, wires=[2])
  
      transformed_qfunc = merge_rotations(
          qfunc, include_gates=["RX", "CRX"]
      )
  
      ops = qml.tape.make_qscript(transformed_qfunc)().operations
  
      names_expected = ["CRX", "RY", "RY", "RX", "RZ"]
      wires_expected = [
          Wires([0, 1]),
          Wires("a"),
          Wires("a"),
          Wires(2),
          Wires(2),
      ]
      compare_operation_lists(ops, names_expected, wires_expected)
  
      assert qml.math.isclose(ops[0].parameters[0], 0.3)
      assert qml.math.isclose(ops[1].parameters[0], 0.3)
      assert qml.math.isclose(ops[2].parameters[0], 0.5)
      assert qml.math.isclose(ops[3].parameters[0], -0.3)
  
imports: import pytest
  from utils import compare_operation_lists
  import pennylane
  from pennylane import numpy
  from pennylane.wires import Wires
  from pennylane.transforms.optimization import merge_rotations
label_desc: Use image node_id 6 for calling the TestMergeRotations obj's underlying member method code with example usage: obj.test_two_qubits_merge_gate_subset() without return types