A planar ion trapping microdevice with integrated waveguides for optical detection.