dwave-examples / anneal-schedule-notebook Goto Github PK
View Code? Open in Web Editor NEWDemonstrates configuring the annealing schedule on D-Wave quantum computers.
License: Other
Demonstrates configuring the annealing schedule on D-Wave quantum computers.
License: Other
Now that problems exceeding 1s in duration get rejected, cell 18 of this notebook fails to run completely as it tries to submit a problem with a long pause in the anneal schedule.
Cell 18:
anneal_time=[10.0, 100.0, 500.0]
pause_duration=[10.0, 100.0, 500.0]
# Create list of start times
num_points=5
s_low=0.2
s_high=0.6
pause_start=np.linspace(s_low, s_high, num=num_points)
success_prob = pd.DataFrame(index=range(len(anneal_time)*len(pause_duration)*len(pause_start)),
columns=["anneal_time", "pause_duration", "s_feature", "success_frac"],
data=None)
counter=0
print("Starting QPU calls...")
QPU_time=0.0
for anneal in anneal_time:
for pause in pause_duration:
for start in pause_start:
schedule=[[0.0,0.0],[start*anneal,start],[start*anneal+pause, start],[anneal+pause, 1.0]]
runs=950
results = sampler_embedded.sample_ising(h, J,
anneal_schedule=schedule,
num_reads=runs,
answer_mode='raw',
label='Notebook - Anneal Schedule',
num_spin_reversal_transforms=1)
success_prob.iloc[counter]={"anneal_time":anneal,
"pause_duration":pause,
"s_feature":start,
"success_frac":np.count_nonzero(results.record.energy == -20.0)/runs}
counter+=1
QPU_time+=results.info['timing']['qpu_access_time']
print("QPU calls remaining: ", len(anneal_time)*len(pause_duration)*len(pause_start)-counter)
print("QPU calls complete using", QPU_time/1000000.0, "seconds of QPU time.")
It returns the following error when fewer than 5 QPU calls are remaining:
SolverFailureError: The problem cannot be submitted because the estimated QPU access time of 1076943 microseconds for one or more of the problem's spin-reversal transforms exceeds the maximum of 1000000 microseconds for <solver name>. To resolve this issue, see the topic at https://docs.dwavesys.com/docs/latest/c_qpu_timing.html#keeping-within-the-runtime-limit.
Possible solutions: Reduce the pause, the number of reads, or increase the number of spin-reversal transforms.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.