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

Add label to input layers and more efficient circuit construction #347

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

n28div
Copy link
Collaborator

@n28div n28div commented Feb 20, 2025

This PR adds a fixed parameter to each input layer that acts as a label. Label can be a user specified object, it just needs to implement the __str__ method.
It is useful in logic circuits to assign to each variable the logic literal it refers to, but it can also be useful in other contexts to have a higher degree of interpretability of the circuit.

Labels have only been in the plotting function and in the construction of logic circuits, but it is relatively straightforward to do the same on other templates.

It also implements some enhancements to circuit construction, mainly caching pre-processing operations.

@n28div n28div changed the title Add label to input layers Add label to input layers and more efficient circuit construction Feb 20, 2025
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.

1 participant