docs: use lowercase parameter names in channel_dim error messages#1889
Open
armorbreak001 wants to merge 2 commits into
Open
docs: use lowercase parameter names in channel_dim error messages#1889armorbreak001 wants to merge 2 commits into
armorbreak001 wants to merge 2 commits into
Conversation
User-facing ValueError messages referenced parameters by their MATLAB/QETLAB-style uppercase names (PHI, DIM) instead of the actual Python parameter names (phi, dim). This made it impossible for users to map errors to their code. Updated all 6 error messages in channel_dim.py to use lowercase phi/dim matching the function signature. Fixes vprusso#1885
Owner
|
@armorbreak001 your build is failing |
The PR changed error messages to use lowercase parameter names but this test still expected uppercase DIM.
Author
|
Thanks for the heads-up! Fixed the test expectation — it was still checking for uppercase |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 6 user-facing
ValueErrormessages inchannel_dim.pythat referenced parameters by their MATLAB/QETLAB-style uppercase names (PHI,DIM) instead of the actual Python parameter names (phi,dim).Problem
When a user hit one of these errors, they could not map
PHIorDIMto any argument they had passed, since the function signature uses lowercasephianddim.Changes
"The input and output spaces of PHI must be square.""The input and output spaces of phi must be square.""The dimensions of PHI do not match those provided in the DIM argument.""The dimensions of phi do not match those provided in the dim argument.""The Kraus operators of PHI do not all have the same size.""The Kraus operators of phi do not all have the same size.""If ... PHI is provided ... DIM must be specified ... agree with PHI""If ... phi is provided ... dim must be specified ... agree with phi"Developer-facing comments are unchanged.
Fixes #1885