What would a very simple quantum program look like?
cstheory.stackexchange.com
cstheory.stackexchange.com
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.
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".
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...
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.
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.
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?).
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.
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.
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.
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.
Along those lines, I also wonder if they object to measuring the power consumption of their boolean gates in "watts."
I think that would be more in line with what OP was talking about.
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?
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.
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.
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.
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.
The Python library allows you to construct quantum programs and output in a quantum/classical shared memory instruction set called Quil.
For example, Grover's algorithm could be written like this:
def grover_search_sample(bit_count, predicate):
qureg = qalloc(bit_count)
apply X to qureg
apply H to qureg
n = pi/4 * 2**(bit_count/2)
for _ < n:
if predicate(qureg):
phase_by pi
if all(x_axis(qureg)):
phase_by pi
return measure qureg $gas = entangle(1, 'bottled', 1, 'released');
# gas now in states |bottled> + |released>
$cat_health = p_op($gas, 'eq', 'released',
sub {'Dead'},
sub {'Alive'});
# cat,gas now in states |Alive, bottled> + |Dead, released>
if ($cat_health eq 'Dead') {# again, outcome is probabilistic
# thus gas = |released>
}
else {
# thus gas = |bottled>
}
I don't know if this is "real" quantum programming, but it's pretty cool regardless.[0]: http://search.cpan.org/~ajgough/Quantum-Entanglement-0.32/En...