What is the Quantum Circuit Simulator?

Click For Summary

Discussion Overview

The discussion revolves around a quantum circuit simulator developed by a participant, focusing on its functionality, user feedback, and error reporting related to browser compatibility and performance issues. The scope includes technical aspects of the simulator's operation and user experience across different platforms.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes the quantum circuit simulator's features, including drag-and-drop functionality and the display of superposition/mixed state information.
  • Another participant reports encountering a TypeError when using the simulator in Safari and questions its compatibility.
  • The developer acknowledges the TypeError and mentions that the simulator works on their desktop in Firefox and Chrome, but notes a bug in the mobile version of Firefox that leads to a different error.
  • A participant suggests that the lack of support for Safari should be communicated more clearly to users.
  • The developer speculates that the issue may be related to the user's GPU not supporting high precision floats and acknowledges a need for better error handling in the code.
  • A participant shares information about their NVIDIA GeForce GT 750M GPU and its OpenGL support, questioning the shader support.
  • The developer mentions pushing an updated version of the simulator that provides more information about errors and allows circuit editing even if GPU usage fails.
  • Another participant expresses appreciation for the simulator and offers to report any further issues via GitHub.

Areas of Agreement / Disagreement

Participants express varying experiences with the simulator across different browsers and devices, indicating that there is no consensus on its compatibility and performance. The discussion remains unresolved regarding the specific causes of the reported errors.

Contextual Notes

Limitations include potential dependencies on specific hardware capabilities, such as GPU support for high precision floats, and unresolved issues related to browser compatibility.

Strilanc
Science Advisor
Messages
612
Reaction score
229
I've been working on a quantum circuit simulator. It works in-browser; you drag-and-drop gates and it shows information about the resulting superposition / mixed state.

I'm looking for feedback about it. The source code is on github, but you can play with a live version at algorithmicassertions.com/quirk.[/PLAIN]

You can link to circuits. Here's a few:
 
Last edited by a moderator:
  • Like
Likes   Reactions: Greg Bernhardt, Mentz114, f95toli and 1 other person
Physics news on Phys.org
Hello Strilanc - I saw this posted somewhere else too, but since the live version is broken, I didn't look further. Are you aware of the TypeError?
 
Devin Bayer said:
Hello Strilanc - I saw this posted somewhere else too, but since the live version is broken, I didn't look further. Are you aware of the TypeError?

I'm not. Actually, part of the reason I posted was to find out about errors on browsers or machines I don't have.

The simulator does work on my desktop in Firefox and Chrome (on both Ubuntu and Windows). It also works on my phone in chrome, but there's a bug I reported in the mobile version of firefox that prevents it from working there. That bug doesn't cause a type error, though, it causes a FRAMEBUFFER_INCOMPLETE_ATTACHMENT error. (Also the touch interaction is wonky on mobile regardless.)

If you post a screenshot of the error, or copy-paste it from the console, and let me know what browser and OS you're using, that will be useful to me.
 
Sure, I am using Safari on OS X and this is all I see:
https://t-0.be/pub/Screen%20Shot%202016-04-05%20at%2010.42.09.png
If you decide not to support Safari, at least a message to that effect would be more helpful than an error.
 
Devin Bayer said:
Sure, I am using Safari on OS X and this is all I see:
https://t-0.be/pub/Screen%20Shot%202016-04-05%20at%2010.42.09.png
If you decide not to support Safari, at least a message to that effect would be more helpful than an error.

Hmmmm. I'm guessing your machine doesn't have a GPU with support for high precision floats. The code is supposed to fall back to lower precision in that case, so this is not intended. Looks like I forgot to check if getShaderPrecisionFormat flagged some errors before using its result. MDN's entry doesn't mention any errors, but MSDN's does.

Thanks, I'll fix it. (I'll need to find a test machine with an older GPU... and probably a lot more variation would be good in general. Maybe I should finally sign up for a testing service like SauceLabs...)
 
Devin Bayer said:
I have a NVIDIA GeForce GT 750M and I am not sure how I can determine it's support for that kind of shader, but this page seems to suggest it has it: https://devtalk.nvidia.com/default/topic/780628/cuda-on-15-quot-macbook-pro-disappointing-/

Also, according to apple it supports OpenGL 4.1, so that shouldn't be an issue: https://developer.apple.com/opengl/capabilities/

I pushed an updated version today. I don't expect it to have solved your problem, but it does give more information about the problem and even if it fails to use the GPU you should be able to edit the circuit (it's just that all the displays will show NaN).
 
Thanks Strilanc, it looks pretty cool. If I encounter any other issues I'll report them via github.