Conversation
…nto pengyu/wrapper
…nto pengyu/wrapper
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") |
There was a problem hiding this comment.
Please remove these two lines because we want to set -O0 on debug mode (see lines 82-95).
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") | |
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") |
If you need to set -O3 also in CMAKE_C_FLAGS, you can modify these lines.
| #include <assert.h> | ||
|
|
||
| namespace quartz { | ||
| class B2Gate : public Gate { |
There was a problem hiding this comment.
| class B2Gate : public Gate { | |
| /** | |
| * A barrier to block 2 qubits and prevent optimizations across it. | |
| */ | |
| class B2Gate : public Gate { |
| // while (p >= 2 * PI) { | ||
| // p -= 2 * PI; | ||
| // } |
There was a problem hiding this comment.
I just merged #177 into the master branch and please rebase this PR onto it. I think it's better to split out the logic changes to existing code if possible.
| #include <vector> | ||
| using namespace quartz; | ||
|
|
||
| class SuperContext { |
There was a problem hiding this comment.
Add some comment -- what is a supercontext?
| #include "oracle.h" | ||
|
|
||
| using namespace quartz; | ||
| std::shared_ptr<SuperContext> get_context_(const std::string gate_set, |
There was a problem hiding this comment.
If it returns a SuperContext, it's better for the function name to include "super".
| std::string new_circ = | ||
| optimize_(my_circ, cost, timeout_type, timeout_value, supercontext); | ||
| std::cout << new_circ << std::endl; | ||
| } No newline at end of file |
There was a problem hiding this comment.
I would put all test files in the src/test folder. But feel free to leave it as is for now if the wrapper is an individual component.
* A version that works for OAC on Windows * Restore shared lib
Add rpc wrapper for quartz