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

PowerTarget device #3

Merged
merged 5 commits into from
Jan 23, 2025
Merged

PowerTarget device #3

merged 5 commits into from
Jan 23, 2025

Conversation

degleris1
Copy link
Owner

@asreek6654 Take a quick peek if you can.

zap/devices/power_target.py Show resolved Hide resolved
zap/devices/power_target.py Show resolved Hide resolved
num_nodes: int
terminal: NDArray
target_power: NDArray = field(converter=make_dynamic)
norm_order: int = field(default=2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're allowing the user to set the norm order to determine the penalty function, but in the ADMM proximal update we are hard-coding the update for the L2 norm squared right? That might be an issue if someone expects that they can change this to an L1 norm or something for example

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good catch. I now restrict the norm to be either L1 or L2 and added different prox updates for each one.

Copy link
Collaborator

@asreek6654 asreek6654 left a comment

Choose a reason for hiding this comment

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

LGTM!

@degleris1 degleris1 merged commit d3d306a into main Jan 23, 2025
1 check passed
@degleris1 degleris1 deleted the power_target branch January 23, 2025 20:02
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.

2 participants