Closed khieta closed 2 years ago
adding @meamy
@khieta thanks, we'll take a look and get back to you
Hi @khieta!
For cnot re-synthesis, there was no reason other than we missed it. I just pushed an update to the main branch that includes a cnot_resynth
wrapper.
For the best way to evaluate staq's optimizations, it somewhat depends on what your primary metric is. -O3
will generally give you circuits with the fewest gates, but if depth is the primary metric you may want to forgo the cnot-resynth
pass.
simplify
and rotation-fold
will both preserve connectivity, but it makes more sense to do rotation-fold
before mapping. cnot-resynth
will not preserve connectivity, but the default steiner
routing algorithm combines cnot-resynth
with routing anyway. So, what you probably want to evaluate both optimization and routing is this:
staq --mapping-alg steiner --evaluate-all -i -s -r -s -m
If you want to evaluate the swap
router instead, you could just do a -O3
optimize before mapping.
Hope this answers your question!
Thanks for the help!
@meamy I used -O3
before the swap
router, but it did not preserve the connectivity, i.e., there were no SWAPs. Any idea?
My full command:
staq -S -O3 -m --device device.json -l bestfit -M swap -f qasm <input 10-qubit qasm file>
Hi, I'm working on an updated version of our paper on verified optimization of quantum circuits and I'd like to include Staq's results on our benchmarks. What is the best way to evaluate Staq's optimizations (without routing)? I'd like to use the Python interface if possible. I was thinking that I should emulate Staq's
-O3
option, which doessimplify
,rotfold
andcnotsynth
(per staq/main.cpp#L217), but I don't see a Python binding for thecnotsynth
pass. Is there a reason for this?Additionally, if I wanted to evaluate both optimization and routing, which of Staq's optimizations will preserve connectivity guarantees? (And do you expect the optimizations would have any effect on routed circuits?)
Thanks!