Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "extern/pybind11"]
path = extern/pybind11
url = https://github.com/pybind/pybind11.git
branch = stable
[submodule "extern/boost-cmake"]
path = extern/boost-cmake
url = https://github.com/Orphis/boost-cmake.git
Expand All @@ -26,3 +22,7 @@
[submodule "extern/boost"]
path = extern/boost
url = https://github.com/boostorg/boost.git
[submodule "extern/pybind11"]
path = extern/pybind11
url = ../../pybind/pybind11
branch = stable
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ set(CMAKE_BUILD_TYPE RelWithDebInfo)
set(DEFAULT_NUM_MODES 2)
set(DEFAULT_NUM_BITS 8)

set(rapidjson_DIR home/ethan/libraries/builds/rapidjson/include)
set(Eigen3_DIR /home/ethan/libraries/builds/eigen_3_install)
FIND_PACKAGE( Boost REQUIRED )
find_package(Eigen3 3.3 NO_MODULE REQUIRED)
add_subdirectory(extern/boost)
add_subdirectory(extern/eigen)

#set(rapidjson_DIR home/ethan/libraries/builds/rapidjson/include)
#set(Eigen3_DIR /home/ethan/libraries/builds/eigen_3_install)
#FIND_PACKAGE( Boost REQUIRED )
#find_package(Eigen3 3.3 NO_MODULE REQUIRED)



Expand All @@ -21,6 +24,7 @@ if(NOT DEFINED NUM_BITS)
message(STATUS "Using Default Number of bits per mode")
set(NUM_BITS ${DEFAULT_NUM_BITS})
endif()

#-------DEFINE MODULE NAME------------
set(pyket pyket${NUM_MODES}_${NUM_BITS})

Expand All @@ -42,8 +46,9 @@ pybind11_add_module(${pyket} SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/pyket_config.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/pyket_config.hpp @ONLY)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_include_directories(HamiltonianFuncs SYSTEM PUBLIC ${rapidjson_DIR}/include)
target_link_libraries (HamiltonianFuncs Eigen3::Eigen)
target_include_directories(HamiltonianFuncs SYSTEM PUBLIC extern/rapidjson/include)
target_link_libraries(HamiltonianFuncs Eigen3::Eigen)
target_link_libraries(HamiltonianFuncs Boost::format)
target_compile_options(HamiltonianFuncs PRIVATE -fPIC)
target_link_libraries(${pyket} PRIVATE HamiltonianFuncs)
find_package(OpenMP)
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# README

To build, run the following commands.

```bash
git clone https://github.com/Andersen98/adaptive_spin_evolution
cd adaptive_spin_evolution
git checkout demo
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make
```

2 changes: 1 addition & 1 deletion extern/pybind11
Submodule pybind11 updated 244 files
1 change: 1 addition & 0 deletions src/hamiltonian/hamiltonian.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class hamiltonian{
std::vector<std::pair<int, int>> get_spin_idxs()const;
pair<double,double> evolve_state(double time);
pair<double,double> evolve_step(complex<double> factor);
//std::vector<complex<double>> get_decay_diags(int delta_e); TODO: Fix this
//par_runtime.cpp
void par_test_one();
void par_test_two();
Expand Down
5 changes: 3 additions & 2 deletions src/hamiltonian/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ void hamiltonian::run_grow(){


}
void hamiltonian::get_decay_diags(int delta_e){
/* TODO FIX THIS
* vector<complex<double>> hamiltonian::get_decay_diags(int delta_e){

vector<complex<double>> decay_diags(psi_lbl.size());

Expand Down Expand Up @@ -78,7 +79,7 @@ void hamiltonian::get_decay_diags(int delta_e){

return(decay_diags);
}

*/

void hamiltonian::set_zero_except_init(){
using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion src/hamiltonian/setup.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "hamiltonian.hpp"
#include "../io_tools/input_tools.hpp"
#include <boost/numeric/ublas/io.hpp>
//#include <boost/numeric/ublas/io.hpp>

hamiltonian::hamiltonian(const std::string &json_str):hamiltonian(load_json_str(json_str)){}

Expand Down
2 changes: 1 addition & 1 deletion src/pyket_config.hpp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PYKET pyket1_8
#define PYKET pyket2_8