qTorch: The Quantum Tensor Contraction Handler
Preprint
Abstract
Classical simulation of quantum computation is necessary for studying the numerical behavior of quantum algorithms, as there does not yet exist a large viable quantum computer on which to perform numerical tests. Tensor network (TN) contraction is an algorithmic method that may be used for such simulations, often greatly reducing the computational cost over methods that simulate the full Hilbert space. In this study we implement a parallel tensor network contraction program for simulating quantum circuits, including the quantum approximate optimization algorithm (QAOA) applied to Max-Cut. We show simulation results for 3- through 7-regular Max-Cut/QAOA circuits, even successfully simulating up to 100 qubits. We test two different methods for generating the ordering of tensor index contractions: one is based on the tree decomposition of the line graph, while the other generates ordering using a straight-forward stochastic scheme. Through studying instances of QAOA circuits, we show the expected result that as the treewidth of the quantum circuit's line graph decreases, TN contraction becomes significantly more efficient than simulating the whole Hilbert space. This tradeoff occurs when the Max-Cut problem's graph regularity is five or six, suggesting that tensor contraction methods are superior for simulating Max-Cut/QAOA with graphs of regularities approximately five and below. The stochastic contraction method outperforms the line graph based method only when the time to calculate a reasonable tree decomposition is prohibitively expensive. Finally, we release our software package, qTorch (Quantum TensOR Contraction Handler), intended for general quantum circuit simulation. For a nontrivial subset of these quantum circuits, 50 to 100 qubits can easily be simulated on a single compute node, an ability that is beyond of reach of other modern software packages.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Training a quantum optimizerPhysical Review A, 2016
- Progress towards practical quantum variational algorithmsPhysical Review A, 2015
- QCWAVE – A Mathematica quantum computer simulation updateComputer Physics Communications, 2011
- Simulation of electronic structure Hamiltonians using quantum computersMolecular Physics, 2011
- QCMPI: A parallel environment for quantum computingComputer Physics Communications, 2009
- Scalable protocol for identification of correctable codesPhysical Review A, 2008
- Simulating Quantum Computation by Contracting Tensor NetworksSIAM Journal on Computing, 2008
- Improved simulation of stabilizer circuitsPhysical Review A, 2004
- Classical simulation of noninteracting-fermion quantum circuitsPhysical Review A, 2002
- Graph minors. X. Obstructions to tree-decompositionJournal of Combinatorial Theory, Series B, 1991