Do the Number partition QAOA.

    :param n_step: The number of step of QAOA
    :param nums: The edges list of the graph.
    :returns Vqe object

def numpartition_qaoa(n_step, nums, minimizer=None, sampler=None):
    """Do the Number partition QAOA.

    :param n_step: The number of step of QAOA
    :param nums: The edges list of the graph.
    :returns Vqe object
    """
    hamiltonian = pauli.Expr.zero()
    for i, x in enumerate(nums):
        hamiltonian += pauli.Z[i] * x
    hamiltonian = (hamiltonian ** 2).simplify()

    return vqe.Vqe(vqe.QaoaAnsatz(hamiltonian, n_step), minimizer, sampler)