Learning shallow quantum circuits