dwavesystems / dwavesystems/dimod

Optimized shallow copy for BQM

Open
#352 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.