commit afaa4e3295d6a8cdd774b47796c4e52b16ef7b50 parent 389e75d9f9ec6df21ba0f711bba3468404f503e1 Author: Miroslav Urbanek <mu@miroslavurbanek.com> Date: Tue, 6 Oct 2015 13:34:06 +0200 Add function make-uniform-propagator This function creates a propagator for a matrix product operator with the same Hamiltonian at each site. Diffstat:
tebdol/tebd.lisp | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/tebdol/tebd.lisp b/tebdol/tebd.lisp @@ -1,6 +1,7 @@ (defpackage :tebd (:use :common-lisp :blas :tensor :mpi :mps) (:export :make-mph-propagator + :make-uniform-propagator :tebd-evolve)) (in-package :tebd) @@ -99,6 +100,17 @@ :single2 (make-single-propagators mph (/ step 2)) :double2 (make-double-propagators mph (/ step 2)))) +(defun make-uniform-propagator (length hamiltonian step) + (let ((s1 (make-single-site-propagator hamiltonian step)) + (d1 (make-double-site-propagator hamiltonian hamiltonian step)) + (s2 (make-single-site-propagator hamiltonian (/ step 2))) + (d2 (make-double-site-propagator hamiltonian hamiltonian (/ step 2)))) + (make-propagator + :single1 (list s1 s1) + :double1 (make-array (1- length) :initial-element d1) + :single2 (list s2 s2) + :double2 (make-array (1- length) :initial-element d2)))) + (defun apply-single-site-operator (operator tensor) (tensor-permute (tensor-contract operator 1 tensor 1) '(1 0 2)))