how to plot bloch sphere

32 次查看(过去 30 天)
Sowmya
Sowmya 2023-3-27
编辑: DGM 2023-3-27
There is a function plotBlochSphere and installed all the required support package. But still showing axis errors. Please help
Error using matlab.graphics.axis.Axes/set
Complex values are not supported.
Error in axis>LocSetLimits (line 293)
set(ax,...
Error in axis (line 114)
LocSetLimits(ax(j),cur_arg,names);
Error in plotBlochSphere (line 28)
axis([-limits limits -limits limits -limits limits]);
  1 个评论
DGM
DGM 2023-3-27
编辑:DGM 2023-3-27
Let's see.
The error message does not match the code of the plotBlochSphere() function given here
or the plotBlochSphere() function given here
It instead matches this plotBlochSphere() function
which wasn't even on the first page of search results. The variable 'limits' is being set to a complex value directly by you in your call to the function. How you're calling the function is unknown, but 'limits' needs to be a real-valued scalar.
I like how everything in that FEX submission is a function wrapped up as a livescript with no script content because someone doesn't know how to write a function synopsis. I especially like how everything being published as .mlx means that Firefox needs to eat three CPU cores for over six minutes in order for the page to render 30 lines of code.

请先登录,再进行评论。

回答(1 个)

Torsten
Torsten 2023-3-27
移动:Torsten 2023-3-27
Too little information to give a helpful answer.
But apparently, you got complex results that cannot be plotted.

类别

Help CenterFile Exchange 中查找有关 Quantum Mechanics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by