Despite a flow of official rhetoric trumpeting "genuine nonalignment" and President Carter's plans to visit here, India still maintains closer ties with the Soviet Union than with the United States.

While the government expressed disappointed last week at the post-ponement of Carter's visit, the change in plans had little effect on relations with the United States, which are expected to remain correct but somewhat distant.

The reason in a word, is China: Prime Minister Morarji Desai, like his predecessor Indira Gandhi, is fearful of India's vast neighbor. In the Soviet Union, India sees [WORD ILLEGIBLE] against possible Chinese aggression. The United States role remains doubtful.

Another potential problem in U.S. Indian relations President Carter's desire to see India limit its nuclear advances.

Although the United States has accepted Prime Minister Desai's assurances that India will not use its nuclear capacity to produce weapons, the Carter administration would like India to sign the nuclear nonproliferation treat or at least agree to fullscale international controls for all its nuclear projects.

Some observers here believe that Desai would willingly submit to such controls, but that he cannot overcome political and bureaucratic opposition.

In this area, too, the Soviet Union has shrewdly exploited its advantage over the United Staes. Although both superpowers strongly oppose India's developing nuclear weapons, the Soviets appear to be leaving the role of bad guy to the Americans.

When Desai visited Moscow last month, the prime minister, 81, repeated his assurances that India would not produce atomic bombs. His hosts reportedly sought nothing more.

There is a certain pattern to this. In the 30 years since India won independence from Britain, the United States has pumped $10 billion worth of aid into India, more than was provided any other developing country. Those Americans who believe that such generosity deserves thanks, or at least quiet appreciation, have gone away disappointed.

The Soveits, on the other hand, have come to India's side at particular moments of need or crisis. When the Indian air force needed modern fighter-bombers, the Soviets provided Migs. When the late Prime Minister Jawaharlal Nehru wanted to build a prestigious steel mill at Bokaro, the Soviets stepped forward. When Nehru's daughter, Indira Ghandi, led her country to war against Pakistan in 1971, the Soviets offered moral support, this time signing a 25-year friendship pact.

In all these cases, the United States either could not come to terms with India, or, as in the case of the 1971 war for the independence of Bangladesh, "tilted" toward India's enemy, Pakistan.

When Ghandhi's government was succeeded in March by a coalition including several avowedly pro-Western ministers, many diplomats and journalists foresaw a new direction in India's foreign policy, a swerve away from Moscow and toward Washington.

This was not to be. Within the first weeks after the Desai government came to power, Soveit Foreign Minister Andrei Gromyko flew to New Delhi, alarmed and disturbed. The Soviets had openly backed Ghandhi's authoritarian period of "emergency" rule, under which Desai and most of his ministers had suffered. INDIA

Gromyko quickly found he had little cause for worry. His Indian counterpart. Foreign Minister Atal Behari Vajpayee, assured him that India regarded its relationship with the Soviet Union as the cornerstone of its foreign policy. Vajpayee had been regarded as the most "pro-American" member of the Cabinet.

Deasi's trip to the Kremlin last month eliminated any doubts that may have lingered in the minds of Gromyko and Soviet President Leonid Brezhnev.

None of this is to suggest that the Desai government does not want to improve its relations with the United States. It does. To a certain extent, the relationship has already begun to warm up, possibly, for superficial reasons.

Desai, a teetotaler who is devoting a lot of energy to imposing prohibition in India, and Carter, who has expressed his distaste for the three-martini lunch, are both deeply religious men who lead seemingly simple lives and share publicly stated concern for the future of democratic government.

Keen observers, like columnist N.J. Nandpuria of the Hindustan Times, have warned that these common themes are not adequate bases for genuinely improved relations, but an American source here noted recently that there is a lot more traffic these days between the elaborate white marble U.S. embassy and the red sandstone ministerial office building.

"This government is far less reticent about talking to us on a whole range of issues than Mrs. Gandhi's crowd was," the source said.

Most Indians are proud of the ballot box revolution that overturned Gandhi and are pleased by Carter's recognition of this achievement. There has long been a deep-seated desire among many Indians to see "the world's largest democracy" treated as an equal by the United States, the second largest.

A top Indian Foreign Ministry official stressed, however, that relations with the United States could not be meaningfully improved at any cost to India's ties to the Soviet Union.

This official did not say that the reason for this was India's need for a powerflu ally against China. But, in the words of one Western ambassador, "It's always been in the back of their minds" since the Himalayan border war in 1962 when Chinese forces struck deep into India.

In the last few monts, there have been some faint signs of India's desire to reduce its reliance on the Soviet Union for most of its military equipment. The Defense Military, for example, is considering buying vertical-takeoff-and-landing fighter planes from Britain. Unless the Carter administration is prepared to offer U.S. military equipment, however, India will continue to be closely tied to Moscow for the bulk of its arsenal.