 Tensor Network Theory Library  Beta release 1.2.1 A library of routines for performing TNT-based operations
init_quantum_bowling.m

Creates an initialisation file suitable for running with tntEvolve_if.c.

This creates the same system as the template Quantum bowling on TNTgo.

%% Creating an initialisation file for TNT library functions
clear all;
% matlab filename for input file
savename = 'quantum_bowling.mat';
% Initialise all variables required
%% Create n-species operators
ns = 1; % Number of species
nmax = 3; % Maximum number of bosons per site
[bdag,b,n] = tntMatBosonOps(nmax,ns); % Creating boson operators
d = size(n{1},1);% Physical dimension
%% Defining the physical basis - no symmetry information
tntSystem.basisOp = tntMatAppendBasisOp(n{1},[]); %Set the basis operator for the system
%% Set up the system
chi = 40;
L = 40;
%% Parameters for modifying the start state
% Starting from a vaccuum so no need to define base state
modifypmpo = [0 1 1]; % Sum, then 2 product MPOs applied
% Define 1st MPO (sum)
osm_0 = tntMatCreateOpArray({bdag{1}}); % Operators for the first MPO: create boson
A = 1; jc = 5; w = 4;
osparamm_0 = A*exp(-((1:L)-jc-1).^2/(2*w^2)); % Amplitudes are a guassian
% Define 2nd MPO (product)
snm_1 = 0:(L-1); % Site numbers - term on every site
osm_1 = cell(1,L);
for loop = 1:L
osm_1{loop} = expm(0.5i*pi*(loop-1)*n{1}); % Operators - linear varying phase term
end
osm_1 = tntMatCreateOpArray(osm_1);
% Define 3rd MPO (product)
bdsq=bdag{1}^2;
osm_2 = tntMatCreateOpArray({bdsq,bdsq,bdsq,bdsq,bdsq}); % Operators - creating 2 bosons on five sites
snm_2 = [17 18 19 20 21]; % Site numbers - central five sites
%% Parameters for time evolution
dt = 0.01;
numsteps = 1400;
tbigstep = 10;
%% Evolution Hamiltonian
% Carry on evolution under the action of the Bose-Hubbard Hamiltonian
% Onsite terms: Interaction
ost = tntMatCreateOpArray({0.5*n{1}*(n{1}-eye(d))});
osparamt = 60;
% Nearest-neighbour terms: Hopping
nnlt = tntMatCreateOpArray({bdag{1},b{1}});
nnrt = tntMatCreateOpArray({b{1},bdag{1}});
nnparamt = [-1;-1];
%% Expectation values to take
ExOp.os_operators = tntMatCreateOpArray({n{1}});
ExOp.os_labels = {'density'};
ExOp.nn_operators = {};
ExOp.nn_labels = {};
ExOp.cs_operators = {};
ExOp.cs_labels = {};
ExOp.ap_operators = {};
ExOp.ap_labels = {};
%% Save all the parameters
save(savename);