Commit 1da60b21 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

Removing linking to service plugins in tests to avoid double free errors


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 9cb8998b
Pipeline #63012 passed with stages
in 10 minutes and 39 seconds
add_xacc_test(PyXACCCompiler)
target_link_libraries(PyXACCCompilerTester CppMicroServices xacc-py-compiler)
target_link_libraries(PyXACCCompilerTester CppMicroServices)
......@@ -29,12 +29,10 @@
*
**********************************************************************************/
#include <gtest/gtest.h>
#include "PyXACCCompiler.hpp"
#include "XACC.hpp"
#include "IRGenerator.hpp"
#include "xacc_service.hpp"
using namespace xacc::quantum;
using namespace xacc;
class FakePyAcc : public xacc::Accelerator {
......
add_xacc_test(DWAccelerator)
target_link_libraries(DWAcceleratorTester xacc-dwave)
##add_xacc_test(DWAccelerator)
#target_link_libraries(DWAcceleratorTester xacc-dwave)
include_directories(${CMAKE_SOURCE_DIR}/quantum/plugins/dwave/accelerator)
add_xacc_test(DWQMICompiler)
target_link_libraries(DWQMICompilerTester xacc-dwave)
target_link_libraries(DWQMICompilerTester xacc xacc-quantum-aqc CppMicroServices)
add_xacc_test(AnnealScheduleGenerator)
target_link_libraries(AnnealScheduleGeneratorTester xacc-dwave)
target_link_libraries(AnnealScheduleGeneratorTester xacc-quantum-aqc)
......@@ -29,9 +29,11 @@
*
**********************************************************************************/
#include "AcceleratorBuffer.hpp"
#include "DWQMICompiler.hpp"
#include "DefaultParameterSetter.hpp"
#include "XACC.hpp"
#include "xacc_service.hpp"
#include "EmbeddingAlgorithm.hpp"
#include <gtest/gtest.h>
using namespace xacc;
......
......@@ -143,7 +143,7 @@ action : qop;
explist : exp(',' exp) *;
/* An expression */
exp : real | INT | 'pi' | id | exp '+' exp | exp '-' exp | exp '*' exp |
exp : SCIENTIFIC_NOTATION | real | INT | 'pi' | id | exp '+' exp | exp '-' exp | exp '*' exp |
exp '/' exp | '-' exp | exp '^' exp | '(' exp ')' | unaryop '(' exp ')';
/* unary operations */
......@@ -173,6 +173,10 @@ id : ID;
/* real numbers */
real : REAL;
SCIENTIFIC_NUMBER
: NUMBER (E SIGN? UNSIGNED_INTEGER)?
;
/* strings are enclosed in quotes */
string : STRING;
......
include_directories(${CMAKE_SOURCE_DIR}/quantum/plugins/ibm/accelerator)
include_directories(${CMAKE_SOURCE_DIR}/quantum/plugins/ibm/compiler)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/utils)
include_directories(${CMAKE_BINARY_DIR})
add_xacc_test(OQASMCompiler)
target_link_libraries(OQASMCompilerTester xacc-ibm)
target_link_libraries(OQASMCompilerTester xacc-quantum-gate CppMicroServices)
add_xacc_test(QObjectCompiler)
target_link_libraries(QObjectCompilerTester xacc-ibm)
target_link_libraries(QObjectCompilerTester CppMicroServices)
#add_xacc_test(IBMAccelerator)
#target_link_libraries(IBMAcceleratorTester xacc-ibm)
\ No newline at end of file
......@@ -39,7 +39,6 @@ using namespace xacc;
using namespace xacc::quantum;
TEST(OQasmCompilerTester, checkCompileOQASM) {
xacc::Initialize();
const std::string src("__qpu__ nonsense(AcceleratorBuffer qregister, double n) {\n"
" // nonsense\n"
......@@ -100,10 +99,12 @@ TEST(OQasmCompilerTester, checkCompileOQASM) {
EXPECT_TRUE(rxVisitor->countGates() == 1);
EXPECT_TRUE(measureVisitor->countGates() == 3);
xacc::Finalize();
// xacc::Finalize();
}
int main(int argc, char** argv) {
xacc::Initialize();
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
include_directories(${CMAKE_SOURCE_DIR}/quantum/plugins/rigetti/accelerator)
add_xacc_test(QVMAccelerator)
target_link_libraries(QVMAcceleratorTester xacc-rigetti)
target_link_libraries(QVMAcceleratorTester xacc-quantum-gate CppMicroServices)
add_xacc_test(QuilCompiler)
target_link_libraries(QuilCompilerTester xacc-rigetti)
target_link_libraries(QuilCompilerTester xacc-quantum-gate CppMicroServices)
add_xacc_test(QuilVisitor)
target_link_libraries(QuilVisitorTester xacc-rigetti)
target_link_libraries(QuilVisitorTester xacc-quantum-gate)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment