Quantum Phase Transition in coupled 1-d Bose Einstein condensates