Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: Improved handling of controlled gates in converters #391
feat: Improved handling of controlled gates in converters #391
Changes from all commits
c32e2ee
77c5d97
0eb0610
903f2e9
fdc0c4e
9fe2128
5dab332
0feb9fd
6f24ed8
5038ea5
73c9ab8
c39b82b
7e8b770
f3761d1
0aefdfc
b2b48b0
cd69dff
0ab2d48
57d55fd
a97d407
cd9cec9
62ac814
8cc30ac
700dd55
7e3dfe6
cb81a07
16453b1
5b4aeec
daa3090
b42946e
c1b315c
4473235
9dee730
05dd936
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I can get around this
type: ignore
. Mypy doesn't seem happy with the fact thatbase_op
is defined on two branches.The
_get_unitary_box
function has return typeUnitary1qBox | Unitary2qBox | Unitary3qBox
. Not sure if mypy is able to find out that these unitary boxes inherit fromOp
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I will add tests for a wider range of controlled operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conversion doesn't work properly for various parameterized gates. Will update the handling and add tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed the conversion of parametrised gates in b42946e and added some controlled parametrised gates to the test in c1b315c