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

Typos in qutip.expect()'s docstring #2331

Closed
gabbence95 opened this issue Feb 21, 2024 · 1 comment · Fixed by #2335
Closed

Typos in qutip.expect()'s docstring #2331

gabbence95 opened this issue Feb 21, 2024 · 1 comment · Fixed by #2335

Comments

@gabbence95
Copy link

gabbence95 commented Feb 21, 2024

Bug Description

Two words in the docstring contain typos. See below.

Code to Reproduce the Bug

from qutip import expect
print(expect.__doc__)

Code Output

Parameters
----------
oper : qobj/array-like
    A single or a `list` or operators for expectation value.

state : qobj/array-like
    A single or a `list` of quantum states or density matrices.

Returns
-------
expt : float/complex/array-like
    Expectation value.  ``real`` if `oper` is Hermitian, ``complex``
    otherwise. A (nested) array of expectaction values of state or operator
    are arrays.

Expected Behaviour

Parameters

oper : qobj/array-like
A single or a list or of operators for expectation value.

state : qobj/array-like
A single or a list of quantum states or density matrices.

Returns

expt : float/complex/array-like
Expectation value. real if oper is Hermitian, complex
otherwise. A (nested) array of expectaction values of if state or operator
are arrays.

Your Environment

QuTiP Version:      4.7.5
Numpy Version:      1.26.4
Scipy Version:      1.11.4
Cython Version:     None
Matplotlib Version: 3.8.3
Python Version:     3.12.2
Number of CPUs:     8
BLAS Info:          Generic
OPENMP Installed:   False
INTEL MKL Ext:      False
Platform Info:      Windows (AMD64)

Additional Context

No response

@Ericgig
Copy link
Member

Ericgig commented Feb 26, 2024

@gabbence95
Thank you for catching the error.

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 a pull request may close this issue.

2 participants