def METHOD_NAME(self):
    """Test x and y directions."""
    line = LineLattice(num_nodes=2)
    xy_coupling = (0.5, 0.5, 0.0)
    xy_ext_magnetic_field = (-0.75, 0.25, 0.0)
    xy_test_hm = HeisenbergModel(
        lattice=line, coupling_constants=xy_coupling, ext_magnetic_field=xy_ext_magnetic_field
    )
    with self.subTest("Check if if x and y params are being applied."):
        terms = [
            ("X_0 X_1", 0.5),
            ("Y_0 Y_1", 0.5),
            ("X_0", -0.75),
            ("Y_0", 0.25),
            ("X_1", -0.75),
            ("Y_1", 0.25),
        ]
        hamiltonian = terms
        self.assertSetEqual(set(hamiltonian), set(xy_test_hm.second_q_op().items()))