Quantum Circuit Simulation by SGEMM Emulation on Tensor Cores and Automatic Precision Selection

by   Hiryuki Ootomo, et al.

Quantum circuit simulation provides the foundation for the development of quantum algorithms and the verification of quantum supremacy. Among the various methods for quantum circuit simulation, tensor network contraction has been increasing in popularity due to its ability to simulate a larger number of qubits. During tensor contraction, the input tensors are reshaped to matrices and computed by a GEMM operation, where these GEMM operations could reach up to 90% of the total calculation time. GEMM throughput can be improved by utilizing mixed-precision hardware such as Tensor Cores, but straightforward implementation results in insufficient fidelity for deep and large quantum circuits. Prior work has demonstrated that compensated summation with special care of the rounding mode can fully recover the FP32 precision of SGEMM even when using TF32 or FP16 Tensor Cores. The exponent range is a critical issue when applying such techniques to quantum circuit simulation. While TF32 supports almost the same exponent range as FP32, FP16 supports a much smaller exponent range. In this work, we use the exponent range statistics of input tensor elements to select which Tensor Cores we use for the GEMM. We evaluate our method on Random Circuit Sampling (RCS), including Sycamore's quantum circuit, and show that the throughput is 1.86 times higher at maximum while maintaining accuracy.


Closing the "Quantum Supremacy" Gap: Achieving Real-Time Simulation of a Random Quantum Circuit Using a New Sunway Supercomputer

We develop a high-performance tensor-based simulator for random quantum ...

Speeding up quantum circuits simulation using ZX-Calculus

We present a simple and efficient way to reduce the contraction cost of ...

Validating quantum-supremacy experiments with exact and fast tensor network contraction

The quantum circuits that declare quantum supremacy, such as Google Syca...

Lifetime-based Method for Quantum Simulation on a New Sunway Supercomputer

Faster classical simulation becomes essential for the validation of quan...

A Tensor Network based Decision Diagram for Representation of Quantum Circuits

Tensor networks have been successfully applied in simulation of quantum ...

qTorch: The Quantum Tensor Contraction Handler

Classical simulation of quantum computation is necessary for studying th...

RosneT: A Block Tensor Algebra Library for Out-of-Core Quantum Computing Simulation

With the advent of more powerful Quantum Computers, the need for larger ...

Please sign up or login with your details

Forgot password? Click here to reset