ORNL-QCI / tnqvm

Tensor Network QPU Simulator for Eclipse XACC
43 stars 10 forks source link

Enable access to the circuit wave-function in XACC #82

Open DmitryLyakh opened 3 years ago

DmitryLyakh commented 3 years ago

TN-QVM can compute either the full quantum circuit wave-function or its slice or individual amplitudes. We need to enable access to these quantities from XACC via some API, something like Accelerator.getWavefunction(Mask) -> const Wavefunction &, where Mask specifies which wavefunction slice we want in Thien's notation, like [0,1,0,-1,-1,-1], which will project the first three qubits [0,1,0] and let the last three qubits be free, that is, will return a slice with 2^3 elements. For the full wavefunction, one will need to supply [-1,-1,-1,-1,-1,-1] (default).