Add Qiskit CollectCliffords
pass to UCC defaults
#61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #60
Add Qiskit
CollectCliffords
pass to UCC defaults to reduce multi-qubit gate counts.Per the Qiskit transpiler API doc, the
CollectCliffords
pass collects blocks of Clifford gates and replaces them with an N-qubit unitary operator from the Clifford group. More details on Clifford objects in Qiskit can be found at: https://docs.quantum.ibm.com/api/qiskit/qiskit.quantum_info.Clifford.In this PR, the
CollectCliffords
pass is appended at the end of theadd_local_passes
method of the classUCCDefault1
. The UCC benchmarks are re-run to reflect the resulting improvements in gate counts. Theoretically, the additional pass should incur a small compile time cost, but when compared to the version of the benchmark notebook onmain
, my local version showed a slight decrease in compile time, i.e. 1.9s on main (no additional pass) vs. 1.2s locally (with pass added). The numbers are close enough that I would expect in most cases the compile time cost to be acceptable, given the gate reduction improvements on multiple benchmarks.