Asymptotically optimal circuits for arbitrary n-qubit diagonal computations | Synapse