@@ -351,6 +351,7 @@ def test_add():
351351 q1 = bb .add_register ('b' , bitsize )
352352 a , b = bb .add (Add (bitsize ), a = q0 , b = q1 )
353353 cbloq = bb .finalize (a = a , b = b )
354+ cbloq .t_complexity ()
354355
355356
356357@pytest .mark .parametrize ('bitsize' , [3 ])
@@ -402,6 +403,7 @@ def test_out_of_place_adder():
402403 q2 = bb .add_register ('c' , bitsize )
403404 a , b , c = bb .add (OutOfPlaceAdder (bitsize ), a = q0 , b = q1 , c = q2 )
404405 cbloq = bb .finalize (a = a , b = b , c = c )
406+ cbloq .t_complexity ()
405407
406408
407409def test_square ():
@@ -410,6 +412,7 @@ def test_square():
410412 q0 = bb .add_register ('a' , bitsize )
411413 q0 , q1 = bb .add (Square (bitsize ), a = q0 )
412414 cbloq = bb .finalize (a = q0 , result = q1 )
415+ cbloq .t_complexity ()
413416
414417
415418def test_sum_of_squares ():
@@ -420,6 +423,7 @@ def test_sum_of_squares():
420423 inp , out = bb .add (SumOfSquares (bitsize , k ), input = inp )
421424 cbloq = bb .finalize (input = inp , result = out )
422425 assert SumOfSquares (bitsize , k ).signature [1 ].bitsize == 2 * bitsize + 2
426+ cbloq .t_complexity ()
423427
424428
425429def test_product ():
@@ -430,6 +434,7 @@ def test_product():
430434 q1 = bb .add_register ('b' , mbits )
431435 q0 , q1 , q2 = bb .add (Product (bitsize , mbits ), a = q0 , b = q1 )
432436 cbloq = bb .finalize (a = q0 , b = q1 , result = q2 )
437+ cbloq .t_complexity ()
433438
434439
435440def test_scale_int_by_real ():
@@ -438,6 +443,7 @@ def test_scale_int_by_real():
438443 q1 = bb .add_register ('b' , 8 )
439444 q0 , q1 , q2 = bb .add (ScaleIntByReal (15 , 8 ), real_in = q0 , int_in = q1 )
440445 cbloq = bb .finalize (a = q0 , b = q1 , result = q2 )
446+ cbloq .t_complexity ()
441447
442448
443449def test_multiply_two_reals ():
@@ -446,6 +452,7 @@ def test_multiply_two_reals():
446452 q1 = bb .add_register ('b' , 15 )
447453 q0 , q1 , q2 = bb .add (MultiplyTwoReals (15 ), a = q0 , b = q1 )
448454 cbloq = bb .finalize (a = q0 , b = q1 , result = q2 )
455+ cbloq .t_complexity ()
449456
450457
451458def test_square_real_number ():
@@ -464,6 +471,7 @@ def test_greater_than():
464471 anc = bb .add_register ('result' , 1 )
465472 q0 , q1 , anc = bb .add (GreaterThan (bitsize ), a = q0 , b = q1 , target = anc )
466473 cbloq = bb .finalize (a = q0 , b = q1 , result = anc )
474+ cbloq .t_complexity ()
467475
468476
469477def test_greater_than_constant ():
@@ -473,6 +481,7 @@ def test_greater_than_constant():
473481 anc = bb .add_register ('result' , 1 )
474482 q0 , anc = bb .add (GreaterThanConstant (bitsize , 17 ), x = q0 , target = anc )
475483 cbloq = bb .finalize (x = q0 , result = anc )
484+ cbloq .t_complexity ()
476485
477486
478487def test_equals_a_constant ():
@@ -482,6 +491,7 @@ def test_equals_a_constant():
482491 anc = bb .add_register ('result' , 1 )
483492 q0 , anc = bb .add (EqualsAConstant (bitsize , 17 ), x = q0 , target = anc )
484493 cbloq = bb .finalize (x = q0 , result = anc )
494+ cbloq .t_complexity ()
485495
486496
487497def test_to_contiguous_index ():
@@ -492,6 +502,7 @@ def test_to_contiguous_index():
492502 out = bb .add_register ('s' , 1 )
493503 q0 , q1 , out = bb .add (ToContiguousIndex (bitsize , 2 * bitsize ), mu = q0 , nu = q1 , s = out )
494504 cbloq = bb .finalize (mu = q0 , nu = q1 , s = out )
505+ cbloq .t_complexity ()
495506
496507
497508def test_arithmetic_notebook ():
0 commit comments