pyqpanda.Algorithm.test.qaoa_maxcut_test

Module Contents

Functions

generate_edge_library(dimension)

generate_adjacent_matrix(dimension, n_edge)

generate adjacent matrix of a graph

generate_maxcut_problem_Hamiltonian(adjacent_matrix)

generate_drive_hamiltonian(qubit_number)

max_cut(adjacent_matrix)

to modify

target_list_to_str_list(target_list, dimension)

generate_graph(dimension, n_edge)

max_cut_str's sequence: v0v1v2...vd

qaoa_maxcut_gradient_threshold(graph, step[, ...])

pyqpanda.Algorithm.test.qaoa_maxcut_test.generate_edge_library(dimension)[源代码]
pyqpanda.Algorithm.test.qaoa_maxcut_test.generate_adjacent_matrix(dimension, n_edge)[源代码]

generate adjacent matrix of a graph

pyqpanda.Algorithm.test.qaoa_maxcut_test.generate_maxcut_problem_Hamiltonian(adjacent_matrix)[源代码]
pyqpanda.Algorithm.test.qaoa_maxcut_test.generate_drive_hamiltonian(qubit_number)[源代码]
pyqpanda.Algorithm.test.qaoa_maxcut_test.max_cut(adjacent_matrix)[源代码]

to modify

pyqpanda.Algorithm.test.qaoa_maxcut_test.target_list_to_str_list(target_list, dimension)[源代码]
pyqpanda.Algorithm.test.qaoa_maxcut_test.generate_graph(dimension, n_edge)[源代码]

max_cut_str's sequence: v0v1v2...vd

pyqpanda.Algorithm.test.qaoa_maxcut_test.qaoa_maxcut_gradient_threshold(graph, step, threshold_value=0.05, optimize_times=300, use_GPU=False)[源代码]