- doped(p: float, graph: Union[int, Tuple[Collection[Hashable], Collection[Tuple[Hashable, Hashable]]], Collection[Tuple[Hashable, Hashable]], networkx.classes.graph.Graph], cls: None = None, seed: Optional[int] = None, fm: bool = True)¶
Generate a BQM for a doped ferromagnetic (FM) or antiferromagnetic (AFM) problem.
In a doped FM problem,
p, the doping parameter, determines the probability of couplers set to AFM (flipped to 1). The remaining couplers remain FM (-1). In a doped AFM problem, the opposite is true.
p – Doping parameter [0, 1] determines the probability of couplers being flipped.
graph – Graph to build the BQM on. Either an integer n, interpreted as a complete graph of size n, a nodes/edges pair, a list of edges or a NetworkX graph.
cls – Deprecated. Does nothing.
seed – Random seed.
fm – If True, the default undoped graph is FM. If False, it is AFM.
A binary quadratic model.
Deprecated since version 0.10.13: The
clskeyword argument will be removed in 0.12.0. It currently does nothing.