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
062ed835
Commit
062ed835
authored
May 28, 2020
by
Mccaskey, Alex
Browse files
minor fixes with removal of local-ibm
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
8a203f61
Pipeline
#104151
passed with stage
in 9 minutes and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
quantum/plugins/ibm/tests/CMakeLists.txt
View file @
062ed835
...
...
@@ -15,9 +15,6 @@ 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
(
LocalIBMAccelerator
)
target_link_libraries
(
LocalIBMAcceleratorTester xacc-quantum-gate
)
add_xacc_test
(
OQASMCompiler
)
target_link_libraries
(
OQASMCompilerTester xacc-quantum-gate
)
...
...
quantum/plugins/ibm/tests/LocalIBMAcceleratorTester.cpp
deleted
100644 → 0
View file @
8a203f61
/*******************************************************************************
* Copyright (c) 2019 UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompanies this
* distribution. The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
*License is available at https://eclipse.org/org/documents/edl-v10.php
*
* Contributors:
* Alexander J. McCaskey - initial API and implementation
*******************************************************************************/
#include
<memory>
#include
<gtest/gtest.h>
#include
"xacc.hpp"
#include
"xacc_service.hpp"
#include
"CommonGates.hpp"
#include
"Circuit.hpp"
using
namespace
xacc
::
quantum
;
TEST
(
LocalIBMAcceleratorTester
,
checkSimple
)
{
xacc
::
Initialize
();
auto
acc
=
xacc
::
getAccelerator
(
"local-ibm"
,
{
std
::
make_pair
(
"shots"
,
8192
),
std
::
make_pair
(
"cx-p-depol"
,
.15
)});
auto
buffer
=
xacc
::
qalloc
(
2
);
auto
f
=
std
::
make_shared
<
Circuit
>
(
"foo"
);
auto
h
=
std
::
make_shared
<
Hadamard
>
(
0
);
auto
cn1
=
std
::
make_shared
<
CNOT
>
(
0
,
1
);
auto
m0
=
std
::
make_shared
<
Measure
>
(
0
);
auto
m1
=
std
::
make_shared
<
Measure
>
(
1
);
f
->
addInstructions
({
h
,
cn1
,
m0
,
m1
});
acc
->
execute
(
buffer
,
f
);
buffer
->
print
();
xacc
::
Finalize
();
}
int
main
(
int
argc
,
char
**
argv
)
{
::
testing
::
InitGoogleTest
(
&
argc
,
argv
);
return
RUN_ALL_TESTS
();
}
xacc/compiler/xacc_internal_compiler.hpp
View file @
062ed835
...
...
@@ -28,7 +28,7 @@ extern bool __execute;
enum
OptLevel
{
DEFAULT
,
LEVEL1
,
LEVEL2
,
LEVEL3
};
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
=
"
local-ibm
"
);
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
=
"
qpp
"
);
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
,
int
shots
);
void
setAccelerator
(
const
char
*
qpu_backend
);
...
...
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