-
Notifications
You must be signed in to change notification settings - Fork 32
Improve Bloch alignment with qutip
#489
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
Conversation
| :solid | ||
| end | ||
| lines!(lscene, x, y, z; color = color, linewidth = 1.0, linestyle = linestyle) | ||
| lines!(lscene, x, y, z; color = color, linestyle = linestyle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove the linewidth here so that Makie can automatically decide for us.
| zs = raw_z | ||
| c = isa(colors, Vector) ? colors[1] : colors | ||
| lines!(lscene, xs, ys, zs; color = c, linewidth = 2.0, transparency = alpha < 1.0, alpha = alpha) | ||
| lines!(lscene, raw_x, raw_y, raw_z; color = c, transparency = alpha < 1.0, alpha = alpha) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove the linewidth here so that Makie can automatically decide for us.
| t_range = range(0, θ, length = 100) | ||
| arc_points = [Point3f((v1 * cos(t) + cross(n, v1) * sin(t))) for t in t_range] | ||
| lines!(lscene, arc_points; color = RGBAf(0.8, 0.4, 0.1, 0.9), linewidth = 2.0, linestyle = :solid) | ||
| lines!(lscene, arc_points; color = "blue", linestyle = :solid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the default color of arcs to blue (align with qutip).
Also, I remove the linewidth here so that Makie can automatically decide for us.
| font_color::String = "black" | ||
| font_size::Int = 20 | ||
| frame_alpha::Float64 = 0.1 | ||
| frame_alpha::Float64 = 0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increase the frame_alpha to 0.2 (align with qutip)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #489 +/- ##
==========================================
+ Coverage 94.06% 94.22% +0.16%
==========================================
Files 50 50
Lines 3418 3412 -6
==========================================
Hits 3215 3215
+ Misses 203 197 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Checklist
Thank you for contributing to
QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.make test.juliaformatted by running:make format.docs/folder) related to code changes were updated and able to build locally by running:make docs.CHANGELOG.mdshould be updated (regarding to the code changes) and built by running:make changelog.Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.
Description
As title, this PR makes the functionality
Blochsphere align more with qutip:frame_alphadefault to0.2frame_width::Float64 = 1.0toBlochAlso with a few bug fix and improve the docstrings.