Open
Description
Implement, as an example, a compiler pass that groups non-parallel gates into parallel ones using an "as soon as possible" (ASAP) heuristic. This strategy uses an alternating heuristic where first as many 1 qubit gates as possible are done, then as many 2 qubit gates, then 1 qubit gates, and so forth. This is an important example as it shows that we can do much more in-depth analysis beyond find-and-replace, as well as give users the tools to write their own compiler passes.