Strilanc / Quirk

A drag-and-drop quantum circuit simulator that runs in your browser. A toy for exploring and understanding small quantum circuits.

Home Page:http://algassert.com/quirk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: state equation display

bvandergiessen opened this issue · comments

commented

Thanks for this brilliant tool.

A display for the quantum state of the selected qubits, e.g. 0.57735|001⟩ + 0.57735i|010⟩ - 0.57735|100⟩, would be helpful for those who, like me, feel it gives an immediate overview of the state in a formal description known from Physics. There could be a resizable Display item, perhaps showing this state on mouse-over (its label could simply be |ψ⟩).

Obviously the information is all available from the Amps display, but the user has to collect it by mousing over the parts. An overview in one formula allows for immediate insight into relative phases etc.

This is quite a funny suggestion to me, because the amplitude display is an "immediate overview of the state". It sounds more like you want a very detailed dive into the state.

It would be possible to make a display that showed the largest few components of the superposition as text, but it's unfortunately not something that I plan to do. It's difficult to put into words what the issue is; it just feels not in the spirit of the tool to me. Avoiding excessive numbers in the output was part of the original design intent, because they can't be read at a glance and because I'd already seen the issues with them in tools like https://wybiral.github.io/quantum/ .

commented

Understood. I thought about why the Amps graphic doesn't feel like an immediate overview to me, and I think it is because which square refers to which state's amplitude is not intuitive.

If the two-state amp graphic had three vertical layers, with |00⟩ at the top, |01⟩ and |10⟩ in the middle and |11⟩ at the bottom, it would be more intuitive. The vertical position would then have a physical meaning (the z-spin or something), so you'd recognise states by their position. But that might screw up the layout, particularly with more qubits (e.g. with 3 qubits you'd have 4 layers: |000⟩; |001⟩ |010⟩ |100⟩; |011⟩ |101⟩ |110⟩; and |111⟩).