bloch_sphere | Visualization tools for the qubit Bloch | Data Visualization library
kandi X-RAY | bloch_sphere Summary
kandi X-RAY | bloch_sphere Summary
Visualization tools for the qubit Bloch sphere
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a gate sequence
- Render an animation
- Draw a spherical sphere
- Zips multiple iterables together
- Save two frames
- Draw a frame on a frame
- Parse command line arguments
- Decorator for animation
- Decorator to perform animation
bloch_sphere Key Features
bloch_sphere Examples and Code Snippets
from qutip.operators import sigmax, sigmay, sigmaz
def extract_vec(v):
v=[v]
vector=[]
for i in v:
vector.append([
expect(sigmax(),i),
expect(sigmay(),i),
expect(sigmaz(),i)
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = subplot('211', projection='3d')
b = qt.Bloch(fig=fig, axes=ax)
b.render(fig=fig, axes=ax)
plt.show()
import matplotlib.pyplot as plt
import quitp
# needs Axes3D object to activate the '3d' projection
from mpl_toolkits.mplot3d import Axes3D
fig, ax = plt.subplots(figsize=(5, 5), subplot_kw=dict(projection='3d'))
ax.axis('square') # to g
X = np.sin(theta) * np.cos(phi)
Y = np.sin(theta) * np.sin(phi)
Z = np.cos(theta)
Community Discussions
Trending Discussions on bloch_sphere
QUESTION
I'm new to Python and now studying matplotlib
to use animation function.
I'm following qutip
tutorial because of my study.
But when I copied and pasted example code of qutip
tutorial, it didn't work
Error message was Axes3D object is not iterable
.
So, I want to check the code I created but don't know whether the problem is my code of is other thing.
I don't know what to do and want to know why the example code doesn't work.
This is the example code from the tutorial:
...ANSWER
Answered 2017-Feb-11 at 20:28Remove the blit
argument to make the tutorial work:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bloch_sphere
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page