sfc-aqua / quisp

Open source implementation of quantum internet simulation package
BSD 3-Clause "New" or "Revised" License
89 stars 36 forks source link

Process taking long time to stop after simulation #516

Open res6idue opened 1 year ago

res6idue commented 1 year ago

Describe the bug After running a simulation, the process takes a long time to finish. An example is provided below.

To Reproduce Steps to reproduce the behavior:

  1. branch `steane-decoder-purification
  2. .ini file name 'cody_experiment.ini'
  3. Network name 'Linear_Ten_MM_1km'
  4. Parameter settings
    **.channel_loss_rate = 0
    **.channel_x_error_rate = 0
    **.channel_z_error_rate = 0
    **.channel_y_error_rate = 0
  5. What we see (how you know it's a bug). The simulation hangs for a while at the point shown in the output.

Expected behavior The simulation should end. Output

** Event #53940736   t=10.716874209741   Elapsed: 124.264s (2m 04s)  53% completed  (53% total)
     Speed:     ev/sec=435314   simsec/sec=0.00576779   ev/simsec=7.54733e+07
     Messages:  created: 11803985   present: 113   in FES: 64
** Event #54439168   t=10.723457665546   Elapsed: 126.505s (2m 06s)  53% completed  (53% total)
     Speed:     ev/sec=222393   simsec/sec=0.00293744   ev/simsec=7.57098e+07
     Messages:  created: 11912900   present: 81   in FES: 34
** Event #54439424   t=10.723461321542   Elapsed: 129.177s (2m 09s)  53% completed  (53% total)
     Speed:     ev/sec=95.8042   simsec/sec=1.3682e-06   ev/simsec=7.0022e+07
     Messages:  created: 11912959   present: 74   in FES: 26
** Event #55365632   t=11.611868377687   Elapsed: 131.178s (2m 11s)  58% completed  (58% total)
     Speed:     ev/sec=463009   simsec/sec=0.444112   ev/simsec=1.04255e+06
     Messages:  created: 12141589   present: 72   in FES: 14
** Event #56466688   t=16.141500044453   Elapsed: 133.178s (2m 13s)  80% completed  (80% total)
     Speed:     ev/sec=550438   simsec/sec=2.26445   ev/simsec=243078
     Messages:  created: 12414532   present: 73   in FES: 12
** Event #57035561   t=20   Elapsed: 134.258s (2m 14s)  100% completed  (100% total)
     Speed:     ev/sec=527007   simsec/sec=3.56486   ev/simsec=147834
     Messages:  created: 12555551   present: 72   in FES: 9

<!> Simulation time limit reached -- at t=20s, event #57035561

Calling finish() at end of Run #0...
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
[INFO]  1, 0.0164788, -0.0248075, 0.00773694
[INFO]  0.0164788, 1, -0.05685, -0.0767873
[INFO]  0.0248075, 0.0444243, -1, 0.0320807
[INFO]  0.00773694, -0.0096238, -0.0644868, 1
[INFO]  DM =             (0.503868,0)   (0.00171374,0.0223236)   (-0.0150771,-0.014222)         (0.5,0.00310641)
[INFO]   (0.00171374,-0.0223236)                    (0,0)           (0,-0.0253186)   (0.0233165,0.00181828)
[INFO]     (-0.0150771,0.014222)            (0,0.0253186)                    (0,0) (0.00652564,-0.00991983)
[INFO]         (0.5,-0.00310641)  (0.0233165,-0.00181828)  (0.00652564,0.00991983)             (0.496132,0)
[INFO]  Xerr = 0
[INFO]  Zerr = 0 or, 0+0
[INFO]  Yerr = 0
EndNode1<-->QuantumChannel{cost=0.000872341;distance=1km;fidelity=1;bellpair_per_sec=1146.34;}<-->EndNode2; Fidelity=1; Xerror=0; Zerror=0; Yerror=0
Closed file to write.
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
[INFO]  1, 0.0164788, 0.0248075, 0.00773694
[INFO]  0.0164788, 1, 0.0444243, -0.0096238
[INFO]  -0.0248075, -0.05685, -1, -0.0644868
[INFO]  0.00773694, -0.0767873, 0.0320807, 1
[INFO]  DM =             (0.503868,0)   (-0.0150771,-0.014222)   (0.00171374,0.0223236)         (0.5,0.00310641)
[INFO]     (-0.0150771,0.014222)                    (0,0)            (0,0.0253186) (0.00652564,-0.00991983)
[INFO]   (0.00171374,-0.0223236)           (0,-0.0253186)                    (0,0)   (0.0233165,0.00181828)
[INFO]         (0.5,-0.00310641)  (0.00652564,0.00991983)  (0.0233165,-0.00181828)             (0.496132,0)
[INFO]  Xerr = 0
[INFO]  Zerr = 0 or, 0+0
[INFO]  Yerr = 0
EndNode2<-->QuantumChannel{cost=0.000872341;distance=1km;fidelity=1;bellpair_per_sec=1146.34;}<-->EndNode1; Fidelity=1; Xerror=0; Zerror=0; Yerror=0
Closed file to write.
BSA Statistics (raw):
    140256 0 0 0
last BSM message that was sent 10.72769422981
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140256 0 0 0
last BSM message that was sent 10.726448286664
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140456 0 0 0
last BSM message that was sent 10.726666001713
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140456 0 0 0
last BSM message that was sent 10.72840314524
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140456 0 0 0
last BSM message that was sent 10.728801144764
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140456 0 0 0
last BSM message that was sent 10.731445251308
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140456 0 0 0
last BSM message that was sent 10.729297301953
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140456 0 0 0
last BSM message that was sent 10.727744311604
[INFO]  Finishing Hardware Monitor
default!=test_steane_mm_1km
Opened new file to write.
Closed file to write.
BSA Statistics (raw):
    140456 0 0 0
last BSM message that was sent 10.727891935875

Desktop (please complete the following information):