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. :)
I installed a matlab support package, how do I use the functions in it?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Emily
el 17 de En. de 2024
Comentada: Emily
el 17 de En. de 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?
Respuesta aceptada
Cris LaPierre
el 17 de En. de 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).
You can find them here: https://www.mathworks.com/help/matlab/math/introduction-to-quantum-computing.html#mw_8943f9aa-da7e-45cf-9de8-1e91ff5ccffb
A list of functions provided by the support package can be viewed here: https://www.mathworks.com/help/matlab/referencelist.html?type=function&listtype=cat&category=quantum-computing&blocktype=all&capability=&s_tid=CRUX_topnav
Más respuestas (0)
Ver también
Categorías
Más información sobre Quantum Computing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!