News for hackers. Stuff that matters.
Re:What would a very simple quantum program look like? by api on Wednesday June 14, 2017 @09:46AM (#14552632)
"The result is that qubit 2 now contains the state of qubit 1 after Hadamard operation."

This is really going to be a barrier to understanding.

When I was a little kid I could not only grasp but very easily remember what OR, AND, NOT, NOR, and XOR gates did. They take two inputs and tell you what input 1 OR input 2 would be, etc. Addition, subtraction, multiplication, and division are likewise easy to remember once you get the concept. These operations add, subtract, multiply, and divide, respectively.

What is Hadamarding? What does it mean to Hadamard something? Do we really have to use language studded with totems to dead people in place of clear conceptual descriptions of things?

Math itself has the same problem once you get beyond concepts that were discovered by people we no longer remember.

It's fine to memorialize great minds, but not at the expense of understanding for future generations.

Re:What would a very simple quantum program look like? by mikeash on Wednesday June 14, 2017 @10:13AM (#14552851)
Do you have the same objection to grouping the simple gates you mention under the name of "boolean logic"?

I know almost nothing about quantum computing (aside from the fact that it's not just a matter of trying all possible values simultaneously), but looking up the Hadamard transform on Wikipedia, I'm pretty sure the barrier to understanding is going to be the fact that it's a highly complicated operation, not the three-syllable name.

Re:What would a very simple quantum program look like? by Joe-Z on Wednesday June 14, 2017 @10:48AM (#14553123)
>Do you have the same objection to grouping the simple gates you mention under the name of "boolean logic"?

Why wouldn't he? Wouldn't a term like 'switch logic' be much more intuitive? A switch is either on or off, true or false.

Re:What would a very simple quantum program look like? by mikeash on Wednesday June 14, 2017 @10:50AM (#14553134)
I don't know, I'm just wondering if they're consistent about it, or if they've internalized terms like "boolean" to the point where they forget that they're named in the same way. Given how common such things are in many fields, it strikes me as weird to single out this particular instance.

Along those lines, I also wonder if they object to measuring the power consumption of their boolean gates in "watts."

Re:What would a very simple quantum program look like? by oh_sigh on Wednesday June 14, 2017 @01:26PM (#14554315)
Imagine if the operations of boolean logic were, instead of AND is BOOL, OR is QCC(for queens college, cork), NOT is DFG(for duncan f gregory), etc

I think that would be more in line with what OP was talking about.

Re:What would a very simple quantum program look like? by mikeash on Wednesday June 14, 2017 @02:21PM (#14554784)
It's hard to evaluate that fairly, since I've known the other names for as long as I can remember.

How do you feel about computing distances with the Pythagorean theorem, performing a Gaussian blur, thinking about data compression in terms of Kolmogorov complexity, or generating random numbers in a Poisson distribution?

Re:What would a very simple quantum program look like? by oh_sigh on Wednesday June 14, 2017 @03:38PM (#14555425)
I don't really care - I was just trying to point out what I thought OP was getting at that other posts were missing. For what it's worth my opinion is that, if there is a pre-existing word which captures a lot of the meaning, then it is probably best to go for that. If there isn't, then anything is fair game.
Re:What would a very simple quantum program look like? by mikeash on Wednesday June 14, 2017 @05:17PM (#14556192)
That sounds reasonable to me. It seems like this is how things are already done to me. If something has an easy name, then that's used, otherwise the creator/inventor/discoverer's name is used. I don't understand it so maybe I'm missing a short term for it, but it seems like the Hadamard transform wouldn't nicely fit any existing word/phrase.
Re:What would a very simple quantum program look like? by tdriggs on Wednesday June 14, 2017 @07:42PM (#14556888)
Just tried to read the Wikipedia article... I hope I'm out of engineering before quantum becomes the new ML.
Re:What would a very simple quantum program look like? by mikeash on Wednesday June 14, 2017 @08:57PM (#14557169)
Let's hope good abstractions are developed so that this level of math isn't what we have to deal with on a daily basis. I could imagine that happening. The math behind how an individual transistor works is pretty hairy too, but we mostly don't have to care.
Re:What would a very simple quantum program look like? by majewsky on Wednesday June 14, 2017 @10:03AM (#14552762)
> Do we really have to use language studded with totems to dead people in place of clear conceptual descriptions of things?

The name "AND" is just as opaque as "Hadamard", if taken by itself. It just doesn't appear as such to you because you already have an intuitive grasp on the concept of conjunction.

The problem is that nearly everything on quantum physics is so profoundly unfamiliar that we cannot map these concepts and operations to familiar words. At that point, it doesn't matter if we call it "the florb operator" or if we name it after some pioneer of the field.

EDIT: Math actually has sort of the opposite problem. They use everyday words for very concrete objects with very concrete definitions. The most notable exception is theorems, but I hope you won't argue that a name like "Zorn's lemma" is more practical than something like "the lemma where you plug that thing into this mapping and then this thing becomes frobnicated".

Re:What would a very simple quantum program look like? by gravypod on Wednesday June 14, 2017 @10:15AM (#14552864)
> The name "AND" is just as opaque as "Hadamard", if taken by itself

It's great that "AND" is not taken by itself. It very much helps that AND comes from our language. The AND gate is named after "and" which is an English concept.

The word 'and' is used to group two things that will happen together. For example: "I will go to the park and go to the pool." This is much like the AND gate which only turns on after the two inputs turn on.

Unfortunately "Hadamard" is not part of the English language.

> The problem is that nearly everything on quantum physics is so profoundly unfamiliar that we cannot map these concepts and operations to familiar words

There is no simple way to explain this in laymen terms? From what the Wikipedia article says I doubt that [1].

Why not just call it a "map basis states" operations? That's what the Wikipedia article implies it does.

[1] - https://en.wikipedia.org/wiki/Hadamard_transform#Quantum_com...

Re:What would a very simple quantum program look like? by yorwba on Wednesday June 14, 2017 @10:22AM (#14552908)
Every quantum operation maps basis states to something, it's not specific enough to single out the Hadamard transform.

Note that the full description in your linked Wikipedia article " a one-qubit rotation, mapping the qubit-basis states |0⟩ and |1⟩ to two superposition states with equal weight of the computational basis states |0⟩ and |1⟩".

If I had to choose a descriptive name, I might call it the "equal superposition" operation; but I'm not a quantum physicist either, so that might be wrong as well.

Re:What would a very simple quantum program look like? by majewsky on Wednesday June 14, 2017 @10:41AM (#14553058)
> Unfortunately "Hadamard" is not part of the English language.

Of course "Hadamard operation" is part of the English language. If you didn't allow proper nouns and foreign terms to be added to a language, none of the contemporary languages would exist.

Re:What would a very simple quantum program look like? by oh_sigh on Wednesday June 14, 2017 @01:32PM (#14554374)
Hadamard was not a pre-existing English word or phrase like AND was, which I think what OP was getting at.
Re:What would a very simple quantum program look like? by yellowapple on Wednesday June 14, 2017 @01:19PM (#14554235)
"The name 'AND' is just as opaque as 'Hadamard', if taken by itself. It just doesn't appear as such to you because you already have an intuitive grasp on the concept of conjunction."

True, but the difference is that most people able to communicate with a modern language have an intuitive grasp on the concept of conjunction, and can use that intuition to guess what an "AND" or "OR" or "NOT" might mean, as well as more easily remember what "XOR" or "NAND" or "NOR" might do as long as they can remember that "X" stands for "eXclusive" and "N" stands for "Not".

In other words, to even a basic English speaker, the name "AND" shouldn't really be all that opaque. Any basic English speaker should be able to guess what "AND" means.

In contrast, naming such things after dead mathematicians makes their meanings unintuitive and unguessable to anyone who hasn't memorized said mathematicians and their notable discoveries. As one of those people, I'll take "the lemma where you plug that thing into this mapping and then this thing becomes frobnicated" over "Zorn's lemma" any day; the latter may be more concise, but it's also significantly more opaque, leaving me with absolutely zero starting point to guess what this "lemma" does.

In the context of quantum logic gates/operators, I'd propose some alternative names for things currently named after random people (disclaimer: I'm no expert on quantum mathematics, so my names are probably not really accurate depictions of what such gates do, but rather what I currently understand them to do based on what I can glean about them):

- "Hadamard gate" -> "equally-maybe gate" (gate that ensures equal probability - "maybe" - of a qubit's potential states)

- "Pauli-X gate" -> "maybe-not gate" (gate that inverts the probabilities of a qubit's potential states) / "X flip gate" (gate that rotates the qubit's state space along the X axis)

- "Pauli-Y gate" -> "Y flip gate" (gate that rotates the qubit's state space along the Y axis)

- "Pauli-Z gate" -> "Z flip gate" or "phase flip gate" (gate that rotates the qubit's state space along the Z axis)

- "Toffoli gate" -> "and maybe-not gate" (inverts the third qubit if the first two are both in the |1> state)

- "Fredkin gate" -> "maybe swap gate" (swaps the second and third qubits if the first qubit is in the |1> state)

These possible names are arguably much more intuitive than the names currently assigned to these operators/gates, especially once you're familiar with representing qubits as Bloch spheres (which is another thing that needs renamed; maybe "qubit sphere" or "state sphere" or "state space" like I've put it above would be more appropriate?).

Re:What would a very simple quantum program look like? by archgoon on Wednesday June 14, 2017 @11:07AM (#14553272)
This keeps coming up from programmers, and it's utter nonsense. Learning Machine Learning isn't hard because I have to remember tricky and arbitrary names like Keras, Theano, NVidia, and CUDA. Learning those, and what they do is the easy part. Learning how to use them, how they work, and when to use them takes a lot more time than learning the names.

Is python a bad introductory language because it's not named "A Dynamic Language With Syntax that Looks Like Pseudo Code and Significant Whitespace"?

Names are easy, humans are really good at them. Like people, remembering them become second nature once you work with them.

Re:What would a very simple quantum program look like? by oh_sigh on Wednesday June 14, 2017 @01:34PM (#14554386)
You're confusing having meaningful names for systems vs having meaningful names for operations within a system. I don't think anyone has complained that "boolean logic' is called what it is, but imagine if each operation was called by the name of some great logician and not some quasi-related common english word.
Re:What would a very simple quantum program look like? by archgoon on Wednesday June 14, 2017 @01:45PM (#14554483)
So you object to the terms 'dot' and 'cross' product? They signify nothing beyond the notation itself.

Also, I use 'bool' everywhere in various langauges to denote a value that is 'true or false'. Should we change all usages of it to 'bit' or 'flag' or 'TwoValues'? It's an operator in all respects, and calling it 'bool' creates no confusion.

Re:What would a very simple quantum program look like? by yellowapple on Wednesday June 14, 2017 @01:27PM (#14554322)
"Learning how to use them, how they work, and when to use them takes a lot more time than learning the names."

That part is made significantly easier if their names actually reflect how/when they're used and/or how they work. Remembering that information is also easier when there's at least some semblance of a mapping between the name and function/purpose.

Re:What would a very simple quantum program look like? by ashark on Wednesday June 14, 2017 @01:27PM (#14554333)
> Is python a bad introductory language because it's not named "A Dynamic Language With Syntax that Looks Like Pseudo Code and Significant Whitespace"?

OTOH we say Python is a programming language, where both of those words have other meanings and uses that aid in both initial understanding and later recall. We don't say Python is a "squabitle flop-tangle" to mean the same thing.

I think that when it comes to labeling concepts, given the option of either names that provide a bit of grip or mirror-smooth ones that may only be conquered by direct, silo'd memorization, the former are preferable when possible.

Re:What would a very simple quantum program look like? by colbyh on Wednesday June 14, 2017 @10:05AM (#14552772)
but there are also so, so many concepts about programming that you, when you were a little kid, had no hope of grasping. QC is in such early stages that it is more like talking about a circuit diagram, which is something that would befuddle most smart young people.

a Hadamard transform is very "mathy" and harder to understand than the majority of basic programming concepts, but why should QC need to be easy to understand? physics and math are very dense fields where great work is being done right now nevertheless.

Re:What would a very simple quantum program look like? by opportune on Wednesday June 14, 2017 @10:07AM (#14552789)
This just seems like pointless whining to me. Quantum stuff is hard and picking a different name wouldn't really change anything. Perhaps calling it a Hadamard rotation would be slightly easier to understand. But regarding the difficulty of the concept: nobody is forcing you to study quantum computing anyway.

Also, the only reason you find boolean operators and normal arithmetic operators easy to understand intuitively is due to exposure.

Re:What would a very simple quantum program look like? by 21 on Wednesday June 14, 2017 @11:38AM (#14553501)
> Also, the only reason you find boolean operators and normal arithmetic operators easy to understand intuitively is due to exposure.

I'm not so sure about this. A small child can easily understand "this candy AND that candy" vs "this candy OR that candy".

I don't see how any amount of explication will make a small child understand intuitively a Hadamard rotation.

Re:What would a very simple quantum program look like? by opportune on Wednesday June 14, 2017 @11:41AM (#14553531)
I think you're right, but I also think that part of that exposure involves our use of AND in natural language. We don't have many quantum phenomena or analogies that directly affect us (by that I mean, that we consciously notice and are familiar with) on a day to day basis. So in a way, it's still a problem of exposure. That's partly why I say that changing the name of the Hadamard operation won't really help people understand what is doing to a significantly greater extent: there's not an easy analogy or concise definition that we can use to intuitively understand it.
Re:What would a very simple quantum program look like? by BenjiWiebe on Wednesday June 14, 2017 @02:01PM (#14554637)
Really? In my experience most young children have a hard time grasping the concept this candy OR that candy. /s