Advancing Life & Work
1756742 Members
2131 Online
108852 Solutions
New Article ī„‚
Labs_Editorial

HPC for Simulating Quantum Circuits

 

GUEST BLOG: By the Quantum team at Hewlett Packard Labs

Quantum big.jpgQuantum computers have the potential to significantly improve computational efficiency across a number of disciplines. In the near term, however, quantum computers will continue to have relatively few qubits with low fidelities. During this time classical simulators of quantum computers, especially those optimized for performance on HPC systems, are important for prototyping, benchmarking, and quantum algorithm development [1]. As quantum computers continue to improve across multiple figures of merit, it is increasingly important to bring the most performant classical HPC systems to bear to continue this beneficial co-development and to make the computational power of classical systems as efficient and accessible as possible.

Researchers at Hewlett Packard Labs have begun an initiative with NVIDIA for high-performance simulation of quantum circuits. To showcase this effort, researchers used the CUDA Quantum platform to simulate quantum circuits on NERSCā€™s Perlmutter, an HPE Cray EX supercomputer with A100 GPUs and Slingshot interconnect that is #8 on the TOP 500 list.

To demonstrate the capabilities of this HPC framework, the team decided to simulate the time-evolution of the transverse-field Ising model (TFIM), the quantum analog of the well-known Ising model. Despite its simplicity, the TFIM can exhibit complex quantum phenomena that are difficult to simulate classically. This is especially true for 2D spin lattices, which are thought to be beyond the capabilities of approximate simulation methods like matrix product states (MPS) and quantum Monte Carlo (QMC). Simulating many-body quantum systems (like the TFIM) beyond 1D is an open challenge. Using CUDA Quantumā€™s cuStateVec backend, which represents the entire 2state vector and can capture maximum entanglement, the team was able to accurately simulate 2D systems.

One quantum phenomenon that physicists study is dynamical quantum phase transitions (DQPTs), which are non-equilibrium phase transitions of quantum systems (e.g., materials or molecules) in time [2]. Studying phase transitions like these can help physicists better understand or even control physical/chemical systems in condensed phase, simulating materials properties and aiding in the design of new materials (e.g., for quantum sensors). Studying these systems is a promising use case for circuit-based quantum computers because their continuous time evolution |Ļˆ (t)> = |eĀ­-iHt   |Ļˆ (0)> can be simulated with a discrete-time digital circuit (via the Trotter procedure [3, 4]). In principle, this enables scaling up these simulations on fault-tolerant quantum computers.

While there have been recent demonstrations simulating DQPTs on both quantum devices (a subset of qubits in a 22-qubit superconducting chip [5] and 53 qubits in a trapped ion experiment [6]) as well as using numerical classical simulators [2], these studies have been limited to 1D. Understanding phase transitions in 2D is likely key for designing real devices and materials.

The team chose to study DQPTs in 2D with the TFIM, though in principle any spin Hamiltonian could be studied using this framework. The TFIM consists of a lattice of N spins (example in Figure 1) with the Hamiltonian H = ā€“ J āˆ‘ <i,j> ĻƒZiĻƒZj ā€“ g āˆ‘Ni=1 Ļƒxi , where <i,j> denotes all nearest-neighbor pairs in the lattice, ĻƒZ  and Ļƒare the Pauli Z and X matrices, respectively, and J and g are parameters that control the nearest-neighbor coupling and transverse-field strengths. Figure 1 shows the circuit for one timestep of the time-evolution for a small example (N = 6).

FIGURE 1: Example of a 2D spin lattice (N = 6) and accompanying quantum circuit for one timestep of discrete (first order Trotterized) time-evolution of a transverse-field Ising model. Gate parameters determined by Ising model parameters and timestep: y = ā€“2J āˆ™ dt, ÓØ = ā€“2gāˆ™ dt.FIGURE 1: Example of a 2D spin lattice (N = 6) and accompanying quantum circuit for one timestep of discrete (first order Trotterized) time-evolution of a transverse-field Ising model. Gate parameters determined by Ising model parameters and timestep: y = ā€“2J āˆ™ dt, ÓØ = ā€“2gāˆ™ dt.

DQPTs can be discovered by tracking a quantity called the rate, Ī»(t) = ā€“ log |<Ļˆ(0)|Ļˆ(t)>|. This requires computing the overlap of the initial quantum state |Ļˆ (0)> with the time-evolved state eĀ­-iHt |Ļˆ (0)> = |Ļˆ (t)> at each timestep in the simulation, a computationally intensive task that is a good use case for HPC resources and acceleration with GPUs. At a DQPT, the rate spikes ā€” Figure 2 shows a DQPT found during the simulation of a 40-qubit model (8x5 lattice). During many of these phase transitions, the entanglement entropy in the quantum system grows to near its maximum value, making them difficult to simulate classically with tensor network techniques.

FIGURE 2: Dynamical quantum phase transition observed at tc during time-evolution simulation of a 40-qubit 2D Ising model with J = 1.0, g = 5.0. Simulation comprised 100 timesteps executed on 512 A100 GPUs across 128 nodes on Perlmutter.FIGURE 2: Dynamical quantum phase transition observed at tc during time-evolution simulation of a 40-qubit 2D Ising model with J = 1.0, g = 5.0. Simulation comprised 100 timesteps executed on 512 A100 GPUs across 128 nodes on Perlmutter.

