  We study the Josephson transport in a high-Tc
superconductor/ferromagnetic-insulator(FI)/high-Tc superconductor numerically.
We found the formation of a pi-junction in such systems. More remarkably the
ground state of such junction alternates between 0- and pi-states when
thickness of FI is increasing by a single atomic layer. We propose an
experimental setup for observing the atomic-scale 0-pi transition. Such
FI-based pi-junctions can be used to implement highly-coherent quantum bits.
