Skip to content
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

✨ Pre- and Post-Mapping Optimizations #56

Merged
merged 10 commits into from
May 8, 2022
Merged

Conversation

burgholzer
Copy link
Member

@burgholzer burgholzer commented May 6, 2022

This PR adds the facilities to conduct pre- and post-mapping optimizations in QMAP.
At the moment, this merely contains a simple post-mapping optimization that tries to cancel adjacent CNOT gates.

Futhermore, this PR adopts the clone() functionality provided by the QFR library to clone the circuit upon importing it in the respective mapper in order to avoid side effects of the circuit optimizations conducted inside the mapper.

Finally, this PR slightly changes how gate counts for the resulting circuit are reported. Instead of separately listing the number of single-qubit gates, CNOTs, and SWAPs for the resulting circuit, the results now just list the number of resulting single-qubit and CNOT gates. The number of SWAPs, direction reverses, or teleportations directly resulting from the mapping is now listed in the stats part of the mapping result.

burgholzer added 9 commits May 6, 2022 12:58
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
# Conflicts:
#	src/heuristic/HeuristicMapper.cpp
@burgholzer burgholzer added the feature New feature or request label May 6, 2022
@burgholzer burgholzer self-assigned this May 6, 2022
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #56 (b9d4898) into main (50c3765) will increase coverage by 0.1%.
The diff coverage is 96.2%.

@@           Coverage Diff           @@
##            main     #56     +/-   ##
=======================================
+ Coverage   89.6%   89.8%   +0.1%     
=======================================
  Files         22      22             
  Lines       1677    1698     +21     
=======================================
+ Hits        1504    1525     +21     
  Misses       173     173             
Impacted Files Coverage Δ
include/configuration/Configuration.hpp 0.0% <ø> (ø)
src/Mapper.cpp 93.0% <91.8%> (-1.0%) ⬇️
include/Mapper.hpp 58.0% <100.0%> (+6.3%) ⬆️
include/MappingResults.hpp 63.3% <100.0%> (ø)
src/exact/ExactMapper.cpp 97.9% <100.0%> (ø)
src/heuristic/HeuristicMapper.cpp 93.8% <100.0%> (-0.2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50c3765...b9d4898. Read the comment docs.

@burgholzer burgholzer merged commit a5e6f88 into main May 8, 2022
@burgholzer burgholzer deleted the pre_and_post_optimization branch May 8, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant