Atheists becoming a head of state

If an atheist becomes the prime minister of India, I wonder if his oath is valid? “I, [name], do swear in the name of God …” or for that matter in most countries and offices where the oath of office begins this way? Wonder what exactly is a secular country by definition if atheists can’t technically become its leader or have to handle bills that say “in god we trust”!