Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Quantum circuit simulator

  1. Mar 30, 2016 #1

    Strilanc

    User Avatar
    Science Advisor

    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] [Broken]

    You can link to circuits. Here's a few:
     
    Last edited by a moderator: May 7, 2017
  2. jcsd
  3. Apr 5, 2016 #2
    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?
     
  4. Apr 5, 2016 #3

    Strilanc

    User Avatar
    Science Advisor

    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.
     
  5. Apr 5, 2016 #4
    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.
     
  6. Apr 5, 2016 #5

    Strilanc

    User Avatar
    Science Advisor

    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...)
     
  7. Apr 5, 2016 #6
  8. Apr 30, 2016 #7

    Strilanc

    User Avatar
    Science Advisor

    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).
     
  9. May 2, 2016 #8
    Thanks Strilanc, it looks pretty cool. If I encounter any other issues I'll report them via github.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Quantum circuit simulator
Loading...