vukics / cppqed Goto Github PK
View Code? Open in Web Editor NEWC++QED: a framework for simulating open quantum dynamics
License: Boost Software License 1.0
C++QED: a framework for simulating open quantum dynamics
License: Boost Software License 1.0
Build fine with clang:11.0.1
but against gcc:10.2.0
build fails complaining about template specialization
in Random.h
build_env:{os:Linux,distro:Arch,gcc:10.2.0,clang:11.0.1,boost:1.75.0,python:3.9.1,eigen:3.3.9,gsl:2.6:cmake:3.19.3,ninja:1.10.0}
relevent lines:
Lines 104 to 113 in 34290ae
gcc error:
FAILED: CPPQEDutils/CMakeFiles/CPPQEDutils.dir/Random.cc.o
/usr/lib/colorgcc/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -DBZ_HAVE_BOOST_SERIALIZATION -DCPPQED_HAS_GSL -DCPPQEDutils_EXPORTS -DDO_NOT_USE_FLENS -DEIGEN3_FOUND -ICPPQEDutils -I/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils -I/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/thirdPartyRandom/Xoshiro-cpp -I/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/thirdPartyRandom/pcg-cpp/include -ICPPQEDutils/thirdPartyRandom -I/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/thirdPartyRandom -Iblitz -Iblitz/blitz/.. -Iblitz/blitz -I/home/bartus/AUR/cppqed-git/src/cppqed-git/blitz/blitz -I/home/bartus/AUR/cppqed-git/src/cppqed-git/blitz/blitz/array/../.. -Iblitz/blitz/array -I/home/bartus/AUR/cppqed-git/src/cppqed-git/blitz/blitz/array -Iblitz/blitz/meta -I/home/bartus/AUR/cppqed-git/src/cppqed-git/blitz/blitz/meta -isystem /home/bartus/AUR/cppqed-git/src/cppqed-git/blitz -isystem /usr/include/eigen3 -D_FORTIFY_SOURCE=2 -march=native -mtune=native -O2 -pipe -fstack-protector-strong -fno-plt -DBOOST_BIND_GLOBAL_PLACEHOLDERS -std=c++17 -O3 -DNDEBUG -fPIC -Wall -Wextra -Wpedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wno-ignored-qualifiers -Wno-sign-compare -Wno-overloaded-virtual -Wunreachable-code -std=c++17 -MD -MT CPPQEDutils/CMakeFiles/CPPQEDutils.dir/Random.cc.o -MF CPPQEDutils/CMakeFiles/CPPQEDutils.dir/Random.cc.o.d -o CPPQEDutils/CMakeFiles/CPPQEDutils.dir/Random.cc.o -c /home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/Random.cc
In file included from /home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/Random.cc:3:
/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/Random.h:104:1: error: explicit template specialization cannot have a storage class
104 | static const std::string EngineID_v<GSL_Engine> = "GSL_Taus2";
| ^~~~~~
/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/Random.h:107:1: error: explicit template specialization cannot have a storage class
107 | static const std::string EngineID_v<std::mt19937_64> = "STD_MT19937_64";
| ^~~~~~
/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/Random.h:110:1: error: explicit template specialization cannot have a storage class
110 | static const std::string EngineID_v<pcg64> = "PCG64";
| ^~~~~~
/home/bartus/AUR/cppqed-git/src/cppqed-git/CPPQEDutils/Random.h:113:1: error: explicit template specialization cannot have a storage class
113 | static const std::string EngineID_v<XoshiroCpp::Xoshiro256PlusPlus> = "Xoshiro256pp";
| ^~~~~~`
It seems to be silently disabled at some point, since the COMPRESSION cmake directive doesn’t seem to have any effect at all. State vectors produced with this flag have the same size as those without.
This was an old issue, explore it anew.
bz2 compression can yield orders of magnitude gains for large state vectors.
CMake Warning at /usr/lib64/cmake/boost_python-1.72.0/libboost_python-variant-shared-py3.8.cmake:74 (message):
Target Boost::python already has an imported location
'/usr/lib64/libboost_python27.so.1.72.0', which will be overwritten with
'/usr/lib64/libboost_python38.so.1.72.0'
Call Stack (most recent call first):
/usr/lib64/cmake/boost_python-1.72.0/boost_python-config.cmake:57 (include)
/usr/lib64/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package)
/usr/lib64/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
/usr/share/cmake-3.17/Modules/FindBoost.cmake:444 (find_package)
CMakeLists.txt:51 (find_package)
Consider deprecating CMake in favor of more modern build (configuration) systems like Meson/Ninja
This is especially important in view of the removal of sharedPointerize in 829adb6 whereupon a lot of make_shared calls appeared in the UI.
Apparently, the identification always yields negative outcome.
Recent changes makes some examples references ambiguous.
In file included from /build/cppqed-git/src/cppqed-git/CPPQEDcore/examples/ExampleMode.cc:2:
/build/cppqed-git/src/cppqed-git/CPPQEDcore/examples/ExampleMode.h:80:11: error: no type named 'StateVectorLow' in 'structure::ElementLiouvillean<1, 2, false>'; did you mean 'StateVector'?
typedef ElementLiouvillean<1,2>::StateVectorLow StateVectorLow ;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StateVector
Mode + JaynesCummings are a bit wasteful in that if the Mode is pumped, then in interaction picture the same update with the frequencies of the ladder operators happens in the pump part as in the JC part of the Hamiltonian.
This could be alleviated if a pumped Mode (or, a ModePumpedHamiltonian class) stored the a
and adagger
operators separately (not in a bulk Tridiagonal object), and JaynesCummings just refers to those, if they exist (that is, if the Mode is pumped). This can be very elegantly achieved by storage by shared pointers.
Of course, the same problem exists for Qbit and the MultiLevel bundle.
After removing this unstandard/confusing sharedPointerize interface in 076f7d8d5b, the interface in scripts for StateVector
/DensityOperator
initial conditions became very awful. Basically all the syntactic sugar of the vector-space algebra is gone.
Solution: QuantumTrajectory
should hold a shared_ptr
to SV/DO. When initialized with a shared_ptr
, the passed shared_ptr
is simply copied into the held shared_ptr
. When initialized with a bare object, create a copy of that object (using the by-reference semantics of blitz copy) as a shared_ptr
, and initialize the held shared_ptr
to point to this copy.
Investigate how far this approach can be pursued (also for QuantumSystem
s, SubSystem
s, etc. – these are at the moment maybe not even copyable!).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.