Skip to content

Commit

Permalink
Clean up some docs errors (#92)
Browse files Browse the repository at this point in the history
(cherry picked from commit c771c29)
  • Loading branch information
caleb-johnson authored and mergify[bot] committed Oct 28, 2024
1 parent b8057fa commit 5d1c39b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
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

0 comments on commit 5d1c39b

Please sign in to comment.