An apparatus, comprising an arrayed waveguide grating, "AWG", (110; 200; 300; 400; 500) that comprises: a substrate having a planar surface; a first optical star coupler (210; 310; 410; 510) being along said surface and having first and second optical inputs (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) and a first spatial array of optical outputs; a second optical star coupler (230; 330; 430; 530) being along said surface and having a second spatial array of optical inputs and a third spatial array of optical outputs (232; 332; 432; 532); and an array (220; 320; 420; 520) of waveguide arms (222; 322; 422; 522), each waveguide arm (222; 322; 422; 522) connecting one optical output of the first spatial array to a corresponding optical input of the second spatial array, wherein the array (220; 320; 420; 520) of waveguide arms (222; 322; 422; 522) is configured to cause a first set of four optical outputs (232 1, 232 2, 232 3, 232 4; 332 1X, 332 2X, 332 3X, 332 4X; 332 1Y, 332 2Y, 332 3Y, 332 4Y; 432 λ1, 1, 432 λ1, 2, 432 λ1, 3, 432 λ1, 4; 432 λ2, 1, 432 λ2, 2, 432 λ2, 3, 432 λ2, 4) of the third spatial array to receive four different phase combinations of light received at the first and second optical inputs (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) in response to the light received at the first and second optical inputs (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) being of about the same wavelength, wherein the four different phase combinations are combinations of the light from the first and second optical input ports (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) with relative phases of about 0, π/2 radians, π radians, and 3π/2 radians. a substrate having a planar surface; a first optical star coupler (210; 310; 410; 510) being along said surface and having first and second optical inputs (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) and a first spatial array of optical outputs; a second optical star coupler (230; 330; 430; 530) being along said surface and having a second spatial array of optical inputs and a third spatial array of optical outputs (232; 332; 432; 532); and an array (220; 320; 420; 520) of waveguide arms (222; 322; 422; 522), each waveguide arm (222; 322; 422; 522) connecting one optical output of the first spatial array to a corresponding optical input of the second spatial array, wherein the array (220; 320; 420; 520) of waveguide arms (222; 322; 422; 522) is configured to cause a first set of four optical outputs (232 1, 232 2, 232 3, 232 4; 332 1X, 332 2X, 332 3X, 332 4X; 332 1Y, 332 2Y, 332 3Y, 332 4Y; 432 λ1, 1, 432 λ1, 2, 432 λ1, 3, 432 λ1, 4; 432 λ2, 1, 432 λ2, 2, 432 λ2, 3, 432 λ2, 4) of the third spatial array to receive four different phase combinations of light received at the first and second optical inputs (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) in response to the light received at the first and second optical inputs (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) being of about the same wavelength, wherein the four different phase combinations are combinations of the light from the first and second optical input ports (R; S; 208 1, 208 2; 308 1, 308 2; 408 1, 408 2; 508 1, 508 2) with relative phases of about 0, π/2 radians, π radians, and 3π/2 radians.