Skip to content

Commit

Permalink
Merge pull request #15 from 12rambau/viz
Browse files Browse the repository at this point in the history
fix: avoid superposition of bloch sphere in the tree
  • Loading branch information
alice4space authored Jan 23, 2023
2 parents a370bbf + 84d6614 commit 64d71fe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Binary file modified docs/source/_static/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions docs/source/examples/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
"# Usage examples "
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "69100b47",
"metadata": {},
"source": [
"[![github](https://img.shields.io/badge/-see%20sources-white?logo=github&labelColor=555)](https://github.com/alice4space/qutree/blob/main/docs/source/examples/demo.ipynb)\n",
"[![colab](https://img.shields.io/badge/-open%20in%20colab-blue?logo=googlecolab&labelColor=555)](https://colab.research.google.com/github/alice4space/qutree/blob/main/docs/source/examples/demo.ipynb)\n",
"[![colab](https://img.shields.io/badge/-open%20in%20mybinder-orange?logo=jupyter&labelColor=555)](https://mybinder.org/v2/gh/alice4space/qutree/main?labpath=docs%2Fsource%2Fexamples%2Fdemo.ipynb)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -19,18 +30,7 @@
"source": [
"# this cell is hidden in the docs\n",
"# it installs the requirements to run this demo\n",
"!python -m pip install qutree[demo]"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "69100b47",
"metadata": {},
"source": [
"[![github](https://img.shields.io/badge/-see%20sources-white?logo=github&labelColor=555)](https://github.com/alice4space/qutree/blob/main/docs/source/examples/demo.ipynb)\n",
"[![colab](https://img.shields.io/badge/-open%20in%20colab-blue?logo=googlecolab&labelColor=555)](https://colab.research.google.com/github/alice4space/qutree/blob/main/docs/source/examples/demo.ipynb)\n",
"[![colab](https://img.shields.io/badge/-open%20in%20mybinder-orange?logo=jupyter&labelColor=555)](https://mybinder.org/v2/gh/alice4space/qutree/main?labpath=docs%2Fsource%2Fexamples%2Fdemo.ipynb)"
"#!python -m pip install qutree[demo]"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions qutree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def plot_tree(
else:
w = (1 + 2 * nbit) / 2 ** (len(d) + 1) - dw / 2
ax = fig.add_axes([w, h, dw, dh], projection="3d", azim=azim, elev=elev)
ax.set_facecolor((0, 0, 0, 0)) # remove background
the = self.tree_vals[i][0, :]
phi = self.tree_vals[i][1, :]
x, y, z = thephi_to_xyz(the, phi)
Expand Down

0 comments on commit 64d71fe

Please sign in to comment.