Skip to content

Commit

Permalink
Math fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
haggaila committed Oct 8, 2024
1 parent 0e544f7 commit 9fbf6e5
Showing 1 changed file with 37 additions and 35 deletions.
72 changes: 37 additions & 35 deletions docs/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The dynamics is determined by: (1) a Hamiltonian, which corresponds to the unita
These two types of terms enter the so-called *Lindblad equation* that determines the evolution of the *density matrix* of the system.
Since we have $N$ qubits the Hilbert space has dimension $2^N$ and the density matrix is $2^N$ by $2^N$ in size. In practice this is a huge dimension unless $N$ is very small, and it therefore prevents a direct brute-force numerical solution of the Lindblad equation.

The present code offers an approximate solution of the problem that can be very accurate for large systems (typically up to N~100 or more) if the geometry of the couplings between the qubits is one-dimensional. This approach can also be more efficient than a brute force approach in other geometries.
The present code offers an approximate solution of the problem that can be very accurate for large systems (typically up to $N\sim 100$ or more) if the geometry of the couplings between the qubits is one-dimensional. This approach can also be more efficient than a brute force approach in other geometries.

Two publications in which some simulation results obtained with this code have been described:

Expand All @@ -21,47 +21,47 @@ https://doi.org/10.1103/PhysRevB.102.064301

An MPS is a particular way to encode
a many-body wave-function using a set of matrices. Consider a system made of
<img src="https://render.githubusercontent.com/render/math?math=N"> qubits, in a pure state
<img src="https://render.githubusercontent.com/render/math?math=\left|\psi\right\rangle=\sum_{s_1,s_2,\cdots,s_N}\psi\left(s_1,s_2,\cdots,s_N\right)\left|s_1\right\rangle\left|s_2\right\rangle\cdots\left|s_N\right\rangle">.
In this expression the sum runs over the <img src="https://render.githubusercontent.com/render/math?math=2^N"> basis states (<img src="https://render.githubusercontent.com/render/math?math=s_i\in\left\{0,1\right\}">) and the wave-function is encoded
into the function <img src="https://render.githubusercontent.com/render/math?math=\psi:\left\{s_i\right\}\to\psi\left(s_1,s_2,\cdots,s_N\right)">. An MPS is a state where the wave function is written
<img src="https://render.githubusercontent.com/render/math?math=\psi\left(s_1,s_2,\cdots,s_N\right)={\rm Tr}\left[A^{(s_1)}_1A^{(s_2)}_2\cdots A^{(s_N)}_N\right]">
where, for each qubit <img src="https://render.githubusercontent.com/render/math?math=i"> we have introduced two matrices
<img src="https://render.githubusercontent.com/render/math?math=A^{(0)}_i"> and <img src="https://render.githubusercontent.com/render/math?math=A^{(1)}_i"> (for a local Hilbert space of dimension
<img src="https://render.githubusercontent.com/render/math?math=D"> one needs
<img src="https://render.githubusercontent.com/render/math?math=D"> matrices
<img src="https://render.githubusercontent.com/render/math?math=A^{(0)}_i\cdots A^{(D)}_i">for each qubit). These matrices are in general rectangular
(<img src="https://render.githubusercontent.com/render/math?math=d_i\times d_{i%2b1}">)
and the wave-function is obtained by multiplying them. What determines the dimensions of the matrices ?
If the matrices are one-dimensional (scalar) one has a trivial product state (and all product states can be written this way). On the other hand, if one allows for very large matrices, of size <img src="https://render.githubusercontent.com/render/math?math=2^N">, any arbitrary state can be written as an MPS.
In fact the MPS representation is really useful
when the system has a moderate amount of bipartite entanglement.
$N$ qubits, in a pure state
$\left|\psi\right\rangle=\sum_{s_1,s_2,\cdots,s_N}\psi\left(s_1,s_2,\cdots,s_N\right)\left|s_1\right\rangle\left|s_2\right\rangle\cdots\left|s_N\right\rangle$.
In this expression the sum runs over the $2^N$ basis states ($s_i\in\left\{0,1\right\}$) and the wave-function is encoded
into the function $\psi:\left\{s_i\right\}\to\psi\left(s_1,s_2,\cdots,s_N\right)$. An MPS is a state where the wave function is written
$\psi\left(s_1,s_2,\cdots,s_N\right)={\rm Tr}\left[A^{(s_1)}_1A^{(s_2)}_2\cdots A^{(s_N)}_N\right]$
where, for each qubit $i$ we have introduced two matrices
$A^{(0)}_i$ and $A^{(1)}_i$ (for a local Hilbert space of dimension
$D$ one needs
$D$ matrices
$A^{(0)}_i\cdots A^{(D)}_i$ for each qubit). These matrices are in general rectangular
($d_i\times d_{i+1}$)
and the wave-function is obtained by multiplying them. What determines the dimensions of the matrices?
If the matrices are one-dimensional (scalar) one has a trivial product state (and all product states can be written this way).
On the other hand, if one allows for very large matrices, of size $2^N$, any arbitrary state can be written as an MPS.
In fact the MPS representation is really useful when the system has a moderate amount of bipartite entanglement.
As a "rule of thumb", to get a good MPS approximation of a given state, each
matrix <img src="https://render.githubusercontent.com/render/math?math=A^{(s_i)}_i">, of size <img src="https://render.githubusercontent.com/render/math?math=d_{i-1}\times d_{i}">, should have a dimension
<img src="https://render.githubusercontent.com/render/math?math=d_i"> of the order of
<img src="https://render.githubusercontent.com/render/math?math=e^{S_{\rm vN}(i)}">, where
<img src="https://render.githubusercontent.com/render/math?math=S_{\rm vN}(i)"> the von Neumann entropy of the subsystem
<img src="https://render.githubusercontent.com/render/math?math=[i%2b1,\cdots,N]">.


