Skip to content

Improve setting explanation in the guide#2403

Merged
Ericgig merged 6 commits into
qutip:masterfrom
Ericgig:docs.settings
Jun 14, 2024
Merged

Improve setting explanation in the guide#2403
Ericgig merged 6 commits into
qutip:masterfrom
Ericgig:docs.settings

Conversation

@Ericgig

@Ericgig Ericgig commented Apr 23, 2024

Copy link
Copy Markdown
Member

Description
Completed the guide page of the settings to include missing entries as well as options included in settings.core and settings.compile. Added CoreOptions and CompileOptions to the apidoc and completed the docstrings.

I also removed settings that are no longer used anywhere.

Lastly I changed the default for accept_float compile option.

Presently, if an args is a float it cannot be updated to a complex:

>>> a = qutip.coefficient("A", args={"A": 1.})
>>> a(0, A=1j)
TypeError: must be real number, not complex

Creating a new coefficient work would be needed.

This will certainly cause an issue eventually, but updating it to complex automatically would cause some error with brmesolve spectra: (w > w0) as complex cannot be compared.

Without types, string are not any better than functions so removing them altogether is not ideal.

So I changed it to use complex when no comparison are done and float otherwise.

Related issues or PRs
fix #1524

@hodgestar hodgestar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some documentation suggestions, but otherwise looks good. Happy for this to be merged once you're happy with it and tests pass.

Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread doc/guide/guide-settings.rst Outdated
Comment thread qutip/core/coefficient.py Outdated
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 86.4% (+0.02%) from 86.385%
when pulling 490f12f on Ericgig:docs.settings
into 0aee93e on qutip:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 86.4% (+0.02%) from 86.385%
when pulling 490f12f on Ericgig:docs.settings
into 0aee93e on qutip:master.

@Ericgig Ericgig merged commit 1e279b9 into qutip:master Jun 14, 2024
@Ericgig Ericgig deleted the docs.settings branch June 14, 2024 17:17
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 this pull request may close these issues.

Document changed and new settings

3 participants