Skip to content

🐛 Fix stripping of idle qubits #763

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

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Conversation

burgholzer
Copy link
Member

@burgholzer burgholzer commented Nov 27, 2024

Description

Fixes #729

This PR builds on the register handling improvements in #807 and fixes the the last remaining part of the problem observed in #729.
When dumping a circuit to QASM that has been stripped of idle qubits, the initial layout and output permutation need to be adjusted so that the resulting circuit can be read in again without problems.
The reason this PR is so small is mainly because a lot of the legwork was already done in #807.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

@burgholzer burgholzer self-assigned this Nov 27, 2024
@burgholzer burgholzer added refactor Anything related to code refactoring fix Fix for something that isn't working Core Anything related to the Core library and IR c++ Anything related to C++ code labels Nov 27, 2024
@burgholzer burgholzer force-pushed the fix-idle-qubit-stripping branch from 9b64a26 to f506140 Compare November 28, 2024 01:33
@burgholzer burgholzer force-pushed the fix-idle-qubit-stripping branch from f506140 to dca4aae Compare January 21, 2025 15:49
@burgholzer burgholzer marked this pull request as ready for review January 21, 2025 15:52
@burgholzer burgholzer enabled auto-merge January 21, 2025 15:56
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@burgholzer burgholzer merged commit ed00fb4 into main Jan 21, 2025
30 checks passed
@burgholzer burgholzer deleted the fix-idle-qubit-stripping branch January 21, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code Core Anything related to the Core library and IR fix Fix for something that isn't working refactor Anything related to code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Circuits with discontiguous qubit registers are not properly exported since v2.7.0
1 participant