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

Fix message error in distributed circuit #543

Merged
merged 9 commits into from
Feb 10, 2022
8 changes: 6 additions & 2 deletions src/qibo/core/distcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ class DistributedCircuit(circuit.Circuit):

def __init__(self, nqubits: int, accelerators: Dict[str, int]):
if not K.supports_multigpu: # pragma: no cover
raise_error(NotImplementedError, "Distributed circuit is not supported "
f"by the {K.name} backend.")
if K.platform is None:
raise_error(NotImplementedError, "Distributed circuit is not supported "
f"by the {K.name} backend.")
else:
raise_error(NotImplementedError, "Distributed circuit is not supported "
f"by the {K.name} ({K.get_platform()}) backend.")
super().__init__(nqubits)
self.init_kwargs["accelerators"] = accelerators
self.ndevices = sum(accelerators.values())
Expand Down