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

Deutsch's algorithm and p(n)

  1. Jul 4, 2005 #1
    Does Deutsch's quantum algorithm provide any profound classical insight into the density of primes?
  2. jcsd
  3. Jul 4, 2005 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I don't see any relationship at all between Deutsch's algorithm and the prime counting function -- maybe there is more than one Deutsch's algorithm? The one I found was for a quantum computer to tell if a function from {0, 1} to {0, 1} was constant or not, with only one application of the function.
  4. Jul 4, 2005 #3
    My mistake! Shor's algorithm, with a working quantum computer, would have the ability to factor numbers exponentially faster than classical computers. Present encryption, reliant upon prime numbers, would then become obsolete. Mathematically, could quantum mechanics and Shor's algorithm together facilitate a formulaic shortcut for the counting of primes?
  5. Jul 5, 2005 #4


    User Avatar
    Science Advisor
    Homework Helper

    Assuming that the Generalized Riemann hypothesis is true then the Miller-Rabin primality test has a runtime of O(log(n)4).

    I don't think very often that Pi(n) is actually calculated by counting up primes, however you look as it that takes up a lot of processing power and storage space very quickly. But hey I don't know much on the subject.
  6. Jul 5, 2005 #5


    User Avatar
    Science Advisor
    Homework Helper

    Yes you don't check every number less than n for primality if you want to find pi(n) anymore. This would take at least O(n) operations even if you had a constant time primality test.

    Much more efficient are variants of the Meissel-Lehmer method, which can find pi(n) in O(n^(2/3)) steps (divided by some terms involving log n) but don't give you a list of primes up to n.

    I don't know much about quantum computers, so I can't really say what they'll be able to tell us about the density of primes. I'd expect nothing that a classical computer couldn't do, just with less time.
    Last edited: Jul 5, 2005
  7. Jul 6, 2005 #6
    ...that's the impression I've always gotten. The factorization part of Shor's algorithm can be done on a classic computer, but it's when you get to the order-finding problem that Shor's algorithm takes advantage of the quantum technology (I don't remember where I read this, but once I do I'll look it up again and provide some more information).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook