expand_nonunitary_gen(tape, depth=10, **kwargs)

Expand out a tape so that all its parametrized operations have a unitary generator.

This is achieved by decomposing all parametrized operations that either do not have a generator or have a non-unitary generator, up to maximum depth depth. For a sufficient depth, it should always be possible to obtain a tape containing only unitarily generated operations.

  • tape (QuantumTape) – the input tape to expand

  • depth (int) – the maximum expansion depth

  • **kwargs – additional keyword arguments are ignored


the expanded tape

Return type