QAOA_maxcut: QAOA_maxcut

Description Usage Arguments Value Examples

View source: R/QAOA_maxcut.R

Description

Takes a connection matrix as input and converts it to a set of clauses, then runs the Quantum Approximation Optimization Algorithm (Farhi, Goldstone, and Gutmann 2014) <arXiv:1411.4028>.

Usage

1
QAOA_maxcut(connectionMatrix,p=1,gamma=pi/p,beta=pi/(2*p),displayProgress=FALSE)

Arguments

connectionMatrix

Matrix that specifies the edges between nodes. Rows are source nodes and columns are destination nodes. Value of 0 means no edge, value of 1 means edge. If edge is undirected, an edge should be specified going both directions.

p

Number of iterations that algorithm will run. Each iteration applies U(C,g) and U(B,b)

gamma

Angle for U(C,g), currently the same for all iterations. Should be between 0 and 2*pi

beta

Angle for U(B,b), currently the same for all iterations. Should be between 0 and pi

displayProgress

Boolean which specifies if progress should be shown. If TRUE, a bar plot is continually updated showing the amplitudes

Value

Ket after algorithm is applied

Examples

1

QuantumOps documentation built on Feb. 3, 2020, 5:07 p.m.