cirq.devices.get_placements

Get 'placements' mapping small_graph nodes onto those of big_graph.

This function considers monomorphisms with a restriction: we restrict only to unique set of big_graph qubits. Some monomorphisms may be basically the same mapping just rotated/flipped which we purposefully exclude. This could exclude meaningful differences like using the same qubits but having the edges assigned differently, but it prevents the number of placements from blowing up.

big_graph The parent, super-graph. We often consider the case where this is a nx.Graph representation of a Device whose nodes are cirq.Qids like GridQubits.
small_graph The subgraph. We often consider the case where this is a NamedTopology graph.
max_placements Raise a value error if there are more than this many placement possibilities. It is possible to use big_graph, small_graph combinations that result in an intractable number of placements.

ValueError if the number of placements exceeds max_placements.

A list of placement dictionaries. Each dictionary maps the nodes in small_graph to nodes in big_graph with a monomorphic relationship. That's to say: if an edge exists in small_graph between two nodes, it will exist in big_graph between the mapped nodes.