Quanlse/QOperator.py
def a(d: int = 2) -> ndarray:
    """
    Return the numpy matrix of destroy operator.

    :return: a numpy matrix
    """
    mat = zeros((d, d), dtype=complex, order="C")
    for i in range(0, d - 1):
        mat[i, i + 1] = sqrt(i + 1) + 0 * 1j
    return mat

    Return the numpy matrix of destroy operator.

    :return: a numpy matrix
    
Return the numpy matrix of destroy operator.
Return the numpy matrix of destroy operator .
def a(d: int = 2) -> ndarray:
    mat = zeros((d, d), dtype=complex, order="C")
    for i in range(0, d - 1):
        mat[i, i + 1] = sqrt(i + 1) + 0 * 1j
    return mat
def a ( d : int = 2 ) -> ndarray : mat = zeros ( ( d , d ) , dtype = complex , order = "C" ) for i in range ( 0 , d - 1 ) : mat [ i , i + 1 ] = sqrt ( i + 1 ) + 0 * 1j return mat
Return the numpy matrix of destroy operator.
Return the numpy matrix of destroy operator .
"""
    Return the numpy matrix of destroy operator.

    :return: a numpy matrix
    """
a numpy matrix
a numpy matrix
d
int