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

Different scope product #183

Merged
merged 8 commits into from
Jan 24, 2024
Merged

Different scope product #183

merged 8 commits into from
Jan 24, 2024

Conversation

IrwinChay
Copy link
Collaborator

@IrwinChay IrwinChay commented Jan 24, 2024

UPDATE: corrected EFProductReparam
and functional.py
and is_compatible() in region_graph.py (added: do not check compatibility when a partition is included in another partition)

Tests for same scope product added
partition function for product added

TODO: fix reset_parameters, only reset the current level parameters, instead of "deep reset"
(Current version: all parameters would be re-initialized whenever product is called)

TODO: in prod_ef.py, need to support product of multiple circuits, which is just extending ef1 and ef2 into a list of efs

TODO: To actually support different scope product, we need scope renaming (urgent), e.g. circuit_1 have scope {0,1,2,3}; circuit_2 have scope {0,1,4,5};
, e.g. forward() in tensorized_circuit.py, currently it is indexing by scope (so not supporting circuit with scope {0,1,4,5})
Better to discuss the class structure since it includes modifying a couple things

TODO: add to pyproject.toml in test.py

Copy link
Member

@lkct lkct left a comment

Choose a reason for hiding this comment

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

as below

@@ -0,0 +1,35 @@
# pylint: disable=too-many-locals
Copy link
Member

Choose a reason for hiding this comment

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

maybe add to pyproject.toml? (possibly in another PR, also need to handle cache there)

cirkit/pyproject.toml

Lines 147 to 149 in 53942db

per-file-ignores = [ # TODO: wait for native support in pylint
"/tests/:missing-function-docstring,missing-return-doc",
]

Copy link
Member

@lkct lkct left a comment

Choose a reason for hiding this comment

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

Well done! Thanks!

@lkct lkct added enhancement New feature or request testing Related to (unit) testing the library labels Jan 24, 2024
@lkct lkct merged commit 924c8d2 into main Jan 24, 2024
2 checks passed
@lkct lkct deleted the circuit_product branch January 24, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing Related to (unit) testing the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants