Introduction
Learn About Amazon VGT2 Learning Manager Chanci Turner
A significant global effort is currently focused on the development of quantum computing hardware that can scale to hundreds, thousands, or even millions of physical qubits. The ultimate goal is to create fault-tolerant quantum computers. Classical simulations of systems with large numbers of qubits are crucial for understanding how physical quantum systems behave under various noise conditions as they scale. Additionally, these simulations are essential for examining the noise resilience of quantum algorithms. Since the noise characteristics of current hardware prototypes often resist analytical treatment, they are explored through small-scale experiments and extensive numerical modeling. Typically, evaluating the performance of noise-free quantum algorithms also necessitates some form of classical emulation.
Naturally, such emulation tasks are computationally intensive and require significant memory resources, obliging researchers to employ high-performance computing (HPC) strategies, such as data and algorithm distribution, even for modest-sized quantum experiments. As a result, HPC simulators of quantum computers are vital for advancing both experimental and algorithmic research.
In this blog post, we will discuss how to conduct large-scale quantum circuit simulations using AWS ParallelCluster in conjunction with QuEST, the Quantum Exact Simulation Toolkit. We will showcase a straightforward and rapid deployment of computational resources, scaling up to 4,096 compute instances to simulate random quantum circuits containing up to 44 qubits.
Prerequisites
Quantum computing holds the potential to enhance current computational abilities through the principles of quantum physics and to solve specific complex problems that are challenging for conventional computers. This is a major research area that necessitates the development of new hardware and software. Classical simulations of quantum computers play a crucial role in demonstrating and validating new ideas, as well as in experimentation before a production environment is established.
Classic Simulations
Various algorithmic paradigms can be employed to classically simulate quantum computers, each with its own performance trade-offs. The choice of simulation algorithm often depends on the nature of the questions posed about the emulated quantum device, such as the likelihood of specific errors or the expected values of observables. Here, we will introduce two commonly used paradigms: state-vector (SV) and tensor-network (TN) simulation.
SV simulators, also referred to as “full-state,” “brute-force,” or “Schrödinger-style” simulators, maintain a complete numerical representation of the evolving quantum state of a circuit. Consequently, they require memory that increases exponentially with the number of qubits, although their runtime grows linearly with circuit depth. This comprehensive quantum state output allows for precise and efficient calculations of properties, making SV simulators the go-to choice for much of quantum computing research.
Conversely, TN simulators exhibit constant memory growth as the number of qubits increases, but they become exponentially slower with deeper circuits and more complex states. This makes TN simulators more cost-effective and faster for studying shallow circuits with appropriate structures, allowing for potential scaling to many qubits.
The performance bottleneck for SV simulators lies in the propagation of a quantum state, while for TN simulators, it is the propagation of a specific observable. QuEST operates as an SV simulator, and in this blog post, we will use it for circuits particularly suited for SV simulation.
In an SV simulation, an N-qubit register is represented by a state-vector comprising 2N complex amplitudes, which can be instantiated as an array of 2×2N real floating-point numbers. For instance, simulating N=40 qubits in double precision would require 16,384 GiB of memory, far exceeding the capacity of a standard HPC compute node. This necessitates the use of distributed memory systems. Previously, large-scale SV simulations were only feasible on specialized supercomputers, which involved lengthy lead times for resource allocation.
AWS Resources
If you are keen on simulating small to medium-sized quantum circuits, Amazon Braket provides several simulator options. These include a local simulator included in the Braket SDK and three on-demand simulators. The local simulator can run on a laptop or within an Amazon Braket managed notebook, supporting simulations of quantum circuits with or without noise.
The on-demand simulators comprise SV1, a general-purpose state vector simulator; DM1, a density matrix simulator that incorporates noise modeling; and TN1, a tensor network simulator designed for larger structured quantum circuits. SV1 is suitable for circuits containing up to 34 qubits, while DM1 supports up to 17 qubits. TN1 can simulate up to 50 qubits, albeit only for suitably structured circuits. This blog complements the Braket simulators by exploring the scalability of larger SV simulation circuits with up to 44 qubits using the QuEST simulator on Amazon Elastic Compute Cloud (Amazon EC2).
Amazon EC2 offers a diverse array of instance types optimized for various use cases. Compute-optimized instances are ideal for compute-bound workloads and intensive numerical modeling. For example, utilizing 256 c5.18xlarge instances (with 144 GiB of memory each) provides adequate memory to store the distributed state-vector for a 40-qubit circuit, including the additional memory costs for necessary auxiliary buffers for MPI communication. However, simulating just one more qubit will double the total memory requirement. A register of N=44 qubits demands approximately 562,950 GiB (~0.5 PiB) of memory, necessitating 4,096 c5.18xlarge instances.
To manage your compute resources, AWS has created an open-source cluster management tool called AWS ParallelCluster, which streamlines the deployment and management of HPC clusters on AWS. This tool allows for the swift deployment of virtual clusters with various architectures tailored to different applications and workflows. Furthermore, you can initiate your computations immediately rather than waiting in line for shared compute resources. Consequently, many scientists and companies worldwide are turning to cloud computing for efficient and cost-effective solutions to their challenges.
The latter portion of this blog post will illustrate an HPC deployment of QuEST using AWS ParallelCluster to simulate random circuits. Random circuits are crucial for both verifying real quantum computers and benchmarking quantum computing simulations.
Circuit Details
Using QuEST, we simulate a generic quantum circuit within a distributed memory system. We sample the probability distribution over N-bit strings generated by N-qubit circuits employing one- and two-qubit gates, along with multi-qubit controlled gates. We implement a random N-qubit quantum circuit using the following algorithm:
- Set the total number of qubits N and gates Gn in a circuit.
- Loop through each gate in Gn:
- Toss an unbiased coin.
- If heads, choose two indices (q1, q2) randomly.
For more insights on this topic, check out this blog post or explore authoritative resources on AI and technology like those provided by SHRM. Additionally, you can view this excellent resource for further understanding.
Leave a Reply