Differentiable Programming Tensor Networks

Differentiable programming is a fresh programming paradigm which composes parameterized algorithmic components and trains them using automatic differentiation (AD). The concept emerges from deep learning but is not only limited to training neural networks. We present theory and practice of programming tensor network algorithms in a fully differentiable way. By formulating the tensor network algorithm as a computation graph, one can compute higher order derivatives of the program accurately and efficiently using AD. We present essential techniques to differentiate through the tensor networks contractions, including stable AD for tensor decomposition and efficient backpropagation through fixed point iterations. As a demonstration, we compute the specific heat of the Ising model directly by taking the second order derivative of the free energy obtained in the tensor renormalization group calculation. Next, we perform gradient based variational optimization of infinite projected entangled pair states for quantum antiferromagnetic Heisenberg model and obtain start-of-the-art variational energy and magnetization with moderate efforts. Differentiable programming removes laborious human efforts in deriving and implementing analytical gradients for tensor network programs, which opens the door to more innovations in tensor network algorithms and applications.

[1]  X. Yi On Automatic Differentiation , 2005 .

[2]  Cristian Sminchisescu,et al.  Training Deep Networks with Structured Layers by Matrix Backpropagation , 2015, ArXiv.

[3]  Roman Orus,et al.  Language Design and Renormalization , 2017 .

[4]  Steven R. White,et al.  Studying Two Dimensional Systems With the Density Matrix Renormalization Group , 2011, 1105.1374.

[5]  Frank Pollmann,et al.  Entanglement spectrum of a topological phase in one dimension , 2009, 0910.1811.

[6]  Isaac H. Kim,et al.  Robust entanglement renormalization on a noisy quantum computer , 2017, 1711.07500.

[7]  Wei Li,et al.  Efficient simulation of infinite tree tensor network states on the Bethe lattice , 2012, 1209.2387.

[8]  M. Troyer,et al.  Stripes in the two-dimensional t-J model with infinite projected entangled-pair states , 2011, 1104.5463.

[9]  Leo P. Kadanoff,et al.  Real Space Renormalization in Statistical Mechanics , 2013, 1301.6323.

[10]  L. Dixon,et al.  Automatic differentiation of algorithms , 2000 .

[11]  T. Xiang,et al.  Accurate determination of tensor network state of quantum lattice models in two dimensions. , 2008, Physical review letters.

[12]  Xiao-Gang Wen,et al.  Tensor-Entanglement-Filtering Renormalization Approach and Symmetry Protected Topological Order , 2009, 0903.1069.

[13]  Griewank,et al.  On automatic differentiation , 1988 .

[14]  Barak A. Pearlmutter Fast Exact Multiplication by the Hessian , 1994, Neural Computation.

[15]  Barak A. Pearlmutter,et al.  Automatic differentiation in machine learning: a survey , 2015, J. Mach. Learn. Res..

[16]  A. Sandvik Computational Studies of Quantum Spin Systems , 2010, 1101.3281.

[17]  Hoang Duong Tuan,et al.  Infinite projected entangled pair states algorithm improved: Fast full update and gauge fixing , 2015, 1503.05345.

[18]  Igor L. Markov,et al.  Simulating Quantum Computation by Contracting Tensor Networks , 2008, SIAM J. Comput..

[19]  Michael Marien,et al.  Excitations and the tangent space of projected entangled-pair states , 2015, Physical Review B.

[20]  R. Bader,et al.  Forces in molecules. , 2007, Faraday discussions.

[21]  J. Chen,et al.  Optimized contraction scheme for tensor-network states , 2017, 1705.08577.

[22]  L. Onsager Crystal statistics. I. A two-dimensional model with an order-disorder transition , 1944 .

[23]  White,et al.  Density matrix formulation for quantum renormalization groups. , 1992, Physical review letters.

[24]  Sören Laue,et al.  Computing Higher Order Derivatives of Matrix and Tensor Expressions , 2018, NeurIPS.

[25]  Frank Verstraete,et al.  Gradient methods for variational optimization of projected entangled-pair states , 2016, 1606.09170.

[26]  Mike Innes,et al.  Flux: Elegant machine learning with Julia , 2018, J. Open Source Softw..

[27]  Ling Wang,et al.  Plaquette renormalization scheme for tensor network states. , 2011, Physical review. E, Statistical, nonlinear, and soft matter physics.

