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 addresses as kwarg #31

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

garrison
Copy link
Member

Follow-up to #29 (comment).

@garrison
Copy link
Member Author

Caleb, I believe this is what you are looking for. It should be possible to write tests for both the old and new functionality using this, with various combinations of positional arguments and kwargs. One note: There is nothing in this to detect if addresses and bitstring_matrix are provided simultaneously, but a conditional could be added pretty easily to error when this happens.

@caleb-johnson caleb-johnson merged commit 02cf6c1 into solve-ferm-matrix Sep 17, 2024
2 checks passed
@caleb-johnson caleb-johnson deleted the solve-ferm-matrix-jrg branch September 17, 2024 00:34
@caleb-johnson
Copy link
Collaborator

Caleb, I believe this is what you are looking for. It should be possible to write tests for both the old and new functionality using this, with various combinations of positional arguments and kwargs. One note: There is nothing in this to detect if addresses and bitstring_matrix are provided simultaneously, but a conditional could be added pretty easily to error when this happens.

Thanks Jim, I think it's fair to prefer the non-deprecated input rather than erroring and document the behavior in the docstring. This doesn't affect anything with backward compatibility since specifying the determinants with positional + keyword arg was not possible until this change.

caleb-johnson added a commit that referenced this pull request Sep 18, 2024
#29)

* Fermionic solver functions should take the bitstring matrix as input, same as qubit solver

* Add `addresses` as kwarg (#31)

* Small tutorial fix

* Update docstring

* Remove addresses as kwarg

* Clean up docstrings

---------

Co-authored-by: Jim Garrison <[email protected]>
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