Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offset to dqm #838

Merged
merged 15 commits into from
Jun 11, 2021
Merged

Conversation

hbarovertwo
Copy link
Member

@hbarovertwo hbarovertwo commented Jun 9, 2021

Note: Publishing before it's ready to merge to get eyes on it.

Implement offset in DQM object via underlying cyDiscreteQuadraticModel object.
Update methods in backwards compatibility safe way.
Add new tests and update existing tests to reflect offset.

Closes #744

@arcondello arcondello self-requested a review June 9, 2021 21:16
@arcondello arcondello added the enhancement New feature or request label Jun 9, 2021
dimod/discrete/discrete_quadratic_model.py Outdated Show resolved Hide resolved
dimod/discrete/discrete_quadratic_model.py Outdated Show resolved Hide resolved
dimod/discrete/discrete_quadratic_model.py Outdated Show resolved Hide resolved
dimod/discrete/discrete_quadratic_model.py Outdated Show resolved Hide resolved
dimod/discrete/cydiscrete_quadratic_model.pyx Outdated Show resolved Hide resolved
dimod/discrete/cydiscrete_quadratic_model.pxd Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2021

Codecov Report

Merging #838 (5a25977) into main (a4bca10) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   88.26%   88.28%   +0.01%     
==========================================
  Files          70       70              
  Lines        5862     5872      +10     
==========================================
+ Hits         5174     5184      +10     
  Misses        688      688              
Impacted Files Coverage Δ
dimod/discrete/discrete_quadratic_model.py 91.28% <100.00%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4bca10...5a25977. Read the comment docs.

@arcondello arcondello requested a review from hsadeghidw June 11, 2021 19:42
@arcondello arcondello merged commit 282e96d into dwavesystems:main Jun 11, 2021
arcondello added a commit that referenced this pull request Jun 11, 2021
New Features
------------

* Add `add_bqm` method to C++ BinaryQuadraticModel #821, #823
* Add `Structured.valid_bqm_graph` method for verifying input problem structure #832
* Reimplement `BinaryQuadraticModel` to use new C++ code #828
* `BinaryQuadraticModel` can now be manipulated symbolically #834
* `load` function can now load all model types #841, #843
* `DiscreteQuadraticModel` now has an `.offset` attribute #838
* Add `ConstrainedQuadraticModel` class #839

Fix
---
* Fix type promotions in binary quadratic models with object biases #836
@hbarovertwo hbarovertwo deleted the add_offset_to_dqm branch June 15, 2021 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_offset for DQM
4 participants