qml.qaoa.cycleΒΆ

Functionality for finding the maximum weighted cycle of directed graphs.

Functions

cycle_mixer(graph)

Calculates the cycle-mixer Hamiltonian.

edges_to_wires(graph)

Maps the edges of a graph to corresponding wires.

loss_hamiltonian(graph)

Calculates the loss Hamiltonian for the maximum-weighted cycle problem.

net_flow_constraint(graph)

Calculates the net flow constraint Hamiltonian for the maximum-weighted cycle problem.

out_flow_constraint(graph)

Calculates the out flow constraint Hamiltonian for the maximum-weighted cycle problem.

wires_to_edges(graph)

Maps the wires of a register of qubits to corresponding edges.