Closed sethrj closed 4 months ago
@danclaudino Is this feasible to do without much effort? I could help with the cmake necessary to inject a compile-time constant that would let you #ifdef XACC_MINIMAL
to disable inactive code regions...
@sethrj I'll work on it today. This should be straightforward, but will let you know if I need help. Also for @wongey, if there's anything other than Aer that should be part of this minimal build, let me know.
Awesome! Thanks a bunch @danclaudino .
@danclaudino I would say keeping at least one vendor plugin in the build would be helpful for qir-ee testing purposes. I am currently testing with Honeywell and IonQ (but I think Honeywell would be a better choice if we only want to pick one). Adding another simulator like qpp might also be useful to compare results with aer (but if that is too much, I can use Honeywell's emulator instead).
Would you guys be able to test the minimal build with this https://github.com/danclaudino/xacc/tree/qiree_build before I merge it? Be sure to cmake
with -DQIREE_MINIMAL_BUILD=ON
.
@danclaudino It builds! 🎉 All that's needed to fix is removing an invalid header (perhaps a rogue insertion from include-what-you-use):
diff --git a/quantum/observable/pauli/PauliOperator.cpp b/quantum/observable/pauli/PauliOperator.cpp
index 198f1d2a..771a591c 100644
--- a/quantum/observable/pauli/PauliOperator.cpp
+++ b/quantum/observable/pauli/PauliOperator.cpp
@@ -13,7 +13,6 @@
#include "PauliOperator.hpp"
#include "CompositeInstruction.hpp"
#include "IRProvider.hpp"
-#include <bits/c++config.h>
#include <cassert>
#include <cmath>
#include <memory>
@seth That crept in a recent commit. Thanks for catching it. I went ahead and removed some other redundant/unnecessary includes from PauliOperator.cpp
.
@danclaudino We are good to go here! Build was much quicker and smooth (minus usual warnings, which I happily mute). The aer
hiccup still persists if I use the parallel build option, but this is now expected and only happens once at the beginning.
I tested this with my current 'working' version of qiree
and all simulators and vendor plugins work perfectly. Question: do we really need to try to search for qrack in this build? It is never found but everything still works fine. Maybe we can leave that out too?
Closing this issue as it has been addressed by #22.
There are a number of 5+ year old dependencies from numerous projects built into XACC. Many of these fail to compile on modern Clang compilers due to use of deleted C++ functions.
There would be two big advantages to adding a CMake switch that disables everything except, for example, the Aer simulator:
cc @wongey