Chinese officials began talks here yesterday on a long-stalled agreement that could allow U.S. firms to sell equipment for China's nuclear power program. At the same time, Pentagon spokesmen confirmed that Defense Secretary Caspar W. Weinberger had accepted a Chinese invitation to visit Peking.

Both moves appeared to signal a possible improvement in Sino-American relations, which have been strained over the issue of U.S. arms sales to Taiwan. Officials cautioned, however, that the nuclear talks might not produce any agreement, leaving a two-year-old impasse unresolved.

Weinberger's visit could have particular significance. The defense secretary is known to the Chinese as a hard-liner who fought a losing battle against President Reagan's decision this spring to ease U.S. rules limiting exports to China of high-technology equipment such as computers that could have military applications.

Administration officials said yesterday that dates for the Weinberger trip were still being worked out. But diplomats in Peking said he was expected there in September, before the U.S. visit of Foreign Minister Wu Xueqian, which is scheduled for October.

Observers here and in Peking cautioned against speculation that the Weinberger trip would lead to major U.S. arms sales to China or to any Sino-American strategic cooperation agreement against the Soviet Union. In recent months China has steered a careful foreign policy course, equidistant from Washington and Moscow.

The visit of the Chinese nuclear delegation was arranged last February during Secretary of State George P. Shultz's trip to Peking. In announcing it yesterday, China's State Commission for Science and Technology said the eight-member delegation headed by commission member Jia Weiwen was here to discuss "the cooperative draft agreement proposed by the American side."

Such an agreement, or a specific presidential waiver that could be blocked by Congress, is required under the 1978 U.S. Nuclear Nonproliferation Act before any U.S. nuclear equipment can be sold to China. China has developed its own nuclear weapons, but has not signed the 1968 Nuclear Nonproliferation Treaty and has refused to open its nuclear facilities to international inspection, raising charges that it might seek to use U.S.-supplied materials to help other countries obtain nuclear weapons.

There have been reports that China has helped Pakistan's nuclear weapons development program and has sold uranium to South Africa.

The impasse has blocked efforts by Westinghouse Electric Corp. to sell reactor parts to China, which has turned to France and Britain to negotiate for reactors for its nuclear energy program.

The last effort at breaking the Sino-American deadlock on nuclear cooperation was abandoned two years ago, and it was unclear how the impasse could be resolved unless China would open its facilities to outside inspectors or the United States would offer to waive its congressional restrictions.

As the Chinese delegation opened three days of talks with the U.S. team headed by State Department nonproliferation adviser Richard Kennedy, administration officials refused to speculate on the chances for a breakthrough.

News agency reports from Peking quoting China's announcement of the mission to Washington suggested that the talks were expected to produce results.

"The Chinese side does not object to signing a cooperative agreement between the Chinese and American governments on the peaceful uses of nuclear energy," the statement said. "We are willing to study constructive proposals on this issue as well as the cooperative draft agreement proposed by the American side."

Observers here noted that Peking was close to concluding a deal with a French firm for four reactors, and it was possible that sending its delegation to Washington was intended as a warning to the French that China might find a way to use U.S. suppliers.