Planar circuits for microwaves and lightwaves