Main Content

quboResult

Result of solving QUBO problem

Since R2023a

Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.

Description

The properties of a quboResult object provide information about the solution process performed by solve to solve a QUBO problem. solve uses the tabu search algorithm or QAOA to solve a QUBO problem. The resulting solution is a quboResult object.

Creation

Description

result = solve(qprob) solves a QUBO problem using the default tabuSearch algorithm and returns a quboResult object.

example

result = solve(qprob,Algorithm=algo) solves a QUBO problem using the specified algorithm and returns a quboResult object.

Input Arguments

expand all

QUBO problem, specified as a qubo object. Create qprob using the qubo function.

Optimization algorithm, specified as one of these objects:

  • tabuSearch object — Use the tabu search algorithm. Set algorithm properties using the tabuSearch function.

  • qaoa object — Use the quantum approximate optimization algorithm. Set algorithm properties using the qaoa function.

This argument determines the type of object stored in the AlgorithmResult property.

Example: To run the tabu search algorithm for no more than 60 seconds, set ts = tabuSearch(MaxTime=60) and then call solve(qprob,Algorithm=ts).

Properties

expand all

This property is read-only.

Solution point corresponding to the minimal objective function value, returned as a real vector.

This property is read-only.

Best (smallest) objective function value, returned as a real scalar. Generally, BestFunctionValue is the objective function value at BestX.

This property is read-only.

Result details, returned as a tabuSearchResult object or a qaoaResult object.

Examples

collapse all

Create and solve a QUBO problem using the default tabu search.

Q = [0 -1 2; ...
    -1 0 4; ...
    2 4 0];
c = [-5 6 -4];
d = 12;
qprob = qubo(Q,c,d);
result = solve(qprob)
result = 
  quboResult with properties:

                BestX: [3×1 double]
    BestFunctionValue: 7
      AlgorithmResult: [1×1 tabuSearchResult]

The BestX property contains the point giving the lowest objective function value found, and the BestFunctionValue property contains that objective function value. For more details of the solution process, you can examine the AlgorithmResults property, as shown in tabuSearchResult.

Algorithms

  • The tabu search algorithm is based on Palubeckis [2]. Starting from a random binary vector, the software repeatedly attempts to find a binary vector with a lower objective function value by switching some existing values from 1 to 0 or from 0 to 1. The software tries to avoid cycling, or the repeated evaluation of the same point, by using a tabu list. For details, see Tabu Search Algorithm.

  • QAOA is a quantum-classical hybrid approach to solving optimization problems. In general, a quantum circuit represents possible solutions to the problem and a classical optimizer iteratively adjusts the angles in the circuit to improve the quality of the solution. The quantum circuit uses alternating layers of cost and mixer gates to approximately solve the provided problem. For details, see Solve Max-Cut Problem Using QAOA.

References

[1] Farhi, Edward, Jeffrey Goldstone, and Sam Gutmann. “A Quantum Approximate Optimization Algorithm.” arXiv, November 14, 2014. https://doi.org/10.48550/arXiv.1411.4028.

[2] Palubeckis, G. Iterated Tabu Search for the Unconstrained Binary Quadratic Optimization Problem. Informatica (2006), 17(2), pp. 279–296. Available at https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=3c323a1d41cd0e2ca1ddb27192e475ea73959e52.

Version History

Introduced in R2023a

expand all