-
Notifications
You must be signed in to change notification settings - Fork 79
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
Bug: benchmarks-ocean-add-maxcut.ipyb notbook #449
Comments
Problem noted. import execute This will print the sampleset.record and other debug info and you can try to determine why the execute_circuit() is returning the empty array. |
Thanks |
Got it to work. Within _common\ocean\execute.py on line 203 I changed sampleset = sampler.sample_ising(qc.h, qc.J, num_reads=shots, num_sweeps=num_sweeps, annealing_time=annealing_time) to sampleset = sampler.sample_ising(qc.h, qc.J, num_reads=shots, num_sweeps=int(num_sweeps), annealing_time=annealing_time) my NumPy version, 1.2.6, never liked num_sweeps being of type float. Changed it to an int and all seems okay. I'm guessing Miniconda's 4.10.3 version of NumPy is different to 1.2.6 |
Can you make a PR from your branch into the develop branch of the QED-C repo? |
I shall do that today. If possible, could you tell what numpy version you used for the ocean setup? |
Hi,
I've set up an ocean environment as specified by the ocean setup readme, with python version 3.9.7. In the first code cell of benchmarks-ocean-add-maxcut.ipyb, I comment the D-WAVE provider code but leave the simulated annealing sampler code uncommented. I can then run this cell fine. However, when I run the code block under Maxcut - Method 2 I get a value error coming from calling np.max(sizes) where sizes is an empty array. Do you know how I can fix this please? I know 'from neal import SimulatedAnnealingSampler' is now deprecated, but I get the same error with 'from dwave.samplers import SimulatedAnnealingSampler' too
The text was updated successfully, but these errors were encountered: