We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
get_transpiler()
get_backend()
This fails with a AttributeError: 'NoneType' object has no attribute 'qubits' for me
AttributeError: 'NoneType' object has no attribute 'qubits'
from qibo import get_transpiler, get_backend get_transpiler() get_backend()
whereas the opposite works
get_backend() get_transpiler()
presumably because get_backend sets some kind of global variable that is used by get_transpiler.
get_backend
get_transpiler
The text was updated successfully, but these errors were encountered:
It does (though everything is local to the _Global class, which on its turn is global - making everything global as a consequence).
_Global
The solution is just to replace
qibo/src/qibo/backends/__init__.py
Lines 138 to 139 in 4588671
qubits = cls.backend().qubits natives = cls.backend().natives
In this way, the second invocation will get the actual value set, and the first one will set it, only if there is none yet.
Sorry, something went wrong.
No branches or pull requests
This fails with a
AttributeError: 'NoneType' object has no attribute 'qubits'
for mewhereas the opposite works
presumably because
get_backend
sets some kind of global variable that is used byget_transpiler
.The text was updated successfully, but these errors were encountered: