catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

[:stop_sign: DO NOT MERGE] User-facing qubit allocation and free prototype

Open paul0403 opened this issue 7 months ago • 0 comments

python3 dynwires_play.py
-----------------------
cat:  [1.00000000e+00 6.29030417e-34]
gdb --args python3 dynwires_play.py 
------------------
(gdb) b RuntimeCAPI.cpp:367
// change this line accordingly if you want to experiment; 
// I set it to before `__catalyst__rt__qubit_release_array__impl` starts deallocating qubits
(gdb) r
// gdb running
(gdb) print *qubit_array_ptr
$1 = std::vector of length 1, capacity 1 = {3} // dealloc of aux
(gdb) c
// gdb running
(gdb) print *qubit_array_ptr
$2 = std::vector of length 3, capacity 3 = {0, 1, 2} // dealloc of main circuit

Context:

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

paul0403 avatar Mar 07 '25 19:03 paul0403