randomConnectionMatrix {QuantumOps}R Documentation

randomConnectionMatrix

Description

Generates a connection matrix for a random undirected graph. Intended for input to QAOA_maxcut.

Usage

randomConnectionMatrix(nNodes,nEdges)

Arguments

nNodes

Number of nodes in generated graph

nEdges

Number of undirected edges in generated graph

Value

Connection Matrix specifying the edges of an undirected graph. Rows are source nodes, columns are destination nodes.

Examples

 randomConnectionMatrix(5,3)

[Package QuantumOps version 3.0.1 Index]