Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
1da60b21
Commit
1da60b21
authored
Jul 12, 2019
by
Mccaskey, Alex
Browse files
Removing linking to service plugins in tests to avoid double free errors
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
9cb8998b
Pipeline
#63012
passed with stages
in 10 minutes and 39 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/compiler/tests/CMakeLists.txt
View file @
1da60b21
add_xacc_test
(
PyXACCCompiler
)
target_link_libraries
(
PyXACCCompilerTester CppMicroServices
xacc-py-compiler
)
target_link_libraries
(
PyXACCCompilerTester CppMicroServices
)
python/compiler/tests/PyXACCCompilerTester.cpp
View file @
1da60b21
...
...
@@ -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
{
...
...
quantum/plugins/dwave/tests/CMakeLists.txt
View file @
1da60b21
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
)
quantum/plugins/dwave/tests/DWQMICompilerTester.cpp
View file @
1da60b21
...
...
@@ -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
;
...
...
quantum/plugins/ibm/compiler/OQASM2.g4
View file @
1da60b21
...
...
@@ -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;
...
...
quantum/plugins/ibm/tests/CMakeLists.txt
View file @
1da60b21
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
quantum/plugins/ibm/tests/OQASMCompilerTester.cpp
View file @
1da60b21
...
...
@@ -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
();
}
quantum/plugins/rigetti/tests/CMakeLists.txt
View file @
1da60b21
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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment