Seven months after expelling three American military attaches for allegedly spying on its strategic installations, the South African government has given top-level briefings and tours of military facilities to a delegation from the House Armed Services Committee.

Part of the U.S. group, which has completed a three-day visit to South Africa, also made a one-day trip to Zimbabwe-Rhodesia, whose future is hanging in the balance as the British-sponsored peace talks on the former British colony proceed in London.

The committee members' visit to the two southern African countries is part of an African tour they described as a routine fact-finding trip. The group also will visit Sudan, Tanzania and Nigeria.But the South African and Zimbabwe-Rhodesian stops are unusual because Washington observes a mandatory United Nations arms embargo against South Africa and an all-encompassing economic boycott against its northern neighbor.

When asked why they would visit these two countries under these circumstances, Armed Services Committee Chairman, Melvin Price (D-Ill.) said he thought South Africa was important to U.S. strategic interests "otherwise we wouldn't be here. Our visit is because of our interests in defense matters."

Leaving Salisbury airport for South Africa today, another U.S. delegation member said he thought "we learned more in less than 24 hours than we have in almost any place by coming to Rhodesia." The 10 members who traveled to this war-torn country met Prime Minister Abel Muzorewa whose government is considered illegal by the rest of international community.

They also were given a military briefing on the seven-year-old guerrilla war between the government forces and the guerrillas who oppose Muzorewa. At a cocktail party they met a cross section of community leaders, including representatives of the guerrillas' political wings, who are allowed to live here.

Meanwhile, other members of the committee went to Cape Town and visited South Africa's naval base at Simonstown, where American ships have not called since the early 1960s as a protest against South Africa's racial policies.

Committee members would not say how the visit might have changed their views on American-South African military ties. Price said they would present a report to the president.

One member said he was in favor of the U.S. restricting its arms boycott of South Africa to purely offensive weapons at present. Washington also imposes a ban on the sale of "gray area" items that can have both military and nonmilitary uses.

"Everyone in South Africa should appreciate their visit because it is the only way to show the world what we are doing in South Africa," a South African military officer said.

The friendly reception given the delegation by South African officials so soon after the dramatic expulsion of the three military attaches last April is another sign of South Africa's ambiguous relationship with the U.S.

Resentment of American criticism of its internal racially based policy of apartheid provokes South Africa periodically to threaten that it will not cooperate to protect Western interests against Soviet activity in the area. On several occasions, South African officials have threatened to take a neutral position in any East-West conflict and even to side with the East if it is in South African interests.

American officials do not take these remarks seriously because of South Africa's vehement anti-Soviet philosophy.

Two South African military attaches were expelled from Washington last spring in retaliation for the explusion of the American officials. But not long after the incident, relations between the two countries returned to normal, according to American sources.

"They acted as if nothing happened," said one American diplomat. Although South Africa appears to want to restore the embassy defense detachments to their previous levels, no action has yet been taken to do so.

Western military aid to the Salisbury government is not an issue at the moment. But if the British plans for a cease-fire and elections are not successful, and the war continues in a country that has several strategic minerals needed by the United States, it could become a controversial point.

According to one American diplomat, the visit to Zimbabwe-Rhodesia caused "some concern" since the U.S. government was eager to assure that it not be taken as any kind of de facto recognition of the Muzorewa government at a delicate time in the London talks.

The trip also is sure to encourage the South African government in its belief that despite the mandatory arms embargo, it can continue to keep the lines open with Washington on military matters, a situation Pretoria views as essential in the face of what it perceives as Soviet "expansionist" activity in southern Africa. That activity includes supplying arms to black nationalist guerrillas fighting in Zimbabwe-Rhodesia Nambia (Southwest Africa) and to a very limited degree, in South Africa.

Military cooperation between South Africa and the United States consists mainly of exchanges of information.