getMatrix
Syntax
Description
Add-On Required: This feature requires the MATLAB Support Package for Quantum Computing add-on.
returns
the sparse Hermitian matrix representation of the specified observable. For more
information, see Matrix Representation of Observable.H = getMatrix(o)
Examples
Input Arguments
Output Arguments
Limitations
As the number of qubits n increases, the size of the matrix grows exponentially as -by-. So, using
getMatrixis practical only when n is less than about 15.
More About
Version History
Introduced in R2024b