Starting from the first moment, the largest run of mergeable moments is found and then
merged at once. The process is repeated starting from the next moment, until the circuit
is exhausted. merge_func is not called on single-moment runs.
Args
circuit
Input circuit to apply the transformations on. The input circuit is not mutated.
merge_func
Callable that takes a sequence of moments and returns both the first
moment merged with as many consecutive moments as possible, and a sequence of
the remaining unmerged moments.
tags_to_ignore
Tagged circuit operations marked with any of tags_to_ignore will be
ignored when recursively applying the transformer primitive to sub-circuits, given
deep=True.
deep
If true, the transformer primitive will be recursively applied to all circuits
wrapped inside circuit operations.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-08 UTC."],[],[]]