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

11 ビュー (過去 30 日間)
Emily
Emily 2024 年 1 月 17 日
コメント済み: Emily 2024 年 1 月 17 日
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 Center および File ExchangeQuantum Computing についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by