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."

12 of 232 comments (clear)

  1. Future work... by Cutriss · · Score: 5, Funny

    Port Slashcode to this, and we'll have FP comments *before* the articles appear!

    --
    "Mod, mod, mod...and another troll bites the dust."
    1. Re:Future work... by br0ck · · Score: 5, Funny

      But, luckily, as soon as they're observed they'll disappear.

  2. Heisenberg says... by pr0nbot · · Score: 5, Funny

    attempts to write a programming language for quantum computers, if and when they appear

    Just don't observe them and they will appear!

  3. 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 nihilogos · · Score: 5, Insightful

      I have to say that while it's an excellent Perl module it's utterly useless for the purpose of describing/studying quantum computers.

      Two criticisms I have from 20 seconds reading the CPAN page are

      1. It only seems to handle equal superpositions
      2. He seems to be unaware that even though you can perform computations in parallel on a superposition , you can only access the result of a SINGLE computation. So the primality testing example he includes isn't going to be running on a quantum computer.

      The language Betteli et al describe isn't breaking any new ground in physics, but it's aim is probably to enable computer scientists to start trying to apply formal methods in analyzing quantum computer programs. Maybe they'll have more luck coming up with new algorithms.

      --
      :wq
  4. Re:Q! by __aaklbk2114 · · Score: 5, Funny

    Better yet, Q#: the fastest way to negate any speed improvments gained by quantum computers.

  5. Sample line of code by jamesmartinluther · · Score: 5, Funny

    my $cat = new Cat('Felix');
    my $occupants = [$cat];
    my $room = new Room($occupants);
    $room->kill_occupant($cat);

    # is he dead?
    $room->status_occupant($cat);
    # doh!

    - James

  6. Re:Isn't this the job of the compiler? by The+Only+Druid · · Score: 5, Insightful

    Yes, not to be patronizing, but you're missing the point.

    No matter how non-linear the programming of current software seems to be [i.e. through multithreading and object oriented programming], the software nonetheless relies on the fact that certain things will occur in a certain chronological order.

    Quantum computing's power is in the ability to perform truly simultaneous, non-sequential operations. As a result, an entirely new language must be written to implement the new types of processes which are possible.

    As an anology, consider the "programming language" of an abacus. When a computer is compared, you dont talk about writing a new "compiler" for abacus code on the computer, you write a new language. Similarly, quantum computing is in many ways something wholy different from normal computers.

    --
    "Stumble before you crawl"
  7. Re:A name for the new quantum language by OECD · · Score: 5, Funny

    In honor of Schrodinger: c@

    --
    One man's -1 Flamebait is another man's +5 Funny.
  8. Curse my physics background! by dabootsie · · Score: 5, Funny

    If I didn't know the difference between quantum superposition and tachyons, I'd probably have found that funny too.

  9. Sample code: by Anonymous Coward · · Score: 5, Funny

    if(1 && 0)
    {
    DoBothBranches();
    }
    else
    {
    DoBothBranchesAnyways();
    }
    else
    {
    WhatTheHellIsGoingOn();
    goto PrintAnswerToQuestionYouWereThinkingOf();
    }

  10. Perhaps the new language might be Set oriented? by Mr.+Asdf · · Score: 5, Insightful

    Here's my take on the new language. (Sorry this is so simple for you seasoned programmers.)

    Consider how you might factor a large number:

    N = 23489803289

    for (i=3;i lessthan N;i=i+2)
    {
    if (N/i has remainder 0)
    FACTORS = i and N/i
    }

    This algorithm takes up to the square root of N tries to complete. This is really slow for big numbers.

    If you look at the algorithm, even a quantum computer would not really be able to improve on it, unless you had an EXTREMELY smart compiler that could recognize that each try is independent and could be separated. But that is wishful thinking. Instead, consider using sets:

    S: {3, 5, 7, ... ,sqrt(N)}
    (S is the set of odd numbers from 3 to the square root of N)

    Now the code might look like this:

    Function Divide(S(x), N)
    {
    if (N/S(x) has remainder 0)
    FACTORS = S(x) and N/S(x)
    }

    Now the Divide function would be called with the entire set. Compilers would still need to be smart, but the intent here is utilize the parallel processing of the New hardware. So I'm guessing a language similar to LISP might be a good starting point.

    Thoughts?