The power of shallow-depth Toffoli and qudit quantum circuits