Controlling spin phases of few electrons in artificial molecules by magnetic fields