Skip to content

Commit

Permalink
Release 3.1.0
Browse files Browse the repository at this point in the history
    Changelog:
    - added support for TD-DMRG with time-independent Hamiltonian
    - added Changelog
  • Loading branch information
AlbertoBaiardi committed Dec 6, 2021
1 parent 5ab0eef commit f6d3a3c
Show file tree
Hide file tree
Showing 87 changed files with 36,853 additions and 789 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
build*/
my*
.vscode
**check*
**resu*
103 changes: 82 additions & 21 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,131 @@
image: gitlab.chab.ethz.ch:4567/reiher/docker/qcmaquis-gcc:latest

# Pipeline that compiles the code with increasingly complex models

stages:
- buildBasic
- testBasic
- buildAdvanced
- testAdvanced
- buildFinal
- testFinal

build-electronic:
stage: build
stage: buildBasic
tags:
- default_docker
script:
- mkdir buildElectronic && cd buildElectronic
- cmake -DQCMAQUIS_TESTS=ON -DBUILD_SYMMETRIES="TwoU1;TwoU1PG;SU2U1;SU2U1PG" ../dmrg
- make -j4
- make -j2
artifacts:
paths:
- buildElectronic/
expire_in: 6h
when: always

testElectronic:
stage: testBasic
needs: ["build-electronic"]
tags:
- default_docker
script:
- cd buildElectronic
- make test -j2

build-relativistic:
stage: build
stage: buildAdvanced
needs: ["testElectronic"]
tags:
- default_docker
script:
- mkdir buildRelativistic && cd buildRelativistic
- cmake -DQCMAQUIS_TESTS=ON -DBUILD_SYMMETRIES="TwoU1;TwoU1PG;SU2U1;SU2U1PG;U1DG" ../dmrg
- make -j4
- make -j2
artifacts:
paths:
- buildRelativistic/
expire_in: 6h
when: always

testRelativistic:
stage: testAdvanced
needs: ["build-relativistic"]
tags:
- default_docker
script:
- cd buildRelativistic
- make test -j2

build-with-nu1:
stage: build
stage: buildFinal
needs: ["testRelativistic"]
tags:
- default_docker
script:
- mkdir buildNU1 && cd buildNU1
- cmake -DQCMAQUIS_TESTS=ON -DBUILD_SYMMETRIES="TwoU1;TwoU1PG;SU2U1;SU2U1PG;U1DG;NU1" -DBUILD_PREBO=ON -DDMRG_NUMSYMM=5 ../dmrg
- make -j4
- make -j2
artifacts:
paths:
- buildNU1/
expire_in: 6h
when: always

testElectronic:
stage: test
needs: ["build-electronic"]
testNU1:
stage: testFinal
needs: ["build-with-nu1"]
tags:
- default_docker
script:
- cd buildElectronic
- make test
- cd buildNU1
- make test -j4

testRelativistic:
stage: test
needs: ["build-relativistic"]
# Pipeline for the TD-DMRG case

build-TD-conventional:
stage: buildBasic
tags:
- default_docker
script:
- cd buildRelativistic
- make test
- mkdir buildTDConventional && cd buildTDConventional
- cmake -DQCMAQUIS_TESTS=ON -DBUILD_SYMMETRIES="TwoU1;TwoU1PG;SU2U1;SU2U1PG" -DBUILD_DMRG_EVOLVE=ON ../dmrg
- make -j2
artifacts:
paths:
- buildTDConventional/
expire_in: 6h
when: always

testNU1:
stage: test
needs: ["build-with-nu1"]
testTDConventional:
stage: testBasic
needs: ["build-TD-conventional"]
tags:
- default_docker
script:
- cd buildNU1
- make test
- cd buildTDConventional
- make test -j2

