PyVISA controls your instruments using raw commands.
Keithley2600 controls your Keithley 2600 instruments with abstraction.
PyMeasure controls a wide range of instruments.
トニカクタダシイ
Quantum renormalization in real space applies only to single-particle systems.
On each step, the Hamiltonian undergoes a truncation \[H^S(M) = V^\dagger H(M\cdot M_S) V,\] where \(V\) contains the most significant \(M\) eigenstates of \[\rho^S (M\cdot M_S),\] given by the ground state of \[H(M\cdot M_S).\]
In the algorithm, we should keep track of the creation operators on the boundary sites.
Prerequisites: for SVD and QR Decomposition, see Mathematics Miscellany.
\(\Lambda_{a_{l-1}, a_l}\) | ![]() |
Diagonal Matrix |
\(A^{\sigma_1}_{1, a_1}{}\) | ![]() |
Row Matrix (MPS) |
\(A^{\sigma_L}_{a_{L-1}, 1}{}\) | ![]() |
Column Matrix (MPS) |
\(A^{\sigma_l}_{a_{l-1}, a_l}{}\) | ![]() |
Left or Right Normalized Matrix (MPS) |
\(A^{\sigma_l *}_{a_{l-1}, a_l}{} = A^{\sigma_l \dagger}_{a_{l}, a_{l-1}}{}\) | ![]() |
Conjugation |
\(\sum_{\sigma} A^{\sigma \dagger} A^\sigma = \mathbb{1}{}\) | ![]() |
Left Normalization |
\(\sum_{\sigma} B^{\sigma} B^{\sigma\dagger} = \mathbb{1}{}\) | ![]() |
Right Normalization |
\(\ket{\psi} = \sum_{\sigma_1,\cdots,\sigma_L} M^{\sigma_1} \cdots M^{\sigma_L} \ket{\sigma_1\cdots \sigma_L}{}\) | ![]() |
MPS String |
\(W^{\sigma_1 \sigma'_1}_{1,b_1}{}\) | ![]() |
Row Matrix (MPO) |
\(W^{\sigma_L \sigma'_L}_{b_{L-1},1}{}\) | ![]() |
Column Matrix (MPO) |
\(W^{\sigma_l \sigma'_l}_{b_{l-1}, b_l}{}\) | ![]() |
Matrix (MPO) |
\(\hat{O} = \sum_{\vb*{\sigma},\vb*{\sigma}'} W^{\sigma_1 \sigma'_1} \cdots W^{\sigma_L \sigma'_L} \ket{\vb*{\sigma}}\bra{\vb*{\sigma}'}\) | ![]() |
MPO String |
\(\hat O \ket{\psi} = \sum_{\vb*{\sigma}} N^{\sigma_1} \cdots N^{\sigma_L} \ket{\vb*{\sigma}}\) | ![]() |
MPO Acting on MPS |
\[\ket{\psi} = \sum_{\sigma_1,\cdots,\sigma_L} c_{\sigma_1,\cdots,\sigma_L} \ket{\sigma_1, \cdots, \sigma_L}.\]
\[\ket{\psi} = \sum_{\sigma_1,\cdots,\sigma_L} A^{\sigma_1} A^{\sigma_2} \cdots A^{\sigma_{L-1}} A^{\sigma_L} \ket{\sigma_1,\cdots,\sigma_L}\] where
\[ \begin{align*} c_{\sigma_1,\cdots,\sigma_L} &\xlongequal[\mathrm{reshape}]{} \Psi_{\sigma_1,(\sigma_2,\cdots,\sigma_L)} \\ &\xlongequal{\mathrm{SVD}} \sum_{a_1}^{r_1} U_{\sigma_1,a_1} S_{a_1,a_1} (V^\dagger)_{a_1,(\sigma_2,\cdots,\sigma_L)} \\ &\xlongequal[\mathrm{reshape}]{A^{\sigma_1}_{a_1} = U_{\sigma_1,a_1}} \sum_{a_1}^{r_1} A^{\sigma_1}_{a_1} \Psi_{(a_1\sigma_2),(\sigma_3,\cdots,\sigma_L)} \\ &\xlongequal{\mathrm{SVD}} \sum_{a_1}^{r_1} \sum_{a_2}^{r_2} A^{\sigma_1}_{a_1} U_{(a_1\sigma_2),a_2} S_{a_2,a_2} (V^\dagger)_{a_2,(\sigma_3,\cdots,\sigma_L)} \\ &\xlongequal[\mathrm{reshape}]{A^{\sigma_2}_{a_1,a_2} = U_{(a_1\sigma_2),a_2}} \sum_{a_1}^{r_1} \sum_{a_2}^{r_2} A^{\sigma_1}_{a_1} A^{\sigma_2}_{a_1,a_2} \Psi_{(\sigma_2 a_3),(\sigma_4,\cdots,\sigma_L)} \\ &= \cdots \\ &= \sum_{a_1,\cdots,a_{L-1}} A^{\sigma_1}_{a_1} A^{\sigma_2}_{a_1,a_2} \cdots A^{\sigma_{L-1}}_{a_{L-2},a_{L-1}} A^{\sigma_L}_{a_{L-1}} \end{align*} \]
\[ \begin{align*} \sum_{\sigma_1,\cdots,\sigma_L} \sum_{a_1,\cdots,a_L} M_{(\sigma_1,1),a_1} M^{\sigma_2}_{a_1,a_2} \cdots \ket{\sigma_1\cdots \sigma_L} &= \sum_{\sigma_1,\cdots,\sigma_L} \sum_{a_1,\cdots,a_L} \sum_{s_1} A_{(\sigma_1,1),s_1} S_{s_1,s_1} V^\dagger_{s_1,a_1} M^{\sigma_2}_{a_1,a_2} \cdots \ket{\sigma_1,\cdots,\sigma_L} \\ &= \sum_{\sigma_1,\cdots,\sigma_L} \sum_{a_2,\cdots,a_L} \sum_{s_1} A^{\sigma_1}_{1,s_1} \tilde{M}^{\sigma_2}_{s_1,a_2} M^{\sigma_3}_{a_2,a_3} \cdots \ket{\sigma_1,\cdots,\sigma_L} \\ &= \cdots. \end{align*} \]
\[\qty(\Lambda^{[0]} \Gamma^{\sigma_1})\qty(\Lambda^{[1]} \Gamma^{\sigma_2})\qty(\Lambda^{[2]} \Gamma^{\sigma_3})\cdots \rightarrow A^{\sigma_1} A^{\sigma_2} A^{\sigma_3} \cdots.\]
\[\ket{\psi} = \sum_{\sigma_1,\cdots,\sigma_L} B^{\sigma_1} B^{\sigma_2} \cdots B^{\sigma_{L-1}} B^{\sigma_L} \ket{\sigma_1,\cdots,\sigma_L}\] where
Similar to that of left-canonical ones.
Similar to that of left-canonical ones.
\[\qty(\Gamma^{\sigma_1}\Lambda^{[1]}) \qty(\Gamma^{\sigma_2}\Lambda^{[2]}) \qty(\Gamma^{\sigma_3}\Lambda^{[3]})\cdots \rightarrow B^{\sigma_1} B^{\sigma_2} B^{\sigma_3} \cdots.\]
\[\ket{\psi} = \sum_{\sigma_1,\cdots,\sigma_L} A^{\sigma_1} \cdots A^{\sigma_l} S B^{\sigma_{l+1}} \cdots B^{\sigma_L}.\]
\[ \begin{align*} c_{\sigma_1,\cdots,\sigma_L} &= \sum_{a_l} (A^{\sigma_1} \cdots A^{\sigma_l})_{a_l} S_{a_l,a_l} (V^\dagger)_{a_l,(\sigma_{l+1},\cdots,\sigma_L)} \\ &= \sum_{a_l} (A^{\sigma_1} \cdots A^{\sigma_l})_{a_l} S_{a_l,a_l} (B^{\sigma_{l+1}} \cdots B^{\sigma_L})_{a_l}. \end{align*} \]
\[\ket{\psi} = \sum_{\sigma_1,\cdots,\sigma_L} \Gamma^{\sigma_1} \Lambda^{[1]} \Gamma^{\sigma_2} \Lambda^{[2]} \cdots \Gamma^{\sigma_{L-1}} \Lambda^{[L-1]} \Gamma^{\sigma_L} \ket{\sigma_1,\cdots,\sigma_L},\] where
\[ \begin{align*} c_{\sigma_1,\cdots,\sigma_L} &\xlongequal[\mathrm{reshape}]{} \Psi_{\sigma_1,(\sigma_2,\cdots,\sigma_L)} \\ &\xlongequal{\mathrm{SVD}} \sum_{a_1} A^{\sigma_1}_{a_1} \Lambda^{[1]}_{a_1,a_1}(V^\dagger)_{a_1,(\sigma_2,\cdots,\sigma_L)} \\ &\xlongequal[\mathrm{reshape}]{A^{\sigma_1}_{a_1} = \Gamma^{\sigma_1}_{a_1}} \sum_{a_1} \Gamma^{\sigma_1}_{a_1} \Psi_{(a_1\sigma_2),(\sigma_3,\cdots,\sigma_L)} \\ &\xlongequal{\mathrm{SVD}} \sum_{a_1,a_2} \Gamma^{\sigma_1}_{a_1} A^{\sigma_2}_{a_1,a_2} \Lambda^{[2]}_{a_2,a_2} (V^\dagger)_{a_2,(\sigma_3,\cdots,\sigma_L)} \\ &\xlongequal[\color{orange} \mathrm{problematic\ division}]{A^{\sigma_2}_{a_1,a_2} = \Lambda^{[1]}_{a_1,a_1}\Gamma^{\sigma_2}_{a_1,a_2}} \sum_{a_1,a_2} \Gamma^{\sigma_1}_{a_1} \Lambda^{[1]}_{a_1,a_1} \Gamma^{\sigma_2}_{a_1,a_2} \Psi_{(a_2,\sigma_3),(\sigma_4,\cdots,\sigma_L)} \\ &= \cdots \\ &= \sum_{a_1,\cdots,a_L} \Gamma^{\sigma_1}_{a_1} \Lambda^{[1]}_{a_1,a_1} \Gamma^{\sigma_2}_{a_1,a_2} \Lambda^{[2]}_{a_2,a_2} \cdots \Lambda^{[L-1]}_{a_{l-1},a_{l-1}} \Gamma^{\sigma_L}_{a_{l-1},a_l}. \end{align*} \]
Similar to that of right-canonical ones.
\[ \begin{align*} B^{\sigma_1} B^{\sigma_2} B^{\sigma_3} \cdots &\xlongequal{\mathrm{SVD}} (A^{\sigma_1} \Lambda^{[1]} V^\dagger) B^{\sigma_2} B^{\sigma_3} \cdots \\ &\xlongequal{A^{\sigma_1} = \Lambda^{[0]}\Gamma^{\sigma_1}} \Gamma^{\sigma_1} M^{\sigma_2} B^{\sigma_3} \cdots \\ &\xlongequal{\mathrm{SVD}} \Gamma^{\sigma_1} (A^{\sigma_2} \Lambda^{[2]}V^\dagger) B^{\sigma_3} \cdots \\ &\xlongequal[\color{orange}\mathrm{problematic\ division}]{A^{\sigma_2} = \Lambda^{[1]}\Gamma^{\sigma_2}} \Gamma^{\sigma_1} \Lambda^{[1]}\Gamma^{\sigma_2} M^{\sigma_3} B^{\sigma_3} \cdots. \end{align*} \]
Section not done, cf. §4.5.2, Schollwöck (2011).
\[\hat O \ket{\psi} = \sum_{\vb*{\sigma}} N^{\sigma_1} \cdots N^{\sigma_L} \ket{\vb*{\sigma}}.\]
\[\hat{O} \ket{\psi} = \sum_{\vb*{\sigma}} N^{\sigma_1} \cdots N^{\sigma_L} \ket{\vb*{\sigma}}\] where \[N^{\sigma_i} = \sum_{\sigma'_i} W^{\sigma_i \sigma'_i} \otimes M^{\sigma'_i}.\]
kron
.The lesson:
\[\ket{\psi} = \sum_{\sigma_1,\cdots,\sigma_L} A^{\sigma_1} \cdots A^{\sigma_{l-1}} \Psi^{\sigma_l} B^{\sigma_{l+1}} \cdots B^{\sigma_L} \ket{\sigma_1 \cdots \sigma_L}.\]
\[\bra{a_{l-1} \sigma_l a_l} \hat{H} \ket{a'_{l-1}\sigma'_l a'_l} = \sum_{b_{l-1},b_l} L^{a_{l-1},a'_{l-1}}_{b_{l-1}} W^{\sigma_l \sigma'_l}_{b_{l-1},b_l} R^{a_l,a'_l}_{b_l}.\]
For tricks that speed up the computation, see Computational Tricks, DMRG (II).
Add a correction to \(\hat{\rho}^{A\bullet}\) before doing SVD: \[\hat{\rho}^{A\bullet} = \tr_B \ket{\psi} \bra{\psi} + \alpha \sum_{b_l} \tr_B \hat{H}^{A\bullet}_{b_l}\ket{\psi} \bra{\psi} \hat{H}^{A\bullet}_{b_l},\] where \(\alpha\) takes small value \(O(10^{-4})\) and will be taken slowly to zero as sweeping goes on.
The correction term \(\hat{H}_{b_l}^{A\bullet}\ket{\psi}\) is evaluated as follows.
\[M = USV^\dagger\] where
\[M = QR\] where
\[M = Q_1 R_1\] where
kron
of two matrices of orthonormal columns/rows is again a matrix of orthogonal columns/rows, respectively.numpy.kron(a, b)
scipy.sparse.kron(a, b)
scipy.linalg.kron(a, b)
Implementations
The Hamiltonian is given by the XXZ model \[ H = -\frac{1}{2} \sum_{j=1}^N (J \sigma_j^x \sigma_{j+1}^x + J \sigma_j^y \sigma_{j+1}^y + J_z \sigma_{j}^z \sigma_{j+1}^z). \]
\(d\) is defined to be the number of states of a single site.
In line 40 and 41 two matrices are defined, \[ S^z_{1} = \frac{1}{2} \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad S^+_{1} = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \] as well as \[ H_1 = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}. \] \(H_1\) will be used as the single-site Hamiltonian at initialization.
The two-site Hamiltonian is defined in line 45 to be \[ \begin{align*} H_2(S_1, S_2) &= \frac{J}{2} S^+_1 \otimes S^{-}_2 + \frac{J}{2} S^{-}_1 \otimes S^+_2 + J_z S^z_1 \otimes S^z_2 \\ &= J(S_1^x \otimes S_2^x + S_1^y \otimes S_2^y) + J_z S_1^z \otimes S_2^z. \end{align*} \]
The enlarging process renews the operaors as \[ \begin{align*} H &\rightarrow H \otimes \mathbb{1}_{d\times d} + H_2(S_{\mathrm{edge}}, S_1), \\ S_{\mathrm{edge}}^z &\rightarrow \mathbb{1}_{M\times M} \otimes S^z_1, \\ S_{\mathrm{edge}}^+ &\rightarrow \mathbb{1}_{M\times M} \otimes S^+_1. \end{align*} \]
At each DMRG step, the following steps are carried out:
We may take system and environment to be the same. This may reduce half of the calculations.
How is the projected density matrix calculated? Although \(\psi\) is a vector in the direct product of two Hilbert spaces, it was represented by a column vector returned from eigsh
. The following snippet traces out the environment part:
psi = psi.reshape([m_sys, -1])
rho = np.dot(psi0, psi0.conjugate.transpose())
This section is deprecated. It's a total failure.
With the above notation the dimension of \(R[N_\uparrow\otimes N_\downarrow]\) is at most \(M\).
By a block solution of \([0\otimes 0]_L\) where \(L\) may be \(0\) we mean
By a block solution of \([N_\uparrow \otimes 0]_L\) where \(N_\uparrow > 0\) we mean
For a block solution of \([0 \otimes N_\downarrow]_L\) where \(N_\downarrow > 0\) just substitute \(\downarrow\) for \(\uparrow\) in the above definition.
By a block solution of \([N_\uparrow \otimes N_\downarrow]_L\) where \(N_\uparrow > 0\) and \(N_\downarrow > 0\) we mean
Now we are gonna obtain the block solution of \((L+1,N_\uparrow,N_\downarrow)\) recursively. We assume that \(N_\uparrow > 0\) and \(N_\downarrow > 0\).
We assume that block solutions of length \(L\) are already known, as well as the block solutions of \((L+1, N^*_\uparrow, N^*_\downarrow)\) where \(N^*_\uparrow \le N_\uparrow\), \(N^*_\downarrow \le N_\downarrow\), and at least one of the inequalities strictly holds.
The creation operators on the boundary are given by
Now we have to find the creation operators next to the boundary.
We are now able to construct \(H\) in principle. Then, following the standard DMRG procedure, we obtain a projection matrix \(V\) consists of column vectors.
Section not done.