Skip to content

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

Merged
merged 23 commits into from
Feb 4, 2025

Conversation

NoureldinYosri
Copy link
Contributor

@NoureldinYosri NoureldinYosri commented Jan 29, 2025

  • rename MultiplyPolyByConstantMod to GF2MultiplyByConstantMod
  • change signature to use QGF instead of an array of qubits
  • update QGF to include an optional field for the galois field

@@ -144,7 +144,7 @@
},
{
"cell_type": "markdown",
"id": "b26814e0",
"id": "94ab395f",
Copy link
Collaborator

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

@@ -899,6 +904,7 @@ class QGF(QDType):

characteristic: SymbolicInt
degree: SymbolicInt
galois_field: Optional['galois.FieldArrayMeta'] = None
Copy link
Collaborator

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.

Copy link
Collaborator

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 ?

Copy link
Contributor Author

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?

NoureldinYosri added a commit that referenced this pull request Mar 31, 2025
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}}$
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