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

Clean up some errors in API docs #92

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions qiskit_addon_sqd/counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ def counts_to_arrays(counts: dict[str, float | int]) -> tuple[np.ndarray, np.nda
counts: The counts dictionary to convert

Returns:
A tuple containing:
- A 2D array representing the sampled bitstrings. Each row represents a
bitstring, and each element is a ``bool`` representation of the
bit's value
- A 1D array containing the probability with which each bitstring was sampled
- A 2D array representing the sampled bitstrings. Each row represents a
bitstring, and each element is a ``bool`` representation of the
bit's value
- A 1D array containing the probability with which each bitstring was sampled

"""
if not counts:
Expand Down
16 changes: 7 additions & 9 deletions qiskit_addon_sqd/fermion.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ def solve_fermion(
verbose: A verbosity level between 0 and 10

Returns:
A tuple containing:
- Minimum energy from SCI calculation
- SCI coefficients
- Average orbital occupancy
- Expectation value of spin-squared
- Minimum energy from SCI calculation
- SCI coefficients
- Average orbital occupancy
- Expectation value of spin-squared

"""
if isinstance(bitstring_matrix, tuple):
Expand Down Expand Up @@ -168,10 +167,9 @@ def optimize_orbitals(
learning_rate: The learning rate to use during gradient descent

Returns:
A tuple containing:
- The groundstate energy found during the last optimization iteration
- An optimized 1D array defining the orbital transform
- Average orbital occupancy
- The groundstate energy found during the last optimization iteration
- An optimized 1D array defining the orbital transform
- Average orbital occupancy

"""
if isinstance(bitstring_matrix, tuple):
Expand Down