build-TD-with-all-symmetries:
stage: buildAdvanced
needs: ["testTDConventional"]
tags:
- default_docker
script:
- mkdir buildTDAllSymmetries && cd buildTDAllSymmetries
- cmake -DQCMAQUIS_TESTS=ON -DBUILD_SYMMETRIES="TwoU1;TwoU1PG;SU2U1;SU2U1PG;U1DG;NU1" -DBUILD_DMRG_EVOLVE=ON -DBUILD_PREBO=ON ../dmrg
- make -j2
artifacts:
paths:
- buildTDAllSymmetries/
expire_in: 6h
when: always

testTDAllSymmetries:
stage: testAdvanced
needs: ["build-TD-with-all-symmetries"]
tags:
- default_docker
script:
- cd buildTDAllSymmetries
- make test -j2
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

## Release 3.1.0

- Added support for TD-DMRG with time-independent Hamiltonian

## Release 3.0.6

- Bugfix for compilation with BUILD_PREBO=OFF

## Release 3.0.5

- Added support for PreBO DMRG calculations

## Release 3.0.4

- Fixed overlap calculations in MPSSI
- Fixed number of sweeps for DMRGSCF excited states
- Got rid of boost::enable_if and boost::shared_ptr in favour of STL
- Small updates in the Fortran interface and for Mac OS X

## Release 3.0.3

- Fix for Fiedler ordering and excited states
- Faster parallel RDM evaluation
- Fixed some crashes for TDM evaluation
- Added several tests for RDMs
- Ability to read necessary parameters from checkpoint files
36 changes: 29 additions & 7 deletions dmrg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ option(ENABLE_OMP "Enable OpenMP" ON)
# option(ENABLE_ALPS_MODELS "Enable binding with ALPS lattices and models" OFF)
option(LAPACK_64_BIT "Build for 64-bit LAPACK library" ON)

