Probably you could use itertools.product to generate them.
>>> from itertools import product >>> list(product("ab", repeat=3)) [('a', 'a', 'a'), ('a', 'a', 'b'), ('a', 'b', 'a'), ('a', 'b', 'b'), ('b', 'a', 'a'), ('b', 'a', 'b'), ('b', 'b', 'a'), ('b', 'b', 'b')]So something similar to:
for triplet in product((a, b), repeat=3): cirq.kron(cirq.unitary(cirq.rz(triplet[0])),cirq.unitary(cirq.rz(triplet[1])),cirq.unitary(cirq.rz(triplet[2])))