QPU access time#
import random
import dimod
N = 50
h = {}
J = {(i, j): random.gauss(0, 1) for i in range(N) for j in range(i + 1, N)}
bqm = dimod.BinaryQuadraticModel.from_ising(h, J)
from dwave.system import DWaveSampler, EmbeddingComposite
info_hists_dw2000q = []
info_hists_dwadv = []
for i in range(5):
print('iteration:', i)
dw2000q_sampler = EmbeddingComposite(DWaveSampler(profile='sigu-2000q'))
dwadv_sampler = EmbeddingComposite(DWaveSampler(profile='sigu-adv'))
sampleset_dw2000q = dw2000q_sampler.sample(bqm, num_reads=1000)
sampleset_dwadv = dwadv_sampler.sample(bqm, num_reads=1000)
info_hists_dw2000q.append(list(sampleset_dw2000q.info['timing'].values()))
info_hists_dwadv.append(list(sampleset_dwadv.info['timing'].values()))
iteration: 0
iteration: 1
iteration: 2
iteration: 3
iteration: 4
import numpy as np
import pandas as pd
timing_infos = {}
timing_infos['2000Q(mean)'] = np.mean(info_hists_dw2000q, axis=0)
timing_infos['2000Q(std)'] = np.std(info_hists_dw2000q, axis=0)
timing_infos['Advantage(mean)'] = np.mean(info_hists_dwadv, axis=0)
timing_infos['Advantage(std)'] = np.std(info_hists_dwadv, axis=0)
index = sampleset_dw2000q.info['timing'].keys()
df_timing_info = pd.DataFrame(timing_infos, index=index)
df_timing_info
2000Q(mean) | 2000Q(std) | Advantage(mean) | Advantage(std) | |
---|---|---|---|---|
qpu_sampling_time | 238940.0 | 0.000000 | 128852.0 | 12294.425403 |
qpu_anneal_time_per_sample | 20.0 | 0.000000 | 20.0 | 0.000000 |
qpu_readout_time_per_sample | 198.0 | 0.000000 | 88.0 | 12.083046 |
qpu_access_time | 250181.6 | 14.263239 | 154888.0 | 12294.912655 |
qpu_access_overhead_time | 6863.4 | 424.893210 | 129140.0 | 140525.454538 |
qpu_programming_time | 11241.6 | 14.263239 | 26036.0 | 3.633180 |
qpu_delay_time_per_sample | 21.0 | 0.000000 | 21.0 | 0.000000 |
post_processing_overhead_time | 1921.6 | 385.061346 | 9138.8 | 3283.009802 |
total_post_processing_time | 5579.2 | 457.483289 | 294.0 | 160.278508 |
total_real_time | 250181.6 | 14.263239 | 154888.0 | 12294.912655 |
run_time_chip | 238940.0 | 0.000000 | 128852.0 | 12294.425403 |
anneal_time_per_run | 20.0 | 0.000000 | 20.0 | 0.000000 |
readout_time_per_run | 198.0 | 0.000000 | 88.0 | 12.083046 |
print(np.array(info_hists_dw2000q))
[[238940 20 198 250172 6316 11232 21 1378 5101 250172
238940 20 198]
[238940 20 198 250193 6997 11253 21 2467 5326 250193
238940 20 198]
[238940 20 198 250204 6592 11264 21 2163 6150 250204
238940 20 198]
[238940 20 198 250170 6834 11230 21 1626 6115 250170
238940 20 198]
[238940 20 198 250169 7578 11229 21 1974 5204 250169
238940 20 198]]
print(np.array(info_hists_dwadv))
[[130900 20 90 156942 23032 26042 21 14514 110 156942
130900 20 90]
[108540 20 68 134572 8441 26032 21 4390 96 134572
108540 20 68]
[122700 20 82 148738 332056 26038 21 9770 355 148738
122700 20 82]
[139820 20 99 165855 15687 26035 21 9303 463 165855
139820 20 99]
[142300 20 101 168333 266484 26033 21 7717 446 168333
142300 20 101]]