dwavesystems / dwavesystems/dimod
Optimized shallow copy for BQM
Open
enhancement
- Dominant language
- Python
- Stars
- 143
- Forks
- 91
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 3
Description
**Application**
It would be good for users to be able to decide which type of copy they want to use for the bqm.
**Proposed Solution**
To implement the `__copy__` method on the BQM object as defined in https://docs.python.org/3.7/library/copy.html. We may also want to add a `deep=False` optional parameter to the `BinaryQuadraticModel.copy` method.
**Additional Context**
The current implementation of `BinaryQuadraticModel.copy` uses python's `copy.deepcopy`. See #324, #326.
Potentially useful for https://github.com/dwavesystems/dwave-hybrid/issues/75.
Contributor guide
Assessment
This issue has not been assessed yet.