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
initial_state
Describe the bug setting initial_state keyword of sample_qubo with binary variables (0, 1) results in weird answer.
sample_qubo
To Reproduce
>>> import openjij as oj >>> a = oj.SASampler() >>> a.sample_qubo(Q={(2, 2): -68.55, (0, 2): 0.1, (1, 3): 0.1, (3, 4): 0.1, (1, 4): 0.1, (4, 4): -66.55, (2, 3): 0.1, (1, 1): -69.55, (0, 0): -70.55, (0, 4): 0.1, (0, 3): 0.1, (2, 4): 0.1, (0, 1): 0.1, (3, 3): -67.55, (1, 2): 0.1}, num_sweeps=1000, initial_state=[1,1,0,1,1]) Response(rec.array([([1, 1, 0, 1, 1], -273.6, 1)], dtype=[('sample', 'i1', (5,)), ('energy', '<f8'), ('num_occurrences', '<i8')]), Variables([0, 1, 2, 3, 4]), {'system': [], 'sampling_time': 1059.5160019875038, 'execution_time': 900.4790008475538, 'list_exec_times': array([900.47900085]), 'schedule': {'beta_max': 184.20680743952366, 'beta_min': 0.01964981376498782, 'num_sweeps': 1000}}, 'BINARY')
Expected behavior Result binary array should be [1,1,1,1,1]
[1,1,1,1,1]
Additional context This error comes from the missing conversion of the binary initial_state array to spin array.
The text was updated successfully, but these errors were encountered:
solved in the latest version
Sorry, something went wrong.
No branches or pull requests
Describe the bug
setting
initial_state
keyword ofsample_qubo
with binary variables (0, 1) results in weird answer.To Reproduce
Expected behavior
Result binary array should be
[1,1,1,1,1]
Additional context
This error comes from the missing conversion of the binary
initial_state
array to spin array.The text was updated successfully, but these errors were encountered: