dwavesystems / dwavesystems/minorminer

Compare division by zero strategies

Open
#122 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
54
Forks
48
Avg merge
19h 28m
Merged PRs (30d)
1

Description

Division by zero is unavoidable in a vectorized implementation of `p_norm` since zeros appear along the diagonal of the matrix. There are (at least) two strategies to overcome this:
1. Catch the `numpy` division by zero errors and convert the output to `nan`.
2. Add some small epsilon along the diagonal so that we no longer have zeros.

Strategy 1. is currently implemented.
https://github.com/dwavesystems/minorminer/blob/3c0331f95b64c9513f76ad95e686ea05391ea6f4/minorminer/layout/layout.py#L125
We should compare run-time differences and layout quality differences between the two strategies.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.