Quantikz 线路导出¶
oracq.infrastructure.backends.quantikz
quantikz circuit export of RIR modules: module structure is preserved, without expanding calls and repeats.
- oracq.infrastructure.backends.quantikz.quantikz(source, *, wire_labels=True, name=None)[源代码]¶
Draw the entry module of an Operation or Program as quantikz code.
Calls are drawn as boxes carrying the module name (open oracle slots use dashes), Repeat/Adjoint group frames annotate the count and dagger via remember picture overlays, and Controls expand into control points; QRAM Loads are drawn as resource boxes. The structure stays identical to RIR, with no expansion or inlining. name fixes the matrix node name so several circuits can be placed in the same document.
- 参数:
source -- A
Program, anOperation, or an input-model object with anoperationattribute.wire_labels -- Whether to draw register name and bit index labels on the left of each quantum wire.
name -- TikZ matrix node name, for placing several circuits in one document; generated from the module name when omitted.
- 返回:
The quantikz LaTeX source of the entry module.
- 返回类型:
str