Closed Steven-meta closed 11 months ago
If you want a quick fix, do not use Python 3.8, use Python 3.9, 3.10 or 3.11 (not 3.12).
Perhaps putting the following statement at the top of your file (before importing simulated_bifurcation) might also solve the problem even on Python 3.8 (I am not sure it will work). Please let me know if it does.
from __future__ import annotations
Also, using pip install https://github.com/bqth29/simulated-bifurcation-algorithm.git
instead of pip install simulated_bifurcation
should solve the problem (it was corrected a couple of weeks ago).
If you want to be able to use pip install simulated_bifurcation
and Python 3.8 and the second solution did not work, you need to wait until the next release (it is actually close to ready but bqth29 and I currently don't have a lot of free time at the moment so you might need to wait a few weeks).
The problem is that a typo in the source code (an "l" insteand of an "L") made the code use a functionnality which is not available in Python 3.8. This was fixed in a commit a few weeks back.
Thanks for your quick reply. It works well with Python 3.9, but the second solution is not compatible with 3.8.
Hi,
When importing simulated_bifurcation, I got en error "TypeError: 'type' object is not subscriptable "
Error message: class IsingPolynomialInterface(ABC): 11 12 """
simulated_bifurcation/polynomial/ising_polynomial_interface.py in IsingPolynomialInterface() 28 vector: Union[torch.Tensor, np.ndarray, None] = None, 29 constant: Union[int, float, None] = None, ---> 30 accepted_values: Union[torch.Tensor, np.ndarray, list[int], None] = None, 31 dtype: torch.dtype = torch.float32, 32 device: str = "cpu",
Could you help solve this problem? Thanks