Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Numerical computation of the equilibrium-reduced density matrix for strongly coupled open quantum systems

This is a companion piece to Chen & Cheng (2022). See also Chen et al. (2024) for some follow-up work.

Code to replicate the figures in the corresponding paper can be found on Github.

Introduction

A quantum system is described by a Hamiltonian matrix H\vec{H}. When the system is at thermal equilibrium at temperature 1/β1/\beta, then the state of the system is described by the matrix

ρ=exp(βH)/Z(β),Z(β)=tr(exp(βH)).\bm{\rho} = \exp(-\beta \vec{H}) / Z(\beta) ,\qquad Z(\beta) = \tr(\exp(-\beta \vec{H})).

The function Z(β)Z(\beta) is called the partition function, and gives us access to all kinds of thermodynamic quantities such as the energy, specific heat, magnetization, etc.

Often we are interested in the state of some subsystem of the total system. This is represented by

ρ(β)=trb(βH)/Z(β),\bm{\rho}^*(\beta) = \trb(-\beta \vec{H}) / Z(\beta),

where trb()\trb(\cdot) is the partial trace described below.

Exponentially big linear algebra

Computing the trace (and partial trace) of a given matrix is trivial. For the trace you just sum the diagonal entries, and for the partial trace you do something similarly easily. However, we are starting with H\vec{H} not exp(βH)\exp(-\beta \vec{H}), and this presents some issues.

For a system with NN sites, the size of H\vec{H} is 2N2^N. This means that even for reasonably small NN, storing a N×NN\times N matrix is impossible. For instance, if N=20N=20, then 2N2^N is about one million, and storing a N×NN\times N matrix of double precision floating point numbers (64 bits per number) would require over 8 terrabtyes of memory! Increasing NN by one quadruples the memory costs, so even if we have 8 terrabytes of memory, we’ll quickly run out for NN even just a bit larger.

Fortunately, H\vec{H} typically has a very sparse representation, often with just O(N)O(N) nonzero entries. While this means we can store H\vec{H} itself, exp(βH)\exp(-\beta \vec{H}) is typically not sparse and therefore it is intractable to store. Moreover, even if we would store exp(βH)\exp(-\beta \vec{H}), computing it would be a big task!

Stochastic trace estimation

There are lots of algorithms for estimating vTf(H)v\vec{v}^\T f(\vec{H})\vec{v} using only matrix-vector products with H\vec{H}. For instance, the Lanczos method for matrix function approximation (Lanczos-FA) is a common choice.

There are lots of nice overviews on stochastic trace estimation, and this blog post by Ethan Epperly is especially good. For our purposes, we only need to know that if v\vec{v} is a vector for which E[vvT]=I\EE[\vec{v} \vec{v}^\T] = \vec{I} (i.e. all the entries are uncorrelated), then

E[vTAv]=tr(A).\EE\big[\vec{v}^\T \vec{A} \vec{v}\big] = \tr(\vec{A}).

A simple way to generate such a v\vec{v} is by taking each entry to be an independent standard normal random variable. We will call estimators of the form vTAv\vec{v}^\T \vec{A}\vec{v} a quadratic trace estimator.

Partial trace estimation

Suppose we can partition a matrix A\vec{A} as

A=[A1,1A1,2A1,daA2,1A2,2A2,daAda,1Ada,2Ada,da].\vec{A} = \begin{bmatrix} \vec{A}_{1,1} & \vec{A}_{1,2} & \cdots & \vec{A}_{1,\da} \\ \vec{A}_{2,1} & \vec{A}_{2,2} & \cdots & \vec{A}_{2,\da} \\ \vdots & \vdots & \ddots & \vdots \\ \vec{A}_{\da,1} & \vec{A}_{\da,2} & \cdots & \vec{A}_{\da,\da} \end{bmatrix}.

Then the partial trace of A\vec{A} is defined as

trb(A):=[tr(A1,1)tr(A1,2)tr(A1,da)tr(A2,1)tr(A2,2)tr(A2,da)tr(Ada,1)tr(Ada,2)tr(Ada,da)].\trb(\vec{A}) := \begin{bmatrix} \tr(\vec{A}_{1,1}) & \tr(\vec{A}_{1,2}) & \cdots & \tr(\vec{A}_{1,\da}) \\ \tr(\vec{A}_{2,1}) & \tr(\vec{A}_{2,2}) & \cdots & \tr(\vec{A}_{2,\da}) \\ \vdots & \vdots & \ddots & \vdots \\ \tr(\vec{A}_{\da,1}) & \tr(\vec{A}_{\da,2}) & \cdots & \tr(\vec{A}_{\da,\da}) \end{bmatrix}.

Note that each entry of the partial trace is obtained by taking the trace of a certain matrix. This suggests we can apply use quadratic trace estimators to approximate each of the entries of the partial trace! Indeed,

(Ida ⁣v)TA(Ida ⁣v)=[vTA1,1vvTA1,2vvTA1,davvTA2,1vvTA2,2vvTA2,davvTAda,1vvTAda,2vvTAda,dav](\vec{I}_{\da} \! \otimes \vec{v})^\T \vec{A} (\vec{I}_{\da} \! \otimes \vec{v}) = \begin{bmatrix} \vec{v}^\T \vec{A}_{1,1} \vec{v} & \vec{v}^\T \vec{A}_{1,2} \vec{v} & \cdots & \vec{v}^\T \vec{A}_{1,\da} \vec{v} \\ \vec{v}^\T \vec{A}_{2,1} \vec{v} & \vec{v}^\T \vec{A}_{2,2} \vec{v} & \cdots & \vec{v}^\T \vec{A}_{2,\da} \vec{v} \\ \vdots & \vdots & \ddots & \vdots \\ \vec{v}^\T \vec{A}_{\da,1} \vec{v} & \vec{v}^\T \vec{A}_{\da,2} \vec{v} & \cdots & \vec{v}^\T \vec{A}_{\da,\da} \vec{v} \end{bmatrix}

provides an unbiased estimator for trb(A)\trb(\vec{A}).

Given independent and identically distributed copies v1,,vm\vec{v}_1, \ldots, \vec{v}_m of v\vec{v}, we arrive at an estimator

tr^bm(A):=1mi=1m(Ida ⁣vi)TA(Ida ⁣vi).\trbest^{m}(\vec{A}) := \frac{1}{m} \sum_{i=1}^{m} (\vec{I}_{\da} \! \otimes \vec{v}_i)^\T \vec{A} (\vec{I}_{\da} \! \otimes \vec{v}_i).
References
  1. Chen, T., & Cheng, Y.-C. (2022). Numerical computation of the equilibrium-reduced density matrix for strongly coupled open quantum systems. The Journal of Chemical Physics, 157(6), 064106. 10.1063/5.0099761
  2. Chen, T., Chen, R., Li, K., Nzeuton, S., Pan, Y., & Wang, Y. (2024). Faster Randomized Partial Trace Estimation. SIAM Journal on Scientific Computing, 46(6), A3427–A3447. 10.1137/23m1620399