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

Scheduling based on mix frames #300

Merged
merged 13 commits into from
Mar 28, 2024
Merged

Scheduling based on mix frames #300

merged 13 commits into from
Mar 28, 2024

Conversation

reza-j
Copy link
Contributor

@reza-j reza-j commented Mar 18, 2024

This PR introduces scheduling of a quantum circuit based on mix frames in order to reduce the overall duration of the scheduled pulse sequence.

@reza-j reza-j requested a review from a team as a code owner March 18, 2024 22:57
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

lib/Dialect/Pulse/Transforms/Scheduling.cpp Show resolved Hide resolved
Copy link
Collaborator

@taalexander taalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small questions

Comment on lines 119 to 120
std::unordered_set<uint> mixFramesBlockIds =
getMixFramesBlockIds(quantumGateCallSequenceOp);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a mix frame block id?

Copy link
Contributor Author

@reza-j reza-j Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a mix frame block id?

it's the block argument number of the corresponding mix frame

this function returns an unordered set of block argument numbers of the mix frames of a quantum gate; here block refers to the current block that includes the quantum gate call sequence op; I added comment and modified the names in 21961bb; please let me know what you think

Comment on lines 182 to 184
if (mixFrameToNextAvailabilityMap.find(id) !=
mixFrameToNextAvailabilityMap.end()) {
if (mixFrameToNextAvailabilityMap[id] < nextAvailableTimeOfAllMixFrames)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this condition can be combined into a single boolean and if? (can use an intermediary value)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combined into a single boolean in 21961bb

@reza-j reza-j requested a review from taalexander March 27, 2024 02:31
kitbarton
kitbarton previously approved these changes Mar 27, 2024
Copy link
Collaborator

@kitbarton kitbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Please update the copyright dates in the files changed to include 2024 (for some reason GitHub won't allow me to add a comment to lines that are not changed).

@reza-j reza-j requested a review from kitbarton March 27, 2024 23:09
Copy link
Collaborator

@taalexander taalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@reza-j reza-j merged commit f50fc4c into openqasm:main Mar 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants