I am getting this error while running the code related to quantum computing
3 ビュー (過去 30 日間)
古いコメントを表示
I have install necessary package
Code I have given:
plotBlochSphere([1; 0])
title("|0> state on Bloch sphere")
Error:
Unrecognized function or variable 'plotBlochSphere'.
0 件のコメント
回答 (1 件)
Steven Lord
2025 年 7 月 11 日
If you're following the example from this documentation page, note this line (I added emphasis.) "To plot any quantum state of a qubit on the Bloch sphere, use the plotBlochSphere function (provided in the Helper Functions section)." You will need to copy the code from the Helper Functions section at the end of that page into a function file plotBlochSphere.m. Copy all of the code in the last code section on that page, as plotBlochSphere uses the helper function mapToBlochSphere.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Quantum Computing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!