Skip to content

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Feb 28, 2025

This adds and refactors some functionality to improve the coverage of dealing with mixed scalartypes.
In particular, I've added implementations for Base.complex for cases when one wishes to go from <:Real to <:Complex entries.
This is particularly useful for example in the case of a Real groundstate, where time evolution methods would result in complex states, which currently errors.

Fixes #258

@codecov
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 72.00000% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/operators/mpohamiltonian.jl 61.11% 14 Missing ⚠️
src/states/finitemps.jl 25.00% 6 Missing ⚠️
src/states/windowmps.jl 40.00% 3 Missing ⚠️
src/operators/abstractmpo.jl 66.66% 2 Missing ⚠️
src/operators/lazysum.jl 0.00% 1 Missing ⚠️
src/operators/mpo.jl 97.36% 1 Missing ⚠️
src/states/infinitemps.jl 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/MPSKit.jl 100.00% <ø> (ø)
src/algorithms/timestep/tdvp.jl 90.14% <100.00%> (+0.14%) ⬆️
src/operators/lazysum.jl 72.00% <0.00%> (-3.00%) ⬇️
src/operators/mpo.jl 90.00% <97.36%> (-0.29%) ⬇️
src/states/infinitemps.jl 64.82% <66.66%> (+0.03%) ⬆️
src/operators/abstractmpo.jl 57.21% <66.66%> (+1.28%) ⬆️
src/states/windowmps.jl 71.60% <40.00%> (-2.08%) ⬇️
src/states/finitemps.jl 77.97% <25.00%> (-1.53%) ⬇️
src/operators/mpohamiltonian.jl 83.60% <61.11%> (-5.36%) ⬇️

... and 6 files with indirect coverage changes

@lkdvos lkdvos merged commit 941b747 into master Mar 3, 2025
27 of 28 checks passed
@lkdvos lkdvos deleted the promotion branch March 3, 2025 13:43
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.

How to promote the scalartype for a FiniteMPS?

2 participants