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

upgrade to qoqo 1.10 + fix issue with VariableMSXX gate conversion to… #13

Merged
merged 5 commits into from
Mar 18, 2024

Conversation

gsilviHQS
Copy link
Contributor

VariableMSXX is not part of myqml gates set; so initially the idea was to extract, for every occurence of this gate in the qoqo circuit, its associated unitary matrix and use this to define a gate in myqml.
I.e. it would be handle by the case of generic TwoQubitGateOperation.
But it seems this way does not work, and myqml instead decide to collect all instance and define them as a single gate (meaning all VariableMSXX have the same unitary matrix). This is wrong of course, since is a parametric gate.

In order to fix that I declare this gate as paramatetric defing the function to get the matrix given the theta.
Tests with quantum program seems to show that the issue is fixed.

@gsilviHQS gsilviHQS requested a review from kbarkhqs March 18, 2024 11:18
@gsilviHQS gsilviHQS self-assigned this Mar 18, 2024
Copy link
Contributor

@kbarkhqs kbarkhqs left a comment

Choose a reason for hiding this comment

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

Overall it looks good, but I would suggest adding a test that runs the circuit (not just translates it) containing the problematic VariableMSXX gate (two instances, with different theta values).

@gsilviHQS gsilviHQS merged commit 92d60a0 into HQSquantumsimulations:main Mar 18, 2024
1 check 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.

2 participants