-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pengyu/wrapper #178
base: master
Are you sure you want to change the base?
Pengyu/wrapper #178
Conversation
…nto pengyu/wrapper
…nto pengyu/wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Add rpc wrapper for quartz