C2QA / bosonic-qiskit

Extension of Qiskit to support hybrid boson-qubit simulations for the NQI C2QA effort.
BSD 2-Clause "Simplified" License
51 stars 14 forks source link

Manual snapshot to Wigner function plots / animation #59

Closed tjstavenger-pnnl closed 2 years ago

tjstavenger-pnnl commented 2 years ago

Kevin asks:

I’m not sure how challenging this would be, but one really useful capability would be to have a function CVcircuit.cv_snapshot() that you can use to insert snapshot points in your circuit and output the Wigner function plot at each of those points. Sort of like inserting breakpoints when you are debugging.

Tim replies:

The plot_wigner() function in util.py could help here, though you'd need to save the statevector and retrieve it out of the result yourself. I could see making it easier using a cv_snapshot and index or something similar. https://github.com/C2QA/bosonic-qiskit/blob/main/c2qa/util.py#L482

tjstavenger-pnnl commented 2 years ago

closed by #63