We present a tool QSeqSim, a Qiskit-integrated symbolic backend that fills the current gap of having no Qiskit-native support for simulating while-loop quantum programs and their induced sequential quantum circuits. QSeqSim takes Qiskit QuantumCircuit objects, translates them into OpenQASM 3 code, and organises the resulting program into a combination of combinational, dynamic, and sequential circuits, thereby assigning while-loops a precise sequential circuit semantics with explicit internal and external qubits. Building on this semantics, QSeqSim adopts a Binary Decision Diagram (BDD)-based symbolic representation and integrates weighted model counting to compute measurement probabilities efficiently by exploiting sharing in structured and sparse BDDs. On top of this Boolean backbone, it introduces dedicated symbolic operators for state composition and state retention, thereby enabling efficient symbolic execution of sequential quantum circuits. Our experiments demonstrate that QSeqSim scales to substantial while-induced sequential circuits; in particular, in the quantum random walk benchmark we successfully simulate circuits with over 1000 qubits for more than 10 loop iterations. QSeqSim is available at https://github.com/Veri-Q/QSeqSim.
翻译:我们提出工具QSeqSim——一个集成于Qiskit的符号后端,填补了当前缺乏Qiskit原生支持模拟while循环量子程序及其衍生的顺序量子电路的空白。QSeqSim接收Qiskit QuantumCircuit对象,将其转化为OpenQASM 3代码,并将生成的程序组织为组合电路、动态电路与顺序电路的组合,从而赋予while循环以包含明确内外量子比特的精确顺序电路语义。基于该语义,QSeqSim采用二元决策图(BDD)符号表示,并通过利用结构化稀疏BDD中的共享特性集成加权模型计数方法,高效计算测量概率。在此布尔核心基础上,该工具引入专门用于状态组合与状态保持的符号算子,从而实现对顺序量子电路的高效符号执行。实验表明,QSeqSim可扩展至大型while诱导顺序电路:特别地,在量子随机游走基准测试中,我们成功模拟了包含超过1000个量子比特、循环迭代10次以上的电路。QSeqSim开源地址为https://github.com/Veri-Q/QSeqSim。