What about mixed states ? They can be represented using so-called matrix-product operators (MPO):
<img src="https://render.githubusercontent.com/render/math?math=\rho=\sum_{a_1,a_2,\cdots,a_N}{\rm Tr}\left[M^{(a_1)}_1 M^{(a_2)}_2\cdots M^{(a_N)}_N\right]\sigma^a_1 \otimes \sigma^a_2 \otimes \cdots \sigma^a_N">
where each <img src="https://render.githubusercontent.com/render/math?math=a_i"> can take four values
<img src="https://render.githubusercontent.com/render/math?math=\in\{1,x,y,z\}">,
<img src="https://render.githubusercontent.com/render/math?math=\sigma^{a_i}"> is a Pauli matrix or the identity acting on qubit
<img src="https://render.githubusercontent.com/render/math?math=i">,
matrix $A^{(s_i)}_i$, of size $d_{i-1}\times d_{i}$, should have a dimension
$d_i$ of the order of
$e^{S_{\rm vN}(i)}$, where
$S_{\rm vN}(i)$ is the von Neumann entropy of the subsystem
$[i+1,\cdots,N]$.


What about mixed states? They can be represented using so-called matrix-product operators (MPO):
$\rho=\sum_{a_1,a_2,\cdots,a_N}{\rm Tr}\left[M^{(a_1)}_1 M^{(a_2)}_2\cdots M^{(a_N)}_N\right]\sigma^a_1 \otimes \sigma^a_2 \otimes \cdots \sigma^a_N$
where each $a_i$ can take four values
$\in\{1,x,y,z\}$,
$\sigma^{a_i}$ is a Pauli matrix or the identity acting on qubit
$i$,
and we have associated four matrices
<img src="https://render.githubusercontent.com/render/math?math=M_i^{(1)}">,
<img src="https://render.githubusercontent.com/render/math?math=M_i^{(x)}">,
<img src="https://render.githubusercontent.com/render/math?math=M_i^{(y)}"> and
<img src="https://render.githubusercontent.com/render/math?math=M_i^{(z)}"> to each qubit.
$M_i^{(1)},
$M_i^{(x)}$,
$M_i^{(y)}$ and
$M_i^{(z)}$ to each qubit.



### Bond dimension and entanglement
MPS can allow to store reliably a quantum state with a huge memory gain (compression) when the state is not too entangled. As explained above,
we should expect that, for a given level of accuracy, the size of the matrices in an MPS will scale as the exponential of the bipartite entanglement entropy (associated to the bi-partition on that 'bond'). In the context of MPS the matrix sizes
<img src="https://render.githubusercontent.com/render/math?math=d_i"> are called 'bond dimensions'.
$d_i$ are called 'bond dimensions'.

The representation of the pure state in terms of an MPS is therefore all the more efficient as the corresponding pure-state is weakly entangled. By 'more efficient' we mean here that, for a given level of accuracy, the size of the matrices in the MPS will be smaller. Alternatively, if the matrix sizes are fixed, a weakly entangled state will be more precisely represented by an MPS than a highly entangled one.

Expand All @@ -79,7 +79,9 @@ We again refer here to the review by U. Schollwöck: https://doi.org/10.1016/j.a

### Vectorization

A mixed state can be viewed as a pure state in some enlarged Hibert space with dimension squared. This is the so-called *vectorization*, and it is heavily used in this code. For a single qubit a density matrix can be viewed as one vector (= a pure state of some fictitious system) in a space of dimension 4. In this code a many-body density matrix is considered as a pure state of a (fictitious) system with (2^N)^2 = 4^N states. In turn, such a pure state is encoded as an MPS (of a system with 4 states per site). The Lindblad super-operator acts linearly on density matrices. Since the present implementation encodes the density matrix as an MPS, the Lindblad super-operator is naturally encoded as an MPO.
A mixed state can be viewed as a pure state in some enlarged Hibert space with dimension squared.
This is the so-called *vectorization*, and it is heavily used in this code. For a single qubit a density matrix can be viewed as one vector (= a pure state of some fictitious system) in a space of dimension 4.
In this code a many-body density matrix is considered as a pure state of a (fictitious) system with $(2^N)^2 = 4^N$ states. In turn, such a pure state is encoded as an MPS (of a system with 4 states per site). The Lindblad super-operator acts linearly on density matrices. Since the present implementation encodes the density matrix as an MPS, the Lindblad super-operator is naturally encoded as an MPO.

This can sometimes be source of confusion: the density matrix is of course an operator acting on the physical Hilbert space of the qubits, but, after vectorization, we interpret it as a pure state, and thus as an MPS.

Expand Down

0 comments on commit 9fbf6e5

Please sign in to comment.