dimod.binary.quicksum#
- quicksum(iterable: Iterable[BinaryQuadraticModel | QuadraticModel | float | floating | integer]) BinaryQuadraticModel | QuadraticModel [source]#
Sum iterable’s items.
This function is an alternative to the built-in
sum()
. It is generally faster when adding manyBinaryQuadraticModel
s andQuadraticModel
s because it creates fewer intermediate objects.