Commit 0da8c397 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

Update README.md

parent 4b44bef5
Pipeline #43513 passed with stages
in 2 minutes and 16 seconds
......@@ -8,25 +8,27 @@ clang++-9 -std=c++11 -Xclang -load -Xclang compiler/clang/libqcor-ast-plugin.so
A better example
```bash
clang++-9 -std=c++11 -Xclang -load -Xclang compiler/clang/libqcor-ast-plugin.so
-Xclang -add-plugin -Xclang enable-quantum
-Xclang -plugin-arg-enable-quantum -Xclang accelerator
-Xclang -plugin-arg-enable-quantum -Xclang tnqvm
-Xclang -plugin-arg-enable-quantum -Xclang local-ibm
-Xclang -plugin-arg-enable-quantum -Xclang transform
-Xclang -plugin-arg-enable-quantum -Xclang circuit-optimizer
-I /root/.xacc/include/xacc -I /root/.xacc/include/cppmicroservices4
-I /home/project/qcor/runtime -L /home/project/qcor/build/runtime
-lqcor -L /root/.xacc/lib -lxacc test.cpp -o test
```
test.cpp looks like this
```cpp
#include "qcor.hpp"
#include <stdio.h>
#include <string>
int main() {
xacc::Initialize({"--accelerator", "local-ibm"});
auto future2 = qcor::submit([&](qcor::qpu_handler &qh) {
int main(int argc, char** argv) {
xacc::Initialize(argc, argv);
auto future = qcor::submit([&](qcor::qpu_handler &qh) {
qh.execute([&]() {
H(0);
CX(0, 1);
......@@ -35,9 +37,9 @@ int main() {
});
});
auto results = future2.get();
auto results = future.get();
results->print();
printf("\n");
}
\ No newline at end of file
}
```
\ No newline at end of file
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