cirq.contrib.graph_device.UndirectedHypergraph

vertices The vertices.
labelled_edges The labelled edges, as a mapping from (frozen) sets of vertices to the corresponding labels. Vertices are automatically added.

edges

labelled_edges

vertices

Methods

add_edge

View source

add_edges

View source

add_vertex

View source

add_vertices

View source

random

View source

A random hypergraph.

Every possible edge is included with probability edge_prob[len(edge)]. All edges are labelled with None.

Args
vertices The vertex set. If an integer i, the vertex set is {0, ..., i - 1}.
edge_probs The probabilities of edges of given sizes. Non-positive values mean the edge is never included and values at least 1 mean that it is always included.

remove_vertex

View source

remove_vertices

View source

__add__

View source

__eq__

View source

Return self==value.