# Standalone utility binaries, mostly deprecated by the binary interface
# DMRG-related flags
option (BUILD_INIT "Build dmrg_init binary (deprecated)" OFF)
option (BUILD_CIDEAS "Build CIDEAS binary (deprecated)" OFF)
option (BUILD_MPS_ROTATE "Build mps_rotate binary for RASSI counterrotation (deprecated)" OFF)
Expand All @@ -57,8 +57,15 @@ option (BUILD_ONETDM_DIAG "Build 1-TDM diagonal elements calculator (deprecated
option (BUILD_MPS2CI "Build CI coefficient reconstruction facilities" OFF)
option (BUILD_DEAS "Build s1 and I printer tool" OFF)
option (BUILD_MPS_TRANSFORM "Build MPS SU2->2U1 symmetry group transformation tool" OFF)
option (BUILD_DMRG_EVOLVE "Builds the time-evolution DMRG module" OFF)
option (BUILD_PREBO "Build PreBO model" OFF)

# Time-evolution TD-DMRG
if(BUILD_DMRG_EVOLVE)
list(APPEND DMRG_DEFINITIONS -DDMRG_TD)
set(DMRG_TD TRUE)
endif(BUILD_DMRG_EVOLVE)

option (ENABLE_COLLECTOR "Enable profiling through DataCollector object" OFF)
mark_as_advanced(ENABLE_COLLECTOR)

Expand Down Expand Up @@ -182,8 +189,13 @@ foreach(SYMM ${BUILD_SYMMETRIES})
set(DMRG_HAS_${SYMM_NAME} TRUE)
endforeach(SYMM)

if((BUILD_PREBO) AND (NOT DMRG_HAS_NU1))
if((BUILD_PREBO))
if((NOT DMRG_HAS_NU1))
message(FATAL_ERROR "For pre-BO module, activate NU1 symmetry!")
else()
list(APPEND DMRG_DEFINITIONS -DDMRG_PREBO)
set(DMRG_PREBO TRUE)
endif()
endif()

##### Dependencies #####
Expand Down Expand Up @@ -229,6 +241,11 @@ endif(Boost_FOUND)
add_subdirectory(${ALPS_SOURCE_DIR})
list(APPEND DMRG_LIBRARIES alps)

# Eigen
# find_package(Eigen3 3.3 REQUIRED NO_MODULE)
# message("Eigen directory " ${EIGEN3_INCLUDE_DIR})
# list(APPEND DMRG_LIBRARIES Eigen3::Eigen)

# OpenMolcas interface
if (BUILD_OPENMOLCAS_INTERFACE)
project (MAQUIS_DMRG CXX C Fortran)
Expand All @@ -240,8 +257,8 @@ endif()
######################################################################
set(DMRG_YEAR 2021)
set(DMRG_VERSION_MAJOR 3)
set(DMRG_VERSION_MINOR 0)
set(DMRG_VERSION_PATCH 5)
set(DMRG_VERSION_MINOR 1)
set(DMRG_VERSION_PATCH 0)
set(DMRG_VERSION_BUILD "")

if(NOT DMRG_VERSION_BUILD AND EXISTS ${PROJECT_SOURCE_DIR}/.svn)
Expand Down Expand Up @@ -377,14 +394,19 @@ if(QCMAQUIS_TESTS)
add_test(NAME Test_Integral_Map COMMAND test_integral_map)
add_test(NAME Test_HiRDM COMMAND test_hirdm)
add_test(NAME Test_MPS_MPO_Ops COMMAND test_mps_mpo_ops)
add_test(NAME Test_SiteProblem COMMAND test_siteproblem)
add_test(NAME Test_MPS_Join COMMAND test_mpsjoin)
add_test(NAME Test_Wigner COMMAND test_wigner)
add_test(NAME Test_Block_Matrix COMMAND test_block_matrix)
if(BUILD_DMRG_EVOLVE)
add_test(NAME Test_Time_Evolver COMMAND test_time_evolvers)
add_test(NAME Test_Site_Shifter COMMAND test_site_shifter)
add_test(NAME Test_Time_Evolution_Sweep COMMAND test_time_evolution_sweep)
add_test(NAME Test_RealTime_Evolution COMMAND test_realtime)
add_test(NAME Test_ImaginaryTime_Evolution COMMAND test_imaginarytime)
endif(BUILD_DMRG_EVOLVE)
endif(QCMAQUIS_TESTS)




######################################################################
# DMRG exports
######################################################################
Expand Down
65 changes: 65 additions & 0 deletions dmrg/alps/src/alps/numeric/matrix/adjoint.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* ALPS Project: Algorithms and Libraries for Physics Simulations *
* *
* ALPS Libraries *
* *
* Copyright (C) 2012 by Andreas Hehn <[email protected]> *
* *
* This software is part of the ALPS libraries, published under the ALPS *
* Library License; you can use, redistribute it and/or modify it under *
* the terms of the license, either version 1 or (at your option) any later *
* version. *
* *
* You should have received a copy of the ALPS Library License along with *
* the ALPS Libraries; see the file LICENSE.txt. If not, the license is also *
* available from http://alps.comp-phys.org/. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT *
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE *
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, *
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *
* DEALINGS IN THE SOFTWARE. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef ALPS_NUMERIC_MATRIX_ADJOINT_HPP
#define ALPS_NUMERIC_MATRIX_ADJOINT_HPP

#include <alps/numeric/matrix/adjoint_view.hpp>

namespace alps {
namespace numeric {

template <typename Matrix>
inline adjoint_view<Matrix> adjoint(Matrix const& m) {
return adjoint_view<Matrix>(m);
}

template <typename Matrix>
void adjoint_inplace(Matrix& m) {
typedef typename Matrix::size_type size_type;
using std::swap;
if(num_rows(m) == num_cols(m) ) {
for(size_type i = 0; i < num_rows(m); ++i) {
m(i, i) = std::conj(m(i, i));
for(size_type j = i+1; j < num_cols(m); ++j) {
m(i, j) = std::conj(m(i, j));
m(j, i) = std::conj(m(j, i));
swap(m(i,j), m(j,i));
}
}
}
else {
// TODO replace this code by an actual inplace implementation
Matrix m2 = adjoint(m);
swap(m,m2);
}
}

} // end namespace numeric
} // end namespace alps

#endif //ALPS_NUMERIC_MATRIX_ADJOINT_HPP
Loading

0 comments on commit f6d3a3c

Please sign in to comment.