qiskit/tools/apps/optimization.py
def make_Hamiltonian(pauli_list):
    """Creates a matrix operator out of a list of Paulis.

    Args:
        pauli_list (list): list of list [coeff,Pauli]
    Returns:
        numpy.matrix: A matrix representing pauli_list
    """
    Hamiltonian = 0
    for p in pauli_list:
        Hamiltonian += p[0] * p[1].to_matrix()
    return Hamiltonian
Creates a matrix operator out of a list of Paulis.

    Args:
        pauli_list (list): list of list [coeff,Pauli]
    Returns:
        numpy.matrix: A matrix representing pauli_list
    
Creates a matrix operator out of a list of Paulis.
Creates a matrix operator out of a list of Paulis .
def make_Hamiltonian(pauli_list):
    Hamiltonian = 0
    for p in pauli_list:
        Hamiltonian += p[0] * p[1].to_matrix()
    return Hamiltonian
def make_Hamiltonian ( pauli_list ) : Hamiltonian = 0 for p in pauli_list : Hamiltonian += p [ 0 ] * p [ 1 ] . to_matrix ( ) return Hamiltonian
Creates a matrix operator out of a list of Paulis.
Creates a matrix operator out of a list of Paulis .
"""Creates a matrix operator out of a list of Paulis.

    Args:
        pauli_list (list): list of list [coeff,Pauli]
    Returns:
        numpy.matrix: A matrix representing pauli_list
    """
A matrix representing pauli_list
A matrix representing pauli_list
numpy.matrix
pauli_list
list of list [coeff,Pauli]
list of list [ coeff Pauli ]