unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
363 stars 163 forks source link

Add docstrings to Observable class #2324

Open jordandsullivan opened 6 months ago

jordandsullivan commented 6 months ago

Issue Description

The Observable class lacks docstrings for most of its methods. While some might be considered self-explanatory (depending on a person's background), many are not, such as Observable.partition(). Even short @property functions could still benefit from having fully written out explanations of what the property is.

Proposed Solution

Add descriptive docstrings for each method.

natestemen commented 3 days ago

To close this issue we should document the following methods.

  1. measure_in
  2. The arguments of matrix should be flushed out using the Args: ... pattern.
  3. expectation
  4. partition
  5. from_pauli_string_collections

Documenting these will also ensure they show up in the API-doc!