File tree Expand file tree Collapse file tree 1 file changed +28
-24
lines changed
Expand file tree Collapse file tree 1 file changed +28
-24
lines changed Original file line number Diff line number Diff line change 1+ import math
12from tests .utils_for_testbook import (
23 validate_quantum_program_size ,
34 validate_quantum_model ,
910@wrap_testbook ("3sat_oracles" , timeout_seconds = 1800 )
1011def test_notebook (tb : TestbookNotebookClient ) -> None :
1112 expected_widths = [
12- 25 ,
13- 25 ,
14- 27 ,
15- 33 ,
16- 35 ,
17- 34 ,
18- 36 ,
19- 37 ,
20- 40 ,
21- 48 ,
22- 47 ,
23- 45 ,
24- 53 ,
25- 55 ,
26- 64 ,
27- 72 ,
28- 70 ,
29- 82 ,
30- 100 ,
31- 101 ,
32- 110 ,
33- 118 ,
34- 136 ,
35- 137 ,
13+ 39 , # 25
14+ 43 , # 25
15+ 47 , # 27
16+ 51 , # 33
17+ 55 , # 35
18+ 59 , # 34
19+ 63 , # 36
20+ 67 , # 37
21+ 71 , # 40
22+ 75 , # 48
23+ 79 , # 47
24+ 83 , # 45
25+ 87 , # 53
26+ 95 , # 55
27+ 103 , # 64
28+ 119 , # 72
29+ 131 , # 70
30+ 151 , # 82
31+ 167 , # 100
32+ 191 , # 101
33+ 211 , # 110
34+ 239 , # 118
35+ 267 , # 136
36+ # 137,
3637 ]
3738
3839 for qmod in tb .ref ("qmods" ):
3940 validate_quantum_model (qmod )
4041 for qprog , expected_width in zip (tb .ref_pydantic ("qprogs" ), expected_widths ):
42+ # 10% buffer, plus flat 5 for the shorter ones
43+ expected_width = math .ceil (1.1 * expected_width + 5 )
44+
4145 validate_quantum_program_size (
4246 qprog ,
4347 expected_width = expected_width + 5 , # actual width + 5
You can’t perform that action at this time.
0 commit comments