Classical simulators play a major role in the development and benchmark of quantum algorithms and practically any software framework for quantum computation provides the option of running the algorithms on simulators. However, the development of quantum simulators was substantially separated from the rest of the software frameworks which, instead, focus on usability and compilation. Here, we demonstrate the advantage of co-developing and integrating simulators and compilers by proposing a specialized compiler pass to reduce the simulation time for arbitrary circuits. While the concept is broadly applicable, we present a concrete implementation based on the Intel Quantum Simulator, a high-performance distributed simulator. As part of this work, we extend its implementation with additional functionalities related to the representation of quantum states. The communication overhead is reduced by changing the order in which state amplitudes are stored in the distributed memory, a concept analogous to the distinction between local and global qubits for distributed Schroedinger-type simulators. We then implement a compiler pass to exploit the novel functionalities by introducing special instructions governing data movement as part of the quantum circuit. Those instructions target unique capabilities of simulators and have no analogue in actual quantum devices. To quantify the advantage, we compare the time required to simulate random circuits with and without our optimization. The simulation time is typically halved.
翻译:古典模拟器在量子算法和量子计算的任何软件框架的开发和基准制定和基准方面起着重要作用。 然而, 量子模拟器的开发在很大程度上与软件框架的其余部分分开, 而后者则侧重于可用性和编译。 在这里, 我们展示了共同开发和整合模拟器和编译器的优势, 方法是提出一个专门的编译员通行证, 以减少任意电路模拟器的模拟时间。 虽然这个概念广泛适用,但我们展示了一种基于 Intel 量子模拟器的具体实施办法, 这是一种高性能分布式模拟器。 作为这项工作的一部分, 我们扩展了量子模拟器的实施范围, 增加了与量子状态代表有关的功能。 通过改变分布式记忆中存储状态振动器的顺序, 从而降低了通信管理量子模拟器和编译器的顺序。 我们随后实施了一个编译员通行证, 通过引入关于数据移动的特别指示, 将数据移动作为量子体分布式模拟器的一部分, 我们不需要用量子电路的模型来进行真正的模拟。