The two countries have a long history of confusing each other. By definition, any alliance with a superpower is unequal; so efforts to establish close ties with the United States have long run up against India’s tradition of strategic autonomy.