-
Notifications
You must be signed in to change notification settings - Fork 60
Update gf2.MultiplyPolyByConstantMod to support QGF dtype #1533
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
Update gf2.MultiplyPolyByConstantMod to support QGF dtype #1533
Conversation
…ualtran into gf2_polynomials
@@ -144,7 +144,7 @@ | |||
}, | |||
{ | |||
"cell_type": "markdown", | |||
"id": "b26814e0", | |||
"id": "94ab395f", |
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.
why do these always get overwritten? they should generally be maintained. The autogenerate-bloqs-notebooks script should maintain these
qualtran/_infra/data_types.py
Outdated
@@ -899,6 +904,7 @@ class QGF(QDType): | |||
|
|||
characteristic: SymbolicInt | |||
degree: SymbolicInt | |||
galois_field: Optional['galois.FieldArrayMeta'] = None |
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.
This type is not hashable, as discussed offline please consider updating the class attributes so you only store hashable types and construct the corresponding galois field object by passing in the values to the constructor.
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.
@NoureldinYosri Can you please confirm if this was addressed ?
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.
QGF was made hashable ... MultiplyPolyByConstantMod is hashable because I overload its hash method ... or do you want to do the same for MultiplyPolyByConstantMod?
This is the final PR in the series #1554, #1533, and #1516. These PRs implemented the GF($2^n$) multiplication construction from https://arxiv.org/abs/1910.02849v2 which has a toffoli complexity of $n^{\log_2{3}}$
MultiplyPolyByConstantMod
toGF2MultiplyByConstantMod
QGF
instead of an array of qubitsQGF
to include an optional field for the galois field