I installed a matlab support package, how do I use the functions in it?

11 次查看(过去 30 天)
I wanted to make a plot of a quantum state represented on a Bloch sphere. Upon googling this, I found the introduction to quantum computing page, which has a function that does that, but says I need to install the MATLAB Support Package for Quantum Computing. Great, I installed it, and it shows up as an installed package:
matlabshared.supportpkg.getInstalled
Name Version Base Product
-------------------------------------------- ------- ------------
MATLAB Support Package for Quantum Computing 23.2.2
And then I try the command that was described in the introduction, but it is still an unrecognized function.
plotBlochSphere([1; 0])
Unrecognized function or variable 'plotBlochSphere'.
So I read the page about how to get and manage Add-ons. And it doesn't say anything about what I need to do to run the functions in the package I've just added. So I read the page about importing functions, but I don't know the code name for the MATLAB Support Package for Quantum Computing. It is obviously not that thing with all the spaces. And I'm not really sure that page even applies to this package?
Can you please tell me what I need to do to use this package I just installed? And may I gently suggest to anybody who does the (generally fabulous) support documentation for MATLAB that this information could go in one of the four matlab pages linked above?
  1 个评论
Emily
Emily 2024-1-17
By the way, the text of the function is at the bottom of the the introduction to quantum computing page, so I am able to use the function just by including it as a function in my script. But I'd still like to understand how to make use of this package I installed. :)

请先登录,再进行评论。

采纳的回答

Cris LaPierre
Cris LaPierre 2024-1-17
It would appear the plotBlochSphere is not a function included in the support package. It is a helper function created for some of the examples on the doc page. Therefore, in order to run it, you will need to create a local copy of the helper function(s).

更多回答(0 个)

类别

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

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by