File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def _default_pyqrack_args() -> PyQrackOptions:
4848 isSchmidtDecomposeMulti = True ,
4949 isSchmidtDecompose = True ,
5050 isStabilizerHybrid = False ,
51- isBinaryDecisionTree = True ,
51+ isBinaryDecisionTree = False ,
5252 isPaged = True ,
5353 isCpuGpuHybrid = True ,
5454 isOpenCL = True ,
Original file line number Diff line number Diff line change @@ -519,3 +519,35 @@ def main():
519519
520520 assert math .isclose (abs (ket [3 ]), 1 , abs_tol = 1e-6 )
521521 assert ket [0 ] == ket [1 ] == ket [2 ] == 0
522+
523+
524+ def test_feed_forward ():
525+ @squin .kernel
526+ def main ():
527+ q = squin .qubit .new (3 )
528+ h = squin .op .h ()
529+ squin .qubit .apply (h , q [0 ])
530+ squin .qubit .apply (h , q [1 ])
531+
532+ cx = squin .op .cx ()
533+ squin .qubit .apply (cx , q [0 ], q [2 ])
534+ squin .qubit .apply (cx , q [1 ], q [2 ])
535+
536+ squin .qubit .measure (q [2 ])
537+
538+ sim = StackMemorySimulator (min_qubits = 3 )
539+
540+ ket = sim .state_vector (main )
541+
542+ print (ket )
543+
544+ zero_count = 0
545+ half_count = 0
546+
547+ for k in ket :
548+ k_abs2 = abs (k ) ** 2
549+ zero_count += k_abs2 == 0
550+ half_count += math .isclose (k_abs2 , 0.5 , abs_tol = 1e-4 )
551+
552+ assert zero_count == 6
553+ assert half_count == 2
You can’t perform that action at this time.
0 commit comments