I've implemented different methods for integrating Reverse traversal (RT) [1] into the simulated annealing (SA) for optimizing CNOT count with an iteratively improved qubit placement.
reverse_traversal: Runs RT for a given number of iterations followed by a run of SA
reverse_traversal_anneal: Runs SA for every iteration of RT
iter_anneal: Runs SA for a given number of iterations, resetting the circuit every time. To be used as a baseline versus reverse_traversal_anneal.
[1] Li, G., Ding, Y., & Xie, Y. (2019, April). Tackling the qubit mapping problem for NISQ-era quantum devices. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (pp. 1001-1014). DOI
CX synthesis permutations were wrong when parities_as_columns = False. This was not noticeable when checking only the parity matrix since you can permute the matrix as needed, but then the CNOTs are no longer allowed. Fixed by synthesizing from the transpose, which is equivalent to parities_as_columns = True. Added unitary equivalence check to avoid similar problems in the future.
Phase polynomial synthesis was therefore wrong when reallocation=True. Added unitary equivalence check to avoid similar problems in the future
Same issues were persisting in the new reverse traversal implementations. Same fix.
I've implemented different methods for integrating Reverse traversal (RT) [1] into the simulated annealing (SA) for optimizing CNOT count with an iteratively improved qubit placement.
[1] Li, G., Ding, Y., & Xie, Y. (2019, April). Tackling the qubit mapping problem for NISQ-era quantum devices. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (pp. 1001-1014). DOI