It depends on a wide range of factors, first of all, how far apart would you have to work?
My husband and I are doing PhDs effectively three hours journey from each other, however we've managed to work it so we live in the midpoint. This is viable because of the nature of our PhDs but if either of us were a scientist then it proabably wouldnt work.