qml.math.reduce_matrices
-
reduce_matrices(mats_and_wires_gen, reduce_func)[source]
Apply the given reduce_func
cumulatively to the items of the mats_and_wires_gen
generator, from left to right, so as to reduce the sequence to a tuple containing a single
matrix and the wires it acts on.
- Parameters
-
- Returns
a tuple containing the reduced matrix and the wires it acts on
- Return type
Tuple[tensor, Wires]
code/api/pennylane.math.reduce_matrices