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

Reformatting Operations #187

Merged
merged 12 commits into from
Oct 15, 2023
Merged

Reformatting Operations #187

merged 12 commits into from
Oct 15, 2023

Conversation

GenericP3rson
Copy link
Collaborator

Reformatted operations to be in separate files. Will be happy to workshop how much or little separation we want in the files—right now, it's slightly arbitrary but should be more or less consistent. Once this format is decided, I'll edit the functionals file with similar updates.

Other misc. updates from this PR:

  • CCX was duplicated, so chose the class with more information
  • Converted some eigenvalue vectors from numpy arrays to torch tensors
  • Added the U gate alias (same as the U3)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(There are no actual updates to this file; I ran the formatter on the folder which appears to have updated it.)

@GenericP3rson
Copy link
Collaborator Author

It got a bit messy with the test reformatting, but here are some major updates:

  • All operations are in the standard_gates folder (they should still be useable as before)
  • Automatic creation of the dictionary (since each class has an extra "op_name" attribute)
  • Automatic creation of the all list

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file primarily has the core of the new updates (creation of op_name_dict, specific imports, etc.)

Copy link
Collaborator

@Hanrui-Wang Hanrui-Wang left a comment

Choose a reason for hiding this comment

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

reviewed

@Hanrui-Wang Hanrui-Wang merged commit dd3fc64 into mit-han-lab:dev Oct 15, 2023
5 of 7 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.

None yet

2 participants