-
Notifications
You must be signed in to change notification settings - Fork 27
[bug] Fix MacOS compilation and implicit conversion in to_qasm() #229
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,3 +64,4 @@ build/* | |
|
|
||
| # others | ||
| .DS_Store | ||
| .cache/ | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,5 +16,5 @@ int main() { | |||||
| // GateType::rxx3}); | ||||||
| auto graph = | ||||||
| Graph::from_qasm_file(&ctx, "../experiment/nam_rm_circs/gf2^6_mult.qasm"); | ||||||
| graph->to_qasm("test.qasm", false, false); | ||||||
| graph->to_qasm(std::string("test.qasm"), false, false); | ||||||
|
||||||
| graph->to_qasm(std::string("test.qasm"), false, false); | |
| graph->to_qasm("test.qasm", false, false); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,6 +17,6 @@ int main() { | |||||
| } | ||||||
|
|
||||||
| Graph graph(&ctx, dag); | ||||||
| graph.to_qasm("temp.qasm", /*print_result=*/true, true); | ||||||
| graph.to_qasm(std::string("temp.qasm"), /*print_result=*/true, true); | ||||||
|
||||||
| graph.to_qasm(std::string("temp.qasm"), /*print_result=*/true, true); | |
| graph.to_qasm("temp.qasm", /*print_result=*/true, true); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -83,7 +83,8 @@ int main(int argc, char **argv) { | |||||
| &union_ctx_0, eqs_h_cz, fn, /*print_message=*/ | ||||||
| true); | ||||||
| graph_after_h_cz_merge->to_qasm( | ||||||
| "circuit/voqc-benchmarks/after_h_cz_merge.qasm", false, false); | ||||||
| std::string("circuit/voqc-benchmarks/after_h_cz_merge.qasm"), false, | ||||||
|
||||||
| std::string("circuit/voqc-benchmarks/after_h_cz_merge.qasm"), false, | |
| "circuit/voqc-benchmarks/after_h_cz_merge.qasm", false, |
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.
The
std::string()wrapper is unnecessary sinceto_qasmacceptsconst std::string&which allows implicit conversion from string literals. This is inconsistent with similar calls in other test files. Consider using the literal directly:best_graph->to_qasm("test.qasm", false, false);