tlquantum.maxcut
.brute_force_calculate_maxcut
- tlquantum.maxcut.brute_force_calculate_maxcut(nqubits, spins1, spins2, weights)[source]
Brute force calculation of MaxCut for a given set of spins and weights. Caution: scales exponentially in number of qubits.
- Parameters:
- nqubitsint, number of qubits
- wspins1List/tensor of ints, spin indices
- wspins2List/tensor of ints, spin indices
- weightsList/tensor of real floats, graph weights
- Returns:
- The MaxCut for the graph described by spin1, spin2, and weights.