Commit 062ed835 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

minor fixes with removal of local-ibm


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 8a203f61
Pipeline #104151 passed with stage
in 9 minutes and 43 seconds
...@@ -15,9 +15,6 @@ include_directories(${CMAKE_SOURCE_DIR}/quantum/plugins/ibm/compiler) ...@@ -15,9 +15,6 @@ include_directories(${CMAKE_SOURCE_DIR}/quantum/plugins/ibm/compiler)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/utils) include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/utils)
include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR})
add_xacc_test(LocalIBMAccelerator)
target_link_libraries(LocalIBMAcceleratorTester xacc-quantum-gate)
add_xacc_test(OQASMCompiler) add_xacc_test(OQASMCompiler)
target_link_libraries(OQASMCompilerTester xacc-quantum-gate) target_link_libraries(OQASMCompilerTester xacc-quantum-gate)
......
/*******************************************************************************
* 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();
}
...@@ -28,7 +28,7 @@ extern bool __execute; ...@@ -28,7 +28,7 @@ extern bool __execute;
enum OptLevel { DEFAULT, LEVEL1, LEVEL2, LEVEL3 }; 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 compiler_InitializeXACC(const char *qpu_backend, int shots);
void setAccelerator(const char *qpu_backend); void setAccelerator(const char *qpu_backend);
......
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