[28]  Alán Aspuru-Guzik,et al.  Automatic Differentiation in Quantum Chemistry with Applications to Fully Variational Hartree–Fock , 2017, ACS central science.

[29]  Fernando Quijandría,et al.  Continuous matrix product states for quantum fields , 2015 .

[30]  Bela Bauer,et al.  Simulation of strongly correlated fermions in two spatial dimensions with fermionic projected entangled-pair states , 2009, 0912.0646.

[31]  Yiannis Vlassopoulos,et al.  Tensor network language model , 2017, ArXiv.

[32]  Zeph Landau,et al.  Quantum Computation and the Evaluation of Tensor Networks , 2008, SIAM J. Comput..

[33]  Z. Y. Xie,et al.  Coarse-graining renormalization by higher-order singular value decomposition , 2012, 1201.1144.

[34]  Michael Innes,et al.  Don't Unroll Adjoint: Differentiating SSA-Form Programs , 2018, ArXiv.

[35]  G. Evenbly,et al.  Tensor Network Renormalization. , 2014, Physical review letters.

[36]  M. Mambrini,et al.  Quantum critical point with infinite projected entangled paired states , 2017, 1702.05950.

[37]  Román Orús,et al.  Tensor networks for complex quantum systems , 2018, Nature Reviews Physics.

[38]  U. Schollwoeck The density-matrix renormalization group in the age of matrix product states , 2010, 1008.3477.

[39]  Matthew Johnson,et al.  Compiling machine learning programs via high-level tracing , 2018 .

[40]  T. Nishino,et al.  Corner Transfer Matrix Renormalization Group Method , 1995, cond-mat/9507087.

[41]  Z. Y. Xie,et al.  Second renormalization of tensor-network states. , 2008, Physical review letters.

[42]  David J. Schwab,et al.  Supervised Learning with Tensor Networks , 2016, NIPS.

[43]  Andrew J. Ferris,et al.  Tensor Networks and Quantum Error Correction , 2013, Physical review letters.

[44]  Philippe Corboz,et al.  Variational optimization with infinite projected entangled-pair states , 2016, 1605.03006.

[45]  Roman Orus,et al.  Exploring corner transfer matrices and corner tensors for the classical simulation of quantum lattice systems , 2011, 1112.4101.

[46]  Frank Verstraete,et al.  Residual entropies for three-dimensional frustrated spin systems with tensor networks , 2018, Physical Review E.

[47]  Dougal Maclaurin,et al.  Modeling, Inference and Optimization With Composable Differentiable Procedures , 2016 .

[48]  J I Cirac,et al.  Classical simulation of infinite-size quantum lattice systems in two spatial dimensions. , 2008, Physical review letters.

[49]  P. Hayden,et al.  Holographic duality from random tensor networks , 2016, 1601.01694.

[50]  Michael Levin,et al.  Tensor renormalization group approach to two-dimensional classical lattice models. , 2006, Physical review letters.

[51]  B. Swingle,et al.  Entanglement Renormalization and Holography , 2009, 0905.1317.

[52]  E. Miles Stoudenmire,et al.  Learning relevant features of data with multi-scale tensor networks , 2017, ArXiv.

[53]  Z. Y. Xie,et al.  Renormalization of tensor-network states , 2010, 1002.1405.

[54]  Yuya O. Nakagawa,et al.  Construction of Hamiltonians by supervised learning of energy and entanglement spectra , 2017, 1705.05372.

[55]  G. Vidal,et al.  Infinite time-evolving block decimation algorithm beyond unitary evolution , 2008 .

[56]  Alexander Novikov,et al.  Tensorizing Neural Networks , 2015, NIPS.

[57]  Shuo Yang,et al.  Loop Optimization for Tensor Network Renormalization. , 2015, Physical review letters.

[58]  R. Feynman Forces in Molecules , 1939 .

[59]  Roman Orus,et al.  A Practical Introduction to Tensor Networks: Matrix Product States and Projected Entangled Pair States , 2013, 1306.2164.

[60]  Jun Wang,et al.  Unsupervised Generative Modeling Using Matrix Product States , 2017, Physical Review X.

[61]  Lei Wang,et al.  Tree Tensor Networks for Generative Modeling , 2019, Physical Review B.

[62]  Walter Baur,et al.  The Complexity of Partial Derivatives , 1983, Theor. Comput. Sci..

[63]  Claudio Chamon,et al.  Fast counting with tensor networks , 2018, SciPost Physics.

[64]  Rupak Biswas,et al.  A flexible high-performance simulator for the verification and benchmarking of quantum circuits implemented on real hardware , 2018 .

[65]  Tianqi Chen,et al.  Training Deep Nets with Sublinear Memory Cost , 2016, ArXiv.

[66]  K. Birgitta Whaley,et al.  Towards quantum machine learning with tensor networks , 2018, Quantum Science and Technology.

[67]  Frank Verstraete,et al.  Diagonalizing transfer matrices and matrix product operators: a medley of exact and computational methods , 2016, 1611.08519.

[68]  Ying-Jer Kao,et al.  Gapless spin liquid in the kagome Heisenberg antiferromagnet with Dzyaloshinskii-Moriya interactions , 2018, Physical Review B.

[69]  F. Verstraete,et al.  Entanglement renormalization for quantum fields in real space. , 2011, Physical review letters.

[70]  Didier Poilblanc,et al.  Non-Abelian chiral spin liquid in a quantum antiferromagnet revealed by an iPEPS study , 2018, Physical Review B.

[71]  J Chen,et al.  Gapless Spin-Liquid Ground State in the S=1/2 Kagome Antiferromagnet. , 2016, Physical review letters.

[72]  James Stokes,et al.  Probabilistic Modeling with Matrix Product States , 2019, Entropy.

[73]  R. Martin,et al.  Electronic Structure: Basic Theory and Practical Methods , 2004 .

[74]  Luca Antiga,et al.  Automatic differentiation in PyTorch , 2017 .

[75]  F. Verstraete,et al.  Faster methods for contracting infinite two-dimensional tensor networks , 2017, Physical Review B.

[76]  Matthias Troyer,et al.  Competing states in the t-J model: uniform D-wave state versus stripe state. , 2014, Physical review letters.

[77]  B. Normand,et al.  Tensor renormalization of quantum many-body systems using projected entangled simplex states , 2013, 1307.5696.

[78]  Martin Suchara,et al.  Efficient Algorithms for Maximum Likelihood Decoding in the Surface Code , 2014, 1405.4883.

[79]  M. Giles An extended collection of matrix derivative results for forward and reverse mode algorithmic dieren tiation , 2008 .

[80]  Richard M. Martin Electronic Structure: Frontmatter , 2004 .

[81]  B. Christianson Reverse accumulation and attractive fixed points , 1994 .

[82]  Geoffrey E. Hinton,et al.  Learning representations by back-propagating errors , 1986, Nature.

[83]  R. Haghshenas,et al.  Single-layer tensor network study of the Heisenberg model with chiral interactions on a kagome lattice , 2018, Physical Review B.

[84]  F. Verstraete,et al.  Variational optimization algorithms for uniform matrix product states , 2017, 1701.07035.

[85]  U. Vazirani,et al.  A polynomial time algorithm for the ground state of one-dimensional gapped local Hamiltonians , 2015, Nature Physics.

[86]  G Vidal Classical simulation of infinite-size quantum lattice systems in one spatial dimension. , 2007, Physical review letters.

[87]  J. Ignacio Cirac,et al.  Continuous Tensor Network States for Quantum Fields , 2018, Physical Review X.

[88]  Andreas Griewank,et al.  Evaluating derivatives - principles and techniques of algorithmic differentiation, Second Edition , 2000, Frontiers in applied mathematics.

[89]  R. Haghshenas,et al.  An iPEPS study of kagome Heisenberg model with chiral interaction: A single-layer tensor-network algorithm , 2018 .

[90]  Martín Abadi,et al.  TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems , 2016, ArXiv.

[91]  Jing Chen,et al.  Phase Transition of the q -State Clock Model: Duality and Tensor Renormalization , 2017, 1706.03455.

[92]  D. Schuster,et al.  Speedup for quantum optimal control from automatic differentiation based on graphics processing units , 2016, 1612.04929.

[93]  L. Capriotti,et al.  Algorithmic differentiation and the calculation of forces by quantum Monte Carlo. , 2010, The Journal of chemical physics.

[94]  Guifre Vidal,et al.  Continuous tensor network renormalization for quantum fields , 2018, 1809.05176.

[95]  Neil D. Lawrence,et al.  Auto-Differentiating Linear Algebra , 2017, ArXiv.