Decision diagram (DD)-based quantum circuit simulators represent quantum states and gates using DDs, enabling memory-efficient and fast simulations for some quantum circuits like Shor. Although it is known that DD size and processing time vary depending on the variable order in classical circuits, there has not been much research on the variable order under quantum circuit simulation. One existing study pointed out that dynamic reordering worsens the simulation time and numerical accuracy, and there is no comprehensive research on static orders in the context of quantum circuit simulation. Therefore, this paper proposes a scoring-based heuristic method for determining a static variable order that enables efficient DD-based quantum circuit simulation. When applied to benchmark circuits, the default original variable orders resulted in slow simulations, whereas the proposed method achieved speedups of up to 150x. Furthermore, the proposed order completed the simulation of Shor's 1011 factorization in 5 hours on a single-core laptop, although it was not completed within two days previously.
Decision diagram (DD)-based quantum circuit simulators represent quantum states and gates using DDs, enabling memory-efficient and fast simulations for some quantum circuits like Shor. Although it is known that DD size and processing time vary depending on the variable order in classical circuits, there has not been much research on the variable order under quantum circuit simulation. One existing study pointed out that dynamic reordering worsens the simulation time and numerical accuracy, and there is no comprehensive research on static orders in the context of quantum circuit simulation. Therefore, this paper proposes a scoring-based heuristic method for determining a static variable order that enables efficient DD-based quantum circuit simulation. When applied to benchmark circuits, the default original variable orders resulted in slow simulations, whereas the proposed method achieved speedups of up to 150x. Furthermore, the proposed order completed the simulation of Shor's 1011 factorization in 5 hours on a single-core laptop, although it was not completed within two days previously.
Currently the development of quantum computers is active; however, large-scale machines remain limited and noisy. Furthermore, such quantum computers do not allow direct access to state vectors, posing challenges for quantum algorithm development. Quantum circuit simulators on classical computers offer a solution, with decision diagram (DD)-based simulators being particularly memory-efficient for representing quantum states. However, DD-based simulation still requires optimization, especially concerning variable ordering and multi-node parallelization. Processing time for DDs heavily depends on variable order, but existing static variable ordering methods did not have general applicability. The prior multi-threaded DD simulations showed slowdowns. This study proposes two techniques to address these issues. The first is a scoring-based heuristic static variable ordering method that analyzes an input quantum circuit, such as the distribution of parameterized rotations and multi-bit gates, to suppress the growth of graph nodes and amount of computation. The second is a ring communication approach that reduces communication overhead when performing parallel simulations across multiple computing nodes. Parallel computation requires data exchange between nodes, which results in additional communication time. The proposed ring communication method can eliminate broadcast communication, thereby reducing the waiting time until communication is completed. Evaluations using various benchmark circuits demonstrate that the proposed ordering achieves up to a 4.5 speedup in a single-node environment. Furthermore, the ring communication exhibits superior scalability, achieving up to an 11x speedup with 16 computing nodes. The proposed variable ordering method generally reduces the overall simulation time in multi-node environments.
Quantum computers promise to solve important problems faster than conventional computers ever could. Underneath is a fundamentally different computational primitive that introduces new challenges for the development of software tools that aid designers of corresponding quantum algorithms. The different computational primitives render classical simulation of quantum circuits particularly challenging. While the logic simulation of conventional circuits is comparatively simple with linear complexity with respect to the number of gates, quantum circuit simulation has to deal with the exponential memory requirements to represent quantum states on non-quantum hardware with respect to the number of qubits. Decision Diagrams (DDs) address this challenge through exploitation of redundancies in matrices and vectors to provide significantly more compact representations in many cases. Moreover, the probabilistic nature of quantum computations enables another angle to tackle the complexity: Quantum algorithms are resistant to some degree against small inaccuracies in the quantum state as these only lead to small changes in the outcome probabilities. We propose to exploit this resistance against (small) errors to gain even more compact decision diagrams. In this work, we investigate the potential of approximation in quantum circuit simulation in detail. To this end, we first present four dedicated schemes that exploit the error resistance and efficiently approximate quantum states represented by decision diagrams. Subsequently, we propose two simulation strategies that utilize those approximations schemes in order to improve the efficiency of DD-based quantum circuit simulation, while, at the same time, allowing the user to control the resulting degradation in accuracy. We empirically show that the proposed approximation schemes reduce the size of decision diagrams substantially and also analytically prove the effect of multiple approximations on the attained accuracy. Eventually, this enables speed-ups of the resulting approximate quantum circuit simulation of up to several orders of magnitudes—again, while controlling the fidelity of the result.
Quantum computers promise to solve important problems faster than conventional computers. However, unleashing this power has been challenging. In particular, design automation runs into (1) the probabilistic nature of quantum computation and (2) exponential requirements for computational resources on non-quantum hardware. In quantum circuit simulation, Decision Diagrams (DDs) have previously shown to reduce the required memory in many important cases by exploiting redundancies in the quantum state. In this paper, we show that this reduction can be amplified by exploiting the probabilistic nature of quantum computers to achieve even more compact representations. Specifically, we propose two new DD-based simulation strategies that approximate the quantum states to attain more compact representations, while, at the same time, allowing the user to control the resulting degradation in accuracy. We also analytically prove the effect of multiple approximations on the attained accuracy and empirically show that the resulting simulation scheme enables speed-ups up to several orders of magnitudes.
The decision diagram (DD) data structure enables fast linear-algebra calculations by bringing vectors into a normal form and subsequently merging equivalent ones, yielding a minimally-sized DD modulo the equivalence relation. A fruitful application area is quantum-circuit simulation, where the vectors represent quantum states. The Local Invertible Map Decision Diagram (LIMDD) type, merges LIM-equivalent (typically Pauli-gate equivalent) vectors, can efficiently simulate Clifford circuits as well as some high-T-count circuits, and has theoretically been proven exponentially faster for simulation than other well-developed data structures, including other common DD variants. However, these exponential advantages have not fully materialized yet in existing implementations, for which the normal-form procedure, which is a highly complex algorithm, is either absent or only partially implemented. We here present a novel normal-form algorithm for Pauli-LIMDDs, achieving a worst-case speedup from O(n3) to O(n2) for an n-qubit DD node with a single child node while keeping the O(n3) run time in case of two distinct children nodes. We implement the algorithm as part of QolDDer, our Pauli-LIMDD simulator for quantum circuits, written from scratch in C/C++. The implementation realizes the theoretically-proven advantages of Pauli-LIMDDs on Clifford circuits, is significantly faster than the existing LIMDD simulators on such circuits, and on a public quantum-circuit data set often outperforms them by an order of magnitude. In the future, we envision that our work will enable further application and development of LIMDD variants, not only for quantum design tasks, but also for analysis of linear-algebra-based systems in general.
Quantum computing is a hotspot technology for its potential to accelerate specific applications by exploiting quantum parallelism. However, current physical quantum computers are limited to a relatively small scale, simulators based on conventional machines are significantly relied on to perform quantum computing research. The straightforward array-based simulators require a tremendous amount of memory that increases exponentially with respect to the number of qubits. To mitigate such computing resource concerns, decision diagram based simulators were proposed that can efficiently exploit data redundancies in quantum states and operations. In this paper, we study two classes of quantum circuits on which the state-of-the-art decision diagram based simulators failed to perform well in terms of simulation time. We also propose a simple and powerful reorder trick to boost the simulation of such quantum circuits. Preliminary evaluation results demonstrate the usefulness of the proposed trick. Especially, for the Quantum Phase Estimation circuits, the proposed trick achieved speedups up to 313.6x compared to a state-of-the-art approach that relies on an auxiliary tool to optimize simulation order.
Simulating quantum circuits on classical computers is a notoriously hard, yet increasingly important task for the development and testing of quantum algorithms. In order to alleviate this inherent complexity, efficient data structures and methods, such as tensor networks and decision diagrams, have been proposed. However, their efficiency heavily depends on the order in which the individual computations are performed. For tensor networks, the order is defined by so-called contraction plans and a plethora of methods has been developed to determine suitable plans. On the other hand, simulation based on decision diagrams is mostly conducted in a straight-forward, i.e., sequential, fashion thus far. In this work, we study the importance of the path that is chosen when simulating quantum circuits using decision diagrams and show, conceptually and experimentally, that choosing the right simulation path can make a vast difference in the efficiency of classical simulations using decision diagrams. We propose an open-source framework (available at github.com/cda-tum/ddsim) that not only allows to investigate of dedicated simulation paths but also to reuse of existing findings, e.g., obtained from determining contraction plans for tensor networks. Experimental evaluations show that translating strategies from the domain of tensor networks may yield speedups of several factors compared to the state of the art. Furthermore, we design a dedicated simulation path heuristic that allows to improve the performance even further—frequently yielding speedups of several orders of magnitude. Finally, we provide an extensive discussion on what can be learned from tensor networks and what cannot.