CONTRARY TO popular belief, Ronald Reagan, staunch supporter of Taiwan, has given communist China more than any president since Richard Nixon, and as a result has dramatically improved Sino- American relations. That is the import of Defense Secretary Caspar Weinberger's presence in Peking this weekend.

To be sure, a number of irritants remain, including Pan American World Airways' resumption of flights to Taiwan. Outstanding issues might still unravel the remarkable progress made in recent months. But it is indisputable that the Reagan administration's recent concessions have vastly improved relations that it had allowed to deteriorate considerably earlier in its tenure.

Weinberger's current visit is the first high-level military exchange since 1980, and it is the first in a series of high-level Sino-American exchanges. Next month the Chinese Foreign Minister, Wu Xueqian, is due here, and next year the Chinese premier, Zhao Ziyang, and President Reagan plan to exchange visits to Washington and Peking.

Remarkably, the administration's new chumminess with Peking has not seriously ruffled Taiwan's feathers. Right-wing Americans loyal to Taiwan are not currently complaining loudly about Reagan's policy.

Secretary of State George P. Shultz's visit to China last February set the stage for a policy reassessment in Washington. Since then a number of key issues which were aggravating the relationship have been settled or put on the road to resolution. All of them revolve around the concern that matters most to Peking: U.S. cooperation in China's ambitious economic modernization program. These include:

High technology. During a visit to Peking in May, Commerce Secretary Malcolm Baldridge announced that the administration was liberalizing its export policy toward China, putting it into "Category V," which includes the NATO allies, Japan and Yugoslavia. The new guidelines will allow China to purchase sophisticated electronic equipment, including computer hardware and software, machinery that will allow the Chinese to make their own semiconductor chips, and items that could have a military use. "High tech" transfer is China's highest priority; shortly after Baldridge set this new policy, the Chinese set a date for Weinberger's current visit. It had been on a back burner for nearly two years.

Textiles. In late July, the administration yielded to Chinese pressure and granted Peking a new quota for textile sales to the U.S. that is far more generous than it has given other Asian exporters. When the previous accord expired, the U.S. had imposed unilateral quotas at a level China considered too low. The Chinese retaliated by banning U.S. farm imports. That ban -- which American farmers said cost them $500 million -- has now been lifted.

Nuclear accord. A Sino-American bilateral agreement on nuclear energy is now imminent. China has applied for membership in the International Atomic Energy Agency and has offered to put its civilian reactors under international safeguards, and to curb its exports of nuclear material to potential proliferators. American firms may get contracts for China's planned nuclear power industry.

Energy. ARCO, Exxon and Occidental Petroleum have recently won drilling rights to massive reserves in the South China sea. Fluor Corp. and Occidental are involved in big coal- mining schemes.

A key to improved relations was last year's communique in which the United States promised to limit arms sales to the offshore Republic of China and eventually end them altogether in return for Peking's pledge to pursue "peaceful reunification" with Taiwan. The Reagan administration went further in that document than the Nixon, Ford or Carter administrations had been willing to go, but it probably had to. As then- Secretary of State Alexander M. Haig explained to President Reagan in a memo in 1981, "Our campaign rhetoric and subsequent behavior gave Peking the impression we wanted to reverse normalization and pursue a two-Chinas policy."

Last year's ambiguous communique on Taiwan allowed both sides to interpret the document to suit their domestic political needs. The ambiguity has enabled Reagan to keep up the flow of arms to Taiwan and even let the Taiwanese government open a consular office in Boston. In July, the administration unveiled a $530-million arms package for Taiwan, one of the largest single deals ever. Though China protested, it nevertheless decided to roll out the red carpet for Weinberger.

Another explanation of the new situation is bureaucratic. Because Asia has been largely on the back burner of the administration's foreign policy concerns, politically-appointed ideologues have left it to the bureaucracy -- the foreign service professionals and other experts within the government.

China's own priorities have dovetailed with the emerging U.S. policy. Peking clearly wants U.S. assistance in economic development -- its top priority. But the opening to the West engineered by elder statesman Deng Xiaoping, and continuing sensitivity over Taiwan, leaves the regime vulnerable to internal criticism that it is being manipuilated by foreign "barbarians."

To deal with that, Peking has gone back to more of a Third World posture politically. Though its strategic assumptions are unchanged -- Chinese missiles still point toward the Soviet Union -- Peking has again equated the two superpowers in its public prouncements. U.S. and Chinese interests may be parallel on Afghanistan and Cambodia, but Peking has become one of the loudest critics of U.S. policy in southern Africa, the Middle East and Central America.

At the same time China appears determined to improve its relations with the Soviet Union. Thus Peking declined to support the American- sponsored condemnation of the Soviet downing of Flight 007 at the United Nations.

But Weinberger's trip to Peking could result in China buying U.S. military hardware. The irony of Ronald Reagan selling arms to a major communist power may be hard to comprehend, but it testifies to a triumph of realism over ideology and may be the administration's only tangible foreign policy success. Perhaps there is a lesson there.