Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Plot bloch sphere #62

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Plot bloch sphere #62

merged 2 commits into from
Nov 1, 2023

Conversation

GiggleLiu
Copy link
Member

@GiggleLiu GiggleLiu commented Oct 28, 2023

Implemented with Luxor and its "3D" extension Thebes.
For light theme version, please check the files in this PR.

Example 1:

julia> using YaoPlots, Yao

julia> darktheme!()

julia> bloch_sphere("|ψ⟩"=>[2.2, 0.3im+0.3]; show_projection_lines=true,
        show_angle_texts=true, show_line=true, show01=true)

plot_49

Example 2: please check the example folder, the file: bloch.jl

image

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/YaoPlots.jl 66.66% <ø> (+16.66%) ⬆️
src/vizcircuit.jl 81.69% <100.00%> (+1.07%) ⬆️
src/bloch.jl 98.03% <98.03%> (ø)

📢 Thoughts on this report? Let us know!.

@Roger-luo
Copy link
Member

Roger-luo commented Oct 29, 2023

the plots are not showing up in light mode I think that's something that needs to be changed by default, implementation itself looks OK to me

@GiggleLiu GiggleLiu merged commit 329e721 into master Nov 1, 2023
3 checks passed
@GiggleLiu GiggleLiu deleted the jg/bloch-sphere branch November 1, 2023 01:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants