-
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
Parser failed #210
Comments
Hi, sorry for the confusion. There are two issues here:
You can also try running |
Thanks for your reply.
If I want to optimize the circuits in the |
Please use |
I notice the number of generated transformation rules and ECCs are not aligned with the number shown in the paper.
I get 86 transformation rules for Nam_3_3 setting, but the paper says the number is 196. Is it because the data in the paper is outdated, or is there an issue with my configuration? |
There are more prunings (in addition to the common subcircuit pruning in the paper) in Quartz now. The ECC set should still be complete but smaller (or the same size) for all configurations compared to the paper. See also https://github.com/quantum-compiler/quartz/blob/master/src/quartz/dataset/equivalence_set.h if you're interested in the prunings used in Quartz now. |
When I generate transformation for Nam_3_6 setting, the program outputs log like the followings. I wonder if it means something is wrong.
And I use the old version of Quartz to generate transformation with Nam_3_6, and optimize adder_8.qasm in Nam benchmark with it. The optimization result with 1-hour execution is 892. Is it reasonable, or does it mean something is wrong like that the preprocess is not turned on? BTW, if I want to regenerate gate count results for Rigetti set in Table.4 of Quartz, what should I do? The only Rigetti-related benchmark in |
Could you please confirm your Quartz and Z3 versions? And are you using the repo https://github.com/quantum-compiler/quartz-artifact if you want to use the old version?
I think something is wrong. adder_8 has 900 gates, and preprocessing alone brings it down to 732. Note that
Quartz focuses on the compilation/transpilation process of circuits. The "Orig." numbers are the gate count if we transpile the Toffoli gates (ccz) to the Rigetti gate set naively. In other words, the gate count equals the number of Toffoli gates times 13 plus the number of non-Toffoli gates. We use the circuits in the folder |
Current Quartz version is a59332d and z3-solver version is 4.14.1.
|
I encounter the same issue now:
I might be able to take a deeper look in one or two weeks. Meanwhile, you can try to use the old version of ECC sets in the artifact (https://zenodo.org/records/6508992) (with the artifact repo https://github.com/quantum-compiler/quartz-artifact). Or you can also use the ECC set generated now -- these |
Hi. I used $ ./test_nam ../circuit/nam-benchmarks/adder_8.qasm --output result.qasm
Number of xfers: 293
greedy_optimize(): Number of xfers that reduce cost: 55
greedy_optimize(): cost optimized from 732 to 644
... The original gate count of What confused me is that the paper says the gate count after preprocessing is 732 instead of 644 or less. Is there something wrong in my understanding, or is the preprocessing procedure updated? |
The preprocessing is just
The gate count after preprocessing is indeed 732, as shown in the line |
Thanks for your reply. I don't quite understand this part.
Since the final optimization result shown in Quartz paper is 724 but the one in Quarl paper is 624, does this mean that this greedy strategy is newly implemented? It seems the greedy part is not a search-based phase but still a rule-based phase. If it doesn't involve your future work, could you briefly explain the mechanism of greedy phase? |
Oh right, it was relatively "newly" implemented if you compare the current repo with the Quartz paper. In Quartz's paper's search, we conduct a search and only accept the transformations that almost always either keep the gate count the same or reduce the gate count in the evaluation, while keeping other choices in the queue to search. This is an optimization that accepts all transformations that reduce the gate count, without keeping the option to not accept them, so as to not blow up the search queue size exponentially at the beginning. For example, if a circuit contains 1 qubit with 100 Hadamard gates, Quartz's paper would try to search for the cancellation of each adjacent pair of Hadamard gates, while this optimization will simply cancel all gates without searching. |
Hi. I want to evaluate the compilation of Quartz. I generate the
test_nam
file and execute it.The
adder_8.qasm
is a program with 900 quantum gates. Thetest_nam
program output the error as follows. I'd like to know what to do to correctly execute the compilation process. Thanks.The text was updated successfully, but these errors were encountered: