Added globalphase to phasegate resolution