quantumlib / OpenFermion

The electronic structure package for quantum computers.
Apache License 2.0
1.51k stars 373 forks source link

Type hints hamiltonians #693

Closed subzjee closed 3 years ago

subzjee commented 3 years ago

I added type hints to the function parameters and for the function return for some files in Hamiltonians. I also noticed that the parity parameter is expected to take a value of -1 or 1. It doesn't check whether the actual value is either one of those. It will now throw a ValueError for other values.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.