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

Functions for generating common quantum states #164

Merged
merged 17 commits into from
Jun 11, 2024

Conversation

ytdHuang
Copy link
Member

close #146

Summarize of this PR:

  • Introduce zero_ket
  • Introduce fock_dm
  • Introduce coherent_dm
  • Introduce thermal_dm
  • Introduce maximally_mixed_dm
  • minor changes in jmat
  • Introduce spin_state
  • Introduce spin_coherent
  • Introduce bell_state
  • Introduce singlet_state
  • Introduce triplet_states
  • Introduce w_state
  • Introduce ghz_state
  • ignore size threshold for document API page: size_threshold_ignore = ["api.md"]

@ytdHuang
Copy link
Member Author

All the code coverage update in runtests failed.

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.10%. Comparing base (39b436d) to head (e9df697).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #164      +/-   ##
==========================================
+ Coverage   92.89%   93.10%   +0.21%     
==========================================
  Files          27       28       +1     
  Lines        1956     2017      +61     
==========================================
+ Hits         1817     1878      +61     
  Misses        139      139              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ytdHuang
Copy link
Member Author

okay, everything works fine again.

β = log(1.0 / n + 1.0)
N_list = Array{Float64}(0:N-1)
data = exp.(-β .* N_list)
return QuantumObject(spdiagm(0 => data ./ sum(data)), Operator, [N])
Copy link
Member

Choose a reason for hiding this comment

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

We should also have the case of both dense and sparse case.

Copy link
Member Author

Choose a reason for hiding this comment

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

okay

src/qobj/states.jl Outdated Show resolved Hide resolved
@albertomercurio albertomercurio merged commit 98e77d2 into qutip:main Jun 11, 2024
14 checks passed
@ytdHuang ytdHuang deleted the dev/state branch June 11, 2024 15:01
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.

Functions for generating quantum states
2 participants