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

Fix extract_states preservation hermiticity. #2214

Merged
merged 3 commits into from Aug 15, 2023

Conversation

AGaliciaMartinez
Copy link
Member

@AGaliciaMartinez AGaliciaMartinez commented Aug 13, 2023

Description
Fixes issue #2199. Now extract states passes down the _isherm attribute.

I also changed rand_herm to return an object that has already set the _isherm attribute.

Related issues or PRs
fix #2199

@AGaliciaMartinez
Copy link
Member Author

@Ericgig, I think the behavior of extract is fixed with this PR. However, I am wondering what the general behavior of isherm should be. It can happen that the attribute _isherm is preserver after many operations but numerically is not. Should this be the correct behavior? I think it is but perhaps we should explicitly state this in the Qobj class?

qutip/qobj.py Outdated Show resolved Hide resolved
@AGaliciaMartinez AGaliciaMartinez marked this pull request as ready for review August 14, 2023 21:04
Co-authored-by: Eric Giguère <eric.giguere@calculquebec.ca>
@Ericgig Ericgig merged commit fdc4387 into qutip:qutip-4.7.X Aug 15, 2023
11 of 12 checks passed
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.

None yet

2 participants