Nucleus–nucleus potential from identical-particle interference