CUDA Quantumā€™s backend enabled these computationally intensive simulations to be distributed across multiple nodes and multiple GPUs on the Perlmutter supercomputer. Figure 3 shows the performance comparisons for multi-threaded CPU, single A100 GPU, and multiple A100 nodes. For 20- to 30-qubit simulations, one A100 provided a 600x speedup over a multi-threaded CPU. Beyond 30 qubits, the exponential scaling of quantum simulation quickly outstrips the capabilities of a single processor, but the team was able to scale to 40 qubits by distributing the simulation across 128 nodes (512 A100 GPUs). The 40-qubit simulation took just one hour, an impressive near-two orders of magnitude faster than a CPU simulation on 30 qubits. (If the CPU trendline could be continued, the 40-qubit simulation would take seven years!) The performance results on these larger qubit systems highlight the multi-node parallel efficiency of both the software and hardware.

FIGURE 3: Performance of CUDA Quantum circuit simulation using multi-threaded CPU backend, single GPU and multi-GPU backends. Systems simulated are 2D lattices: 5x4, 5x5, 5x6, 5x7 and 5x8 qubits. Simulation time reported is for one timestep in the time-evolution circuit (100 total timesteps).FIGURE 3: Performance of CUDA Quantum circuit simulation using multi-threaded CPU backend, single GPU and multi-GPU backends. Systems simulated are 2D lattices: 5x4, 5x5, 5x6, 5x7 and 5x8 qubits. Simulation time reported is for one timestep in the time-evolution circuit (100 total timesteps).

While 1D simulation techniques like MPS struggle to extend to 2D systems, the state vector simulator demonstrated here can easily extend from 1D to 2D. The 2D results shown in Figure 3 are just as accurate as 1D simulations, and are only slightly (1.1x) slower.

These results demonstrate large-scale parallelization for simulating one QPU. In the future, however, it is likely that several QPUs will operate asynchronously and concurrently. CUDA Quantum also makes available a multi-qpu backend, where applications can be developed using this distributed model of quantum computation tightly integrated with classical HPC.

Simulations of many-body quantum systems like the ones demonstrated here are important for the near-term benchmarking of quantum computers and development of quantum algorithms. Simulations of larger quantum circuits become increasingly difficult without the performance of supercomputers like Perlmutter, an HPE Cray EX supercomputer, and GPU-accelerated tools like those from NVIDIA. The team demonstrated a first step toward using HPC to guide the development of quantum computers. Using a state vector simulator, the team could accurately study DQPTs in 2D spin lattices up to 40 qubits, a task out of reach for approximate methods. In the future, this framework could be used to study other quantum systems as well as study the effects of noise, a crucial element to informing experimental partners in the NISQ era.

Currently, HPC is a vital tool for simulating quantum computers, but it is also clear that the future of quantum computing will rely on hybrid quantum-classical algorithms and infrastructures. As we move to using quantum computers to address real-world problems, HPC will play an important role in hybrid algorithms, device control, error correction, circuit knitting techniques, and distributing quantum workloads. QPUs will function as accelerators, specialized for certain tasks, within a larger supercomputing framework. As a systems integrator that supports workflows within a high-performance programming environment, HPE is well-positioned to lead the development of this integration.

FOOTNOTES

[1] J. F. Bulmer, B. A. Bell, R. S. Chadwick, A. E. Jones, D. Moise, A. Rigazzi, J. Thorbecke, U.-U. Haus, T. Van Vaerenbergh, R. B. Patel et al., ā€œThe boundary for quantum advantage in gaussian boson sampling,ā€ Science advances, vol. 8, no. 4, p. eabl9236, 2022.

[2] Heyl, M. ā€œDynamical quantum phase transitions: a review,ā€ Reports on Progress in Physics, vol. 81, no. 5, p. 054001, 2018.

[3] Trotter H. F. ā€On the product of semi-groups of operators,ā€ Proc. Am. Math. Soc. 10, 545 (1959).

[4] Suzuki, M. ā€Generalized Trotterā€™s formula and systematic approximants of exponential operators and inner derivations with applications to many-body problems,ā€ Commun. Math. Phys. 51, 183 (1976).

[5] J. Dborin, V. Wimalaweera, F. Barratt, E. Ostby, T. E. Oā€™Brien, and A. G. Green, ā€œSimulating groundstate and dynamical quantum phase transitions on a superconducting quantum computer,ā€ Nature Communications, vol. 13, no. 1, p. 5977, 2022.

[6] J. Zhang, G. Pagano, P. W. Hess, A. Kyprianidis, P. Becker, H. Kaplan, A. V. Gorshkov, Z.-X. Gong, and C. Monroe, ā€œObservation of a many-body dynamical phase transition with a 53-qubit quantum simulator,ā€ Nature, vol. 551, no. 7682, pp. 601ā€“604, 2017.

 

 

 

 

About the Author

Labs_Editorial