Growth of InP crystals with rare-earth elements