Quantum Bayesian Networks

March 28, 2013

Quantum Computers Do Primes Too

Filed under: Uncategorized — rrtucci @ 5:52 pm

Check out this recent ArXiv paper in which 2 Spaniards, José Latorre and Germán Sierra, give an n qubit circuit that produces a quantum superposition of all the prime numbers less than 2^n. They also show how further QC processing of this superposition of primes can be done to calculate the prime counting function \pi(N). Their QC algorithm can calculate \pi(N) quadratically more efficiently than a classical computer. This permits a QC to probe \pi(N) for much higher N values than a classical computer, if both computers have the same amount of time to calculate. Here is a decent, popular press article about their paper, courtesy of the website “I-Programmer”.

I am often asked for a practical example of the use of Grover’s algorithm. Well, this prime thingie is a very nice example, although it assumes some interest in Number Theory and familiarity with it.

Grover’s algorithm is near and dear to my heart, because I use it in my computer program called “Quibbs”(a QC circuit generator written in JAVA) . In Quibbs, I use my own, home-brewed, fixed-point version of Grover’s algorithm to sample any probability distribution inputted in the form of a classical Bayesian network.

Number Theory shows up infrequently in present day physical theories, but it does show up frequently in computer science algorithms and it has deep connections with group theory (Langlands program), and physicists are always interested in group theory. Hence, maybe in the future, physicists will use Number Theory much more often than they do today.

Advertisements

March 24, 2013

Easy to Customize Application For Unit Conversion

Filed under: Uncategorized — rrtucci @ 4:31 am

As part of their job, experimental physicists must have a very good feeling for the size of the quantities that they are trying to measure when those quantities are expressed in the practical units of measurement commonly used in engineering. On the other hand, in order to make their equations clearer and simpler, theoretical physicists (especially high energy physicists) usually use natural units where Planck’s constant divided by 2 pi, the speed of light, and Boltzmann’s constant are all set to one. (i.e., \hbar =c=k=1). But when the time comes to compare a theory with lab measurements, even theorists are forced to deal with engineering units. Even if a theorist writes his theory in natural units, it’s still prudent for him to have a good idea of the typical size of the quantities involved in his theory, with those quantities expressed in engineering units.

Yesterday, while I was thinking about the sizes of certain things, it dawned upon me that JavaScript is an ideal language for writing a unit conversion application.

I wrote a little proof of concept unit conversion application last night. It inter-converts between

  • temperature (in degrees Kelvin)
  • energy (in eV)
  • frequency (in Hz)
  • wavelength (in meters)

assuming that E=k T, E=hf, c=f\lambda, where T= temperature, E= energy, f= frequency, \lambda = wavelength.)

WordPress.com does not allow the blogs it hosts for free to use JavaScript. It automatically edits JavaScript out. But if you have a WordPress brand blog that runs on your own website, then there is no such limitation for you, and you can add JavaScript code to your blog posts. (WordPress.com does allow its free blogs to display spreadsheets that are public and live in your google account. Cool!)

Since this blog of mine is a cheapie run by WordPress.com, I can’t insert JavaScript directly in this post. Instead I have downloaded the webpage to my website. Here it is. Below is a dead figure (jpg) of the page:
FungibleEnergy

Though trivial, I find this little application very useful and highly mesmerizing. I keep plugging numbers into it and trying to remember physical situations I am familiar with in which those sizes arise.

Of course, there already exist lots of websites and computer widgets that do unit conversion for you. The advantage of my little application is that it is easy to customize and it runs on your computer’s web browser, without any need to download supplementary software libraries and without any need to be connected to the internet.

More detailed explanation of why I think JavaScript is an ideal language for this job

JavaScript is admirably suited for doing all the simple mathematics involved in unit conversion. Plus your computer does all the calculations involved without using any extra software other than a browser, which everyone has. If you use a script written in Perl or PHP or whatever, you either have to download much extra software into your computer, or you have to be connected to the internet and beg a remote server to do those very simple calculations for you.

Another nice thing about JavaScript for writing a unit conversion application is that the finished application is just a simple webpage. Any user can download the webpage into his computer. Then he can run the application simply by opening the webpage on his web browser. Alternatively, he can open the webpage with any text editor, whereupon he can view the source code and easily change/customize it to suit his personal taste and needs.

Besides using this application as is, you can use it as a template to write other unit converting applications that suit your taste and needs. Just change the details such as the number of rows, the text, the numerical constants and the formulas being used, and presto, you can change this to an application that, for example, expresses area in different units like acres, square feet, square miles, square meters, etc.

Even if you know very little about JavaScript, as long as you know a little html and one of the C family of languages (e.g., C, Java, C++. etc.), I think you will find it very easy to customize. Take me as an example: I knew next to nothing about JavaScript a day ago, but since I already know C, C++, Java and html, I found this application trivial to write. I just copied from lots of examples that I found on the internet. There are lots (way too many to mention individually) of VERY GENEROUS people who have posted numerous examples and tutorials and code snippets of html and JavaScript on the internet. Whenever I didn’t know how to do something in JavaScript, I just Googled with wild abandon until I found an example that did what I wanted to do.

