State mandated atheism does leads to communism.

There are many examples where secular nations have not. France, Sweden, Denmark, Norway, Japan, Netherlands, Czech Republic, The United States.

They may all have problems, but communism isn't one of them.