Skip to content

Commit

Permalink
added args to docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
gsuarezr committed Nov 13, 2024
1 parent 0ed4ebc commit 3a4358d
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions qutip/core/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def from_correlation_function(
tMax: float = None,
T: float = None,
tag: Any = None,
args: ArrayLike = (),
args: tuple = (),
) -> BosonicEnvironment:
r"""
Constructs a bosonic environment from the provided correlation
Expand All @@ -183,7 +183,13 @@ def from_correlation_function(
Parameters
----------
C : callable or array_like
The correlation function.
The correlation function. When using a function the signature
should be
C(t, *args) -> array_like
where ``t`` is time and ``args`` is a tuple containing the
other parameters of the function.
tlist : optional, array_like
The times where the correlation function is sampled (if it is
Expand All @@ -201,6 +207,9 @@ def from_correlation_function(
tag : optional, str, tuple or any other object
An identifier (name) for this environment.
args: optional, tuple
Extra arguments to be passed to the callable C.
"""
return _BosonicEnvironment_fromCF(C, tlist, tMax, T, tag, args)

Expand All @@ -212,15 +221,20 @@ def from_power_spectrum(
wMax: float = None,
T: float = None,
tag: Any = None,
args: ArrayLike = (),
args: tuple = (),
) -> BosonicEnvironment:
"""
Constructs a bosonic environment with the provided power spectrum.
Parameters
----------
S : callable or array_like
The power spectrum.
The power spectrum. When using a function the signature should be
S(w, *args) -> array_like
where ``w`` is the frequency and ``args`` is a tuple containing the
other parameters of the function.
wlist : optional, array_like
The frequencies where the power spectrum is sampled (if it is
Expand All @@ -237,6 +251,9 @@ def from_power_spectrum(
tag : optional, str, tuple or any other object
An identifier (name) for this environment.
args: optional, tuple
Extra arguments to be passed to the callable S.
"""
return _BosonicEnvironment_fromPS(S, wlist, wMax, T, tag, args)

Expand All @@ -248,7 +265,7 @@ def from_spectral_density(
wMax: float = None,
T: float = None,
tag: Any = None,
args: ArrayLike = ()
args: tuple = ()
) -> BosonicEnvironment:
r"""
Constructs a bosonic environment with the provided spectral density.
Expand All @@ -261,7 +278,12 @@ def from_spectral_density(
Parameters
----------
J : callable or array_like
The spectral density.
The spectral density. When using a function the signature should be
J(w, *args) -> array_like
where ``w`` is the frequency and ``args`` is a tuple containing the
other parameters of the function.
wlist : optional, array_like
The frequencies where the spectral density is sampled (if it is
Expand All @@ -278,6 +300,9 @@ def from_spectral_density(
tag : optional, str, tuple or any other object
An identifier (name) for this environment.
args: optional, tuple
Extra arguments to be passed to the callable J.
"""
return _BosonicEnvironment_fromSD(J, wlist, wMax, T, tag, args)

Expand Down

0 comments on commit 3a4358d

Please sign in to comment.