- AdjArrayBQM.relabel_variables(self, mapping, inplace=True)¶
Relabel variables of a binary quadratic model as specified by mapping.
mapping (dict) – Dict mapping current variable labels to new ones. If an incomplete mapping is provided, unmapped variables retain their current labels.
inplace (bool, optional, default=True) – If True, the binary quadratic model is updated in-place; otherwise, a new binary quadratic model is returned.
Binary quadratic model with relabeled variables. If inplace is set to True, returns itself.