Effacer les filtres
Effacer les filtres

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

11 vues (au cours des 30 derniers jours)
Emily
Emily le 17 Jan 2024
Commenté : Emily le 17 Jan 2024
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 commentaire
Emily
Emily le 17 Jan 2024
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. :)

Connectez-vous pour commenter.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 17 Jan 2024
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).

Plus de réponses (0)

Catégories

En savoir plus sur Quantum Mechanics dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by