Skip to content

Add support for FermionicEnvironment in Bloch RedFieldTensor.#2628

Merged
Ericgig merged 13 commits into
qutip:masterfrom
Ericgig:feature.brcrossterm
Feb 16, 2025
Merged

Add support for FermionicEnvironment in Bloch RedFieldTensor.#2628
Ericgig merged 13 commits into
qutip:masterfrom
Ericgig:feature.brcrossterm

Conversation

@Ericgig

@Ericgig Ericgig commented Feb 7, 2025

Copy link
Copy Markdown
Member

Description

  • Add support for FermionicEnvironment in Bloch brmesolve, BRSolver and bloch_redfield_tensor.
  • Any environment are valid spectra for the above function.
  • Add a new function: brcrossterm, compute cross term in equation (6) of our guide.
  • Improve documentation for the br_dtype parameter in bloch_redfield_tensor.
  • Fix the equations in the documentation.

An example of fermion environment in the guide could be good.

@Ericgig Ericgig force-pushed the feature.brcrossterm branch from 5e2e9bd to 8e09fe5 Compare February 13, 2025 03:40
@Ericgig Ericgig marked this pull request as ready for review February 13, 2025 03:40
@Ericgig Ericgig force-pushed the feature.brcrossterm branch from 8e09fe5 to 4ca6a22 Compare February 13, 2025 04:01

@pmenczel pmenczel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Only a few comments:

  • The docstrings in qutip.core.blochredfield don't mention where environment objects are accepted.
  • Actually, the functions in qutip.core.blochredfield are not in the API documentation. Is that intentional?
  • You write "An example of fermion environment in the guide could be good." Additionally, it would be good to update the bosonic examples there to show how BosonicEnvironment objects can be used.

I am not sure whether these points are within the scope of this PR. Other than this, looks great to me, but waiting for @nwlambert tests before approving

Edit: by the way, this would complete points 1 and 2 of issue #2580

Comment on lines +20 to +23
SpectrumType = Union[
Coefficient, str, CoeffProtocol,
BosonicEnvironment, FermionicEnvironment
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be added to the autodoc_type_aliases in doc/conf.py?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added the function to the apidoc and added environment in the spectra docstring.

Not sure about having this as an alias.
It's its only use. ( the spectra in floquet is not the same.)

@coveralls

coveralls commented Feb 13, 2025

Copy link
Copy Markdown

Coverage Status

coverage: 87.715%. first build
when pulling 2ac84e1 on Ericgig:feature.brcrossterm
into 1ede998 on qutip:master.

@Ericgig Ericgig force-pushed the feature.brcrossterm branch from 6b3c7bd to edc7e6c Compare February 14, 2025 05:30
@Ericgig Ericgig force-pushed the feature.brcrossterm branch from edc7e6c to e817f38 Compare February 14, 2025 05:31

@nwlambert nwlambert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

works great on all examples I tried, thanks eric!

Comment thread qutip/core/_brtensor.pyx Outdated
@Ericgig Ericgig merged commit 243598c into qutip:master Feb 16, 2025
@Ericgig Ericgig deleted the feature.brcrossterm branch February 17, 2025 00:00
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.

4 participants