gwroblew / Quantum-Computing-Playground

Source code of quantumplayground.net.
Apache License 2.0
109 stars 59 forks source link

Exporting data #5

Open jakubmielczarek opened 5 years ago

jakubmielczarek commented 5 years ago

Hi, is there a way to export values of the amplitudes? This would be helpful, especially when quantum register with around 20 qubits is considered, and it is virtually impossible to place a cursor on a pixel associated with a given basis state. Best, Jakub

gwroblew commented 5 years ago

quantum.simulator.getState() returns JavaScript array of real and imaginary values of the state (interleaved). You could place a breakpoint there or use JavaScript console to get the data for further processing.