View source on GitHub |
Cartesian product of one or more sweeps.
Inherits From: Sweep
cirq.Product(
*factors
) -> None
If one sweep assigns 'a' to the values 0, 1, 2, and the second sweep assigns 'b' to the values 2, 3, then the product is a sweep that assigns the tuple ('a','b') to all possible combinations of these assignments: (0, 2), (1, 2), (2, 2), (0, 3), (1, 3), (2, 3).
Attributes | |
---|---|
keys
|
The keys for the all of the sympy.Symbols that are resolved. |
Methods
param_tuples
param_tuples() -> Iterator[Params]
An iterator over (key, value) pairs assigning Symbol key to value.
__add__
__add__(
other: 'Sweep'
) -> 'Sweep'
__eq__
__eq__(
other
)
Return self==value.
__getitem__
__getitem__(
val: Union[int, slice]
) -> Union[resolver.ParamResolver, 'Sweep']
__iter__
__iter__() -> Iterator[cirq.ParamResolver
]
__len__
__len__() -> int
__mul__
__mul__(
other: 'Sweep'
) -> 'Sweep'
__ne__
__ne__(
other
) -> bool
Return self!=value.