JavaScript can also be an ideal language for writing applications that do things other than unit conversion. In general, if you want to make a webpage that interacts with the user and does a simple calculation for him based on his answer to a few button or menu choices or numerical inputs, then JavaScript is a nice way to do this.

March 14, 2013

Be a QC MOOC-her

Filed under: Uncategorized — rrtucci @ 6:41 pm

In English, “to mooch” means to get something without paying for it. The word “moocher” has been forever seared into American culture and consciousness by the superb jazz song “Minnie the Moocher”, sung by the highly charismatic and entertaining black performer Cab Calloway (Wikipedia entry for song/ lyrics/ youTube of Calloway singing it). “Minnie the Moocher” was sung by Calloway himself in the hilarious movie “The Blues Brothers” (Wikipedia entry for movie).

In a previous post, I spoke about how MOOCs (Massive Online Open Courses) are revolutionising higher education. You don’t have to pay anything to take them, at least for now, so taking one amounts to mooching.

But can one mooch specifically on the subject of QCs? Yes! There are at least two current MOOC offerings that, in my opinion, are highly relevant to quantum computing:

  • (Coursera) Probabilistic Graphical Models, taught by Stanford Prof. Daphne Koller

    Next Session: Apr 8, 2013 (11 weeks long)

    This course is based on the masterful, 1200 page book on Bayesian and Markov Networks by Daphne Koller and Nir Friedman. (I’ve spoken previously in this blog about their book, here and here). Daphne Koller and Andrew Ng, both Stanford Profs., are the founders of Coursera.

  • (EdX) Quantum Mechanics and Quantum Computation, taught by Berkeley Prof. Umesh V. Vazirani

    Classes for current term already started on: Feb 11, 2013

    Very plain and elementary exposition of quantum computing covering only two algorithms (Shor and Grover). This course makes a very strong case for the claim that there are only two known algorithms for quantum computing. 🙂

Daphne’s course never mentions quantum mechanics, but I think that bayesian networks are FUNDAMENTAL to quantum computers. So I enthusiastically recommend her course to all QC aficionados.

I recommend Daphne’s course more strongly than Umesh’s. For one thing, Umesh’s course is very standard and Daphne’s is one of a kind. Besides, Daphne belongs to the Computer Science tribe that believes in applications (i.e., the programmers, the shakers and movers of the internet, the Big Shoulders, the brawny Code Butchers for the World), whereas Umesh belongs to that other CS tribe that uses the word application maybe once every five years (i.e., the complexity theorists). (Quantum complexity theorists are also notable for how slowly they move. Sometimes I suspect that molasses or Heinz ketchup is coursing through their veins. I think the last time a quantum complexity theorist invented a new, mildly useful QC algorithm was before you were born, sonny.)

Another bit of news: Recently, a “symposium” was held to celebrate John Preskill’s 60th birthday. The conference also celebrated the instituti which John founded, the IQIM. (I believe IQIM stands for I-CK-Y M-ashuganas. I believe the IQIMs are very active as a group, and that they are even considering putting out a calendar
power-tools
for selling power tools like electric drills and such, with scantily clad women posing with the tools.)

March 4, 2013

In Love With My E-Reader

Filed under: Uncategorized — rrtucci @ 8:00 pm

I’m currently hard at work trying to adapt Judea Pearl’s causality theory to quantum mechanics. I believe I’m making lots of progress, maybe enough to come out eventually (soon?) with a paper with my findings. But until then, I have to talk about something, right? So let me mention a device that has delighted me very much of late.

I recently bought an e-reader—Amazon’s Kindle “Paperwhite” $119 model. This model just came out on Oct 1, 2012. Its screen is 6 inches, 2-point touch sensitive, black/white e-ink and illuminated. I absolutely love it.

I bought it mainly for reading research papers in pdf form, downloaded from arXiv or elsewhere. I find I no longer have to make paper copies of research papers I want to read. I just download their pdfs from my computer onto the e-reader and read them there. I find that reading them on the e-reader is more comfortable than reading them on a computer screen, and almost as comfortable as reading a paper copy. But the e-reader beats paper copies in that you can carry a huge number of papers in one lightweight, sleek, compact device, and you can do computer searches on them. My device has a 2 GB storage (some of that is used up by the operating system). That’s enough memory to store more than a thousand papers. ArXiv papers that were written originally in LaTex and turned into pdf, are quite legible on my e-reader, including all the mathematical symbols, and you can change the viewing size.

Of course, I also use my e-reader to read novels. I’ve done quite a lot of that too. I find my e-reader to be a MUCH MORE convenient and pleasant way of reading novels than paper-backs or hard-backs. I believe this for many reasons that I won’t go into here, since this is a blog devoted to quantum computing.

Talking about quantum computing, let me mention that Jeff Bezos, the visionary founder of Amazon.com, is a believer in the future of quantum computers; so much so that in 2012, he invested in D-Wave. So I am proud to use this blog to throw in a plug for his e-reader, although I would recommend it even if Jeff Bezos had no interest in quantum computers. Even if Jeff were a computational complexity theorist, I would still recommend this e-reader.

Blog at WordPress.com.

%d bloggers like this: