Slashdot Mirror


Quantum Computing Programming Language

William Walker writes "The Economist has an article in its new issue describing attempts to write a programming language for quantum computers, if and when they appear. It does a good job of putting the challenges of qubits versus regular bits into layman's terms. ... The original paper is here."

4 of 232 comments (clear)

  1. Seen Quantum::Superpositions by legLess · · Score: 5, Interesting

    Perl's had support for quantum computing for three years, thanks to Damian Conway's Quantum::Superpositions module. I saw him do a presentation in Portland few months back, and it was pretty mind-blowing. It may seem odd to talk about programming a computer that doesn't exists yet, but Q::S actually works.

    The promise of quantum computers is doing computations (as Damian says) "in multiple universes, in constant time" and Q::S obviously can't do this. It can and does, however, act like you're programming a quantum computer by allowing you to give one scalar multiple simultaneous values.

    Like Perl wasn't confusing enough, now it's like programming line noise ... in multiple universes :)

    --
    This isn't as much "normalization" as it is "don't take so many drugs when you're designing tables."
    1. Re:Seen Quantum::Superpositions by .com+b4+.storm · · Score: 4, Interesting

      To give people an example of what Quantum::Superpositions does, take the following snippet of code:

      if($foo == 1 && $foo == 2 && $foo == 3) {
      print "hooray";
      }

      With traditional Perl, such a condition could never evaluate to true. After all, if $foo is 1, how can $foo be 2 and 3 as well? Now take a look at the following:

      use Quantum::Superpositions;

      my $foo = any(1, 2, 3);

      if($foo == 1 && $foo == 2 && $foo == 3) {
      print "hooray";
      }

      Thanks to our Quantum-powered Perl (heh), this condition is true. $foo is 1, 2, and 3 all at once. Sort of. In quantum terms, $foo isn't any of those values. But once you test $foo to see if it is 1, it becomes 1. And when you look to see if it's 2, it becomes 2, etc. But if you test $foo to see if it is 4, it is not - that's not one of the possible values.

      --
      "Wow, you're like some kind of superhero able to ward off happiness and success at every turn."
      -- Ryan Stiles
  2. You are correct! by twitter · · Score: 4, Interesting
    So how are they going to handle an infinite number of variables? Oh right, dont worry... Someone else's problem?

    Yes. With an infinite number of universes, there are an infinite number of you typing the code. Most of you will get it right and the computer will average the correct answer for you. So there, an infinite number of monkeys CAN write Shakespere, GUIs or anything else they please.

    Microsoft has been working on this for a long time with their robot code from thier IDE. It still looks random and does not work quite right because they have not figured out how to make regular digital logic uncertian. When they figure that out, they will have it.

    A gold star for you.

    --

    Friends don't help friends install M$ junk.

  3. Strangeness by Anonymous Coward · · Score: 4, Interesting

    I've put a little thought (very little) and it's a very interesting issue. First, for the doubters, they do have some quantum computing successes, the basics are proven. It's worth figuring out what the language is like. A couple things occur to me.

    (1) Loops. Don't need them. You just have one line, when you use index "i", it contains all the possible values, so all loops are single statements.
    OK, so in general, you won't have issues with flow logic, you write a forumula and theoretically all possible answers are in the output and the input also represents all possible inputs. So this languages is going to have less to do with flow control and more to do with filtering out all the unwanted answers. Not just "wrong" answers that don't fit, but extra answers. To use the looping analogy, if you have a qbyte index and would normally loop through to the total number of elements, the qbyte will loop through all it's values, some of which might be out of range, create numerical problems like divide by zero.

    Ok, this should be easy for you to tear apart since it's not well thought through, but what do you expect, a freaking Quantum genius to post this?