Commit e5fabae4 authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Update ITensor to the latest version



Pull in the latest ITensor source code.

Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>
parent 45e34fbf
Loading
Loading
Loading
Loading
+65 −67
Original line number Diff line number Diff line
@@ -7,6 +7,16 @@ include ../options.mk

####################################

ifdef ITENSOR_USE_HDF5
SOURCES+= util/h5/array_interface.cc
SOURCES+= util/h5/file.cc
#SOURCES+= util/h5/format.cc
SOURCES+= util/h5/group.cc
SOURCES+= util/h5/h5object.cc
SOURCES+= util/h5/stl/string.cc
SOURCES+= util/h5/stl/vector.cc
endif

SOURCES+= util/args.cc
SOURCES+= util/input.cc
SOURCES+= util/cputime.cc
@@ -22,20 +32,17 @@ SOURCES+= itdata/diag.cc
SOURCES+= itdata/qdense.cc
SOURCES+= itdata/qcombiner.cc
SOURCES+= itdata/qdiag.cc
SOURCES+= itdata/qmixed.cc
SOURCES+= itdata/scalar.cc
##SOURCES+= itdata/itlazy.cc
SOURCES+= qn.cc
SOURCES+= tagset.cc
SOURCES+= index.cc
SOURCES+= itensor_interface.cc 
SOURCES+= itensor_operators.cc 
SOURCES+= indexset.cc
SOURCES+= itensor.cc
SOURCES+= qn.cc 
SOURCES+= iqindex.cc 
SOURCES+= iqtensor.cc 
SOURCES+= spectrum.cc
SOURCES+= decomp.cc
SOURCES+= svd.cc 
SOURCES+= hermitian.cc
SOURCES+= svd.cc
SOURCES+= global.cc
SOURCES+= mps/mps.cc
SOURCES+= mps/mpsalgs.cc
SOURCES+= mps/mpo.cc
@@ -64,17 +71,17 @@ GOBJECTS= $(patsubst %.cc,.debug_objs/%.o, $(SOURCES))

install: build debug

libitensor.a: $(OBJECTS)
$(ITENSOR_LIBDIR)/libitensor.a: $(OBJECTS)
	@echo "Building static library $(ITENSOR_LIBDIR)/libitensor.a"
	@ar r $(ITENSOR_LIBDIR)/libitensor.a $(OBJECTS)
	@ranlib $(ITENSOR_LIBDIR)/libitensor.a
	@ar r '$(ITENSOR_LIBDIR)/libitensor.a' $(OBJECTS)
	@ranlib '$(ITENSOR_LIBDIR)/libitensor.a'

libitensor-g.a: mkdebugdir $(GOBJECTS)
$(ITENSOR_LIBDIR)/libitensor-g.a: mkdebugdir $(GOBJECTS)
	@echo "Building static library $(ITENSOR_LIBDIR)/libitensor-g.a"
	@ar r $(ITENSOR_LIBDIR)/libitensor-g.a $(GOBJECTS)
	@ranlib $(ITENSOR_LIBDIR)/libitensor-g.a
	@ar r '$(ITENSOR_LIBDIR)/libitensor-g.a' $(GOBJECTS)
	@ranlib '$(ITENSOR_LIBDIR)/libitensor-g.a'

libitensor.$(DYLIB_EXT): $(OBJECTS)
$(ITENSOR_LIBDIR)/libitensor.$(DYLIB_EXT): $(OBJECTS)
ifdef ITENSOR_MAKE_DYLIB
ifeq ($(ITENSOR_MAKE_DYLIB),1)
	@echo "Building dynamic library $(ITENSOR_LIBDIR)/libitensor.$(DYLIB_EXT)"
@@ -82,7 +89,7 @@ ifeq ($(ITENSOR_MAKE_DYLIB),1)
endif
endif

libitensor-g.$(DYLIB_EXT): mkdebugdir $(GOBJECTS)
$(ITENSOR_LIBDIR)/libitensor-g.$(DYLIB_EXT): mkdebugdir $(GOBJECTS)
ifdef ITENSOR_MAKE_DYLIB
ifeq ($(ITENSOR_MAKE_DYLIB),1)
	@echo "Building dynamic library $(ITENSOR_LIBDIR)/libitensor-g.$(DYLIB_EXT)"
@@ -95,25 +102,28 @@ touch_all_headers:
	@touch all_basic.h
	@touch all_mps.h

build: libitensor.a libitensor.$(DYLIB_EXT) touch_all_headers
build: $(ITENSOR_LIBDIR)/libitensor.a $(ITENSOR_LIBDIR)/libitensor.$(DYLIB_EXT) touch_all_headers

debug: libitensor-g.a libitensor-g.$(DYLIB_EXT) touch_all_headers
debug: $(ITENSOR_LIBDIR)/libitensor-g.a $(ITENSOR_LIBDIR)/libitensor-g.$(DYLIB_EXT) touch_all_headers

mkdebugdir:
	@mkdir -p .debug_objs
	@mkdir -p .debug_objs/util
	@mkdir -p .debug_objs/util/h5
	@mkdir -p .debug_objs/util/h5/std_addons
	@mkdir -p .debug_objs/util/h5/stl
	@mkdir -p .debug_objs/tensor
	@mkdir -p .debug_objs/itdata
	@mkdir -p .debug_objs/mps

clean:	
	@rm -fr *.o .debug_objs util/*.o tensor/*.o itdata/*.o mps/*.o libitensor.a libitensor-g.a
	@rm -fr *.o .debug_objs util/*.o util/h5/*.o tensor/*.o itdata/*.o mps/*.o libitensor.a libitensor-g.a

util/input.o: util/input.h
.debug_objs/util/input.o: util/input.h

GDEPHEADERS=real.h global.h index.h util/readwrite.h
GDEPHEADERS+= tensor/types.h tensor/vecrange.h tensor/ten.h tensor/ten.ih \
GDEPHEADERS=real.h global.h index.h index_impl.h util/readwrite.h
GDEPHEADERS+= tensor/types.h tensor/vecrange.h tensor/ten.h tensor/ten_impl.h \
tensor/teniter.h tensor/range.h tensor/lapack_wrap.h tensor/vec.h util/safe_ptr.h
tensor/vec.o: $(GDEPHEADERS)
.debug_objs/tensor/vec.o: $(GDEPHEADERS)
@@ -122,16 +132,16 @@ tensor/mat.o: $(GDEPHEADERS)
.debug_objs/tensor/mat.o: $(GDEPHEADERS)
tensor/gemm.o: $(GDEPHEADERS)
.debug_objs/tensor/gemm.o: $(GDEPHEADERS)
GDEPHEADERS+= tensor/slicemat.h tensor/algs.h tensor/algs.ih
GDEPHEADERS+= tensor/slicemat.h tensor/algs.h tensor/algs_impl.h
tensor/algs.o: $(GDEPHEADERS)
.debug_objs/tensor/algs.o: $(GDEPHEADERS)
GDEPHEADERS+= tensor/permutation.h tensor/slicerange.h tensor/sliceten.h \
tensor/contract.h itdata/task_types.h indexset.ih indexset.h
tensor/contract.h itdata/task_types.h indexset_impl.h indexset.h
tensor/contract.o: $(GDEPHEADERS)
.debug_objs/tensor/contract.o: $(GDEPHEADERS)
ITDEPHEADERS= itdata/dense.h 
itdata/dense.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/dense.o: $(ITDEPHEADERS) $(GDEPHEADERS)
itdata/dense.o: $(ITDEPHEADERS) $(GDEPHEADERS) util/tensorstats.h
.debug_objs/itdata/dense.o: $(ITDEPHEADERS) $(GDEPHEADERS) util/tensorstats.h
ITDEPHEADERS+= itdata/diag.h
itdata/diag.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/diag.o: $(ITDEPHEADERS) $(GDEPHEADERS)
@@ -139,43 +149,31 @@ ITDEPHEADERS+= itdata/combiner.h
itdata/combiner.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/combiner.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= itdata/qdense.h itdata/qutil.h
itdata/qdense.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/qdense.o: $(ITDEPHEADERS) $(GDEPHEADERS)
itdata/qdense.o: $(ITDEPHEADERS) $(GDEPHEADERS) util/tensorstats.h
.debug_objs/itdata/qdense.o: $(ITDEPHEADERS) $(GDEPHEADERS) util/tensorstats.h
ITDEPHEADERS+= itdata/qcombiner.h
itdata/qcombiner.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/qcombiner.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= itdata/qdiag.h
itdata/qdiag.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/qdiag.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= itdata/qmixed.h
itdata/qmixed.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/qmixed.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= itdata/scalar.h
itdata/scalar.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itdata/scalar.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= index.h
ITDEPHEADERS+= smallstring.h tagset.h index.h
index.o: $(ITDEPHEADERS)
.debug_objs/index.o: $(ITDEPHEADERS)
ITDEPHEADERS+= indexset.ih indexset.h
ITDEPHEADERS+= indexset_impl.h indexset.h
indexset.o: $(ITDEPHEADERS)
.debug_objs/indexset.o: $(ITDEPHEADERS)
ITDEPHEADERS+= itensor_interface.h itensor_interface.ih \
itensor.ih itensor.h itdata/itdata.h itdata/dense.h itdata/diag.h
itensor_interface.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itensor_interface.o: $(ITDEPHEADERS) $(GDEPHEADERS)
itensor_operators.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itensor_operators.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= itensor.h itensor_impl.h \
itensor_impl.h itensor.h itdata/itdata.h itdata/dense.h itdata/diag.h
itensor.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/itensor.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= qn.h
qn.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/qn.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= iqindex.h
iqindex.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/iqindex.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= iqtensor.ih iqtensor.h detail/skip_iterator.h
iqtensor.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/iqtensor.o: $(ITDEPHEADERS) $(GDEPHEADERS)
ITDEPHEADERS+= detail/skip_iterator.h
GDEPHEADERS+= spectrum.h
spectrum.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/spectrum.o: $(ITDEPHEADERS) $(GDEPHEADERS)
@@ -186,7 +184,7 @@ svd.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/svd.o: $(ITDEPHEADERS) $(GDEPHEADERS)
hermitian.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/hermitian.o: $(ITDEPHEADERS) $(GDEPHEADERS)
GDEPHEADERS+= mps/mps.h
GDEPHEADERS+= mps/mps.h mps/siteset.h
mps/mps.o: $(ITDEPHEADERS) $(GDEPHEADERS)
.debug_objs/mps/mps.o: $(ITDEPHEADERS) $(GDEPHEADERS)
mps/mpsalgs.o: $(ITDEPHEADERS) $(GDEPHEADERS)
+13 −2
Original line number Diff line number Diff line
//
// Distributed under the ITensor Library License, Version 1.2
//    (See accompanying LICENSE file.)
// Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef __ITENSOR_ALL_H
#define __ITENSOR_ALL_H
+15 −4
Original line number Diff line number Diff line
//
// Distributed under the ITensor Library License, Version 1.2
//    (See accompanying LICENSE file.)
// Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef __ITENSOR_ALL_BASIC_H
#define __ITENSOR_ALL_BASIC_H
@@ -18,9 +29,9 @@
//

#include "itensor/decomp.h"
#include "itensor/eigensolver.h"
#include "itensor/iterativesolvers.h"
#include "itensor/util/input.h"
#include "itensor/util/autovector.h"
#include "itensor/util/print_macro.h"
#include "itensor/util/str.h"

#endif
+18 −6
Original line number Diff line number Diff line
//
// Distributed under the ITensor Library License, Version 1.2
//    (See accompanying LICENSE file.)
// Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef __ITENSOR_ALL_MPS_H
#define __ITENSOR_ALL_MPS_H
@@ -24,9 +35,7 @@
#include "itensor/util/stats.h"

#include "itensor/mps/dmrg.h"
#include "itensor/mps/idmrg.h"
#include "itensor/mps/tevol.h"
#include "itensor/mps/hambuilder.h"
#include "itensor/mps/autompo.h"

#include "itensor/mps/lattice/square.h"
@@ -34,8 +43,11 @@

#include "itensor/mps/sites/spinhalf.h"
#include "itensor/mps/sites/spinone.h"
#include "itensor/mps/sites/hubbard.h"
#include "itensor/mps/sites/spinless.h"
#include "itensor/mps/sites/spintwo.h"
#include "itensor/mps/sites/customspin.h"
#include "itensor/mps/sites/boson.h"
#include "itensor/mps/sites/electron.h"
#include "itensor/mps/sites/fermion.h"
#include "itensor/mps/sites/tj.h"
#include "itensor/mps/sites/Z3.h"

+14 −2
Original line number Diff line number Diff line
//
// Distributed under the ITensor Library License, Version 1.2
//    (See accompanying LICENSE file.)
// Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef __ITENSOR_ARROW_H
#define __ITENSOR_ARROW_H

#include <iostream>
#include "itensor/util/error.h"

namespace itensor {

Loading