Skip to content

Speed-up (un)embedding utility functions #583

Description

@randomir

After #582, we'll want to apply the same relabeling technique to utility functions embed_bqm and unembed_sampleset.

Currently, embed_bqm creates EmbeddedStructure on the fly, but that's not strictly necessary if the embedding can be reduced to 1-1 relabeling. After the structure is created (~200ms on my laptop), relabeling shortcircuit is applied, but we can still reduce total time by: (1) avoiding EmbeddedStructure creation, or (2) deferring the slow construction bits until they're actually needed.

Similarly for unembed_sampleset; if a dict embedding is passed, relabeling optimization is not applied.

This should bring speed-ups from #582 to composites that use utility functions for embedding, like TilingComposite and ParallelEmbeddingComposite.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions