cirq.Zip

Zip product (direct sum) of one or more sweeps.

Inherits From: Sweep

If one sweep assigns 'a' to values 0, 1, 2, and the second sweep assigns 'b' to the values 3, 4, 5, then the zip is a sweep that assigns to the tuple ('a', 'b') the pair-wise matched values (0, 3), (1, 4), (2, 5).

When iterating over a Zip, we iterate the individual sweeps in parallel, stopping when the first component sweep stops. For example if one sweep assigns 'a' to values 0, 1 and the second sweep assigns 'b' to the values 3, 4, 5, then the zip is a sweep that assigns to the tuple ('a', 'b') the values (0, 3), (1, 4).

keys The keys for the all of the sympy.Symbols that are resolved.

Methods

param_tuples

View source

An iterator over (key, value) pairs assigning Symbol key to value.

__add__

View source

__eq__

View source

Return self==value.

__getitem__

View source

__iter__

View source

__len__

View source

__mul__

View source

__ne__

View source

Return self!=value.