4 ms·
As a PhD in mathematics who converted to development, please, go into the details of what you mean. I know tensor products. I know SQL joins. I see superficial
by gunnihinn 8y ago
As a PhD in mathematics who converted to development, please, go into the details of what you mean.
I know tensor products. I know SQL joins. I see superficial similarities between the two, but no unifying underlying principle.
The world has had quite enough of nonsense thrown around because it's "obvious". Put your money where your runaway mouth is.
- deleted 8y ago[deleted]
- lisper 8y agoUm, can we tone this down a notch please? I didn't intend for this to be a deep insight, just the observation that both the tensor product and the join operation involve taking all possible pairs of the components of the input data. The only formal difference between the two is that the components of the tensor product are ordered while the components of a join are not (they are a set).
- kgwgk 8y agoThe tensor product is not exactly like the Cartesian product because not all the elements of the tensor product of the Hilbert spaces representing each qbit can be written as the tensor product of the individual qbits. In the cross join case, all the elements are pairs of elements from the original tables. In the Hilbert space of a composite system only the separable states can be written as the tensor product of states of the subsystems. "Observation 3.6.5: Interesting two-qubit states. Not every 4-dimensional vector can be written as a Kronecker product of two 2-dimension vectors, e.g., you can have a two-qubit state |Ψ⟩ such that: |Ψ⟩ = ̸= |ψ⟩|φ⟩, for any one-qubit state |ψ⟩ and |φ⟩ These types of states (called entangled states) are very intriguing and play a fundamental role in quantum mechanics."
- lisper 8y agoInterestingly, I was just about to edit my original comment to say exactly that: there are tables which are exactly analogous to entangled states in that they cannot be written as a cartesian product of two other tables. But I have to stress that I do not intend this to be a deep insight, just an interesting (IMHO) observation.
- kgwgk 8y agoIt is interesting that the basis of the tensor product of the spaces can be constructed as the tensor product of each possible combination of the basis of the spaces. Among other things, it makes clear that the dimension of Hilbert space for the composite system is the product of the dimensions of the Hilbert spaces. But this can distract us from the most interesting part, which is that the space spanned by these basis vectors is much larger than the simple cartesian product. Focusing on superficial similarities is a two-edged sword: anchoring on a familiar concept can help or make things more difficult. And it's guaranteed to annoy people! (I'm mostly getting over it, but I still dislike the use of the word "tensor" to refer to multi-dimensional arrays. Tensor has a meaning in geometry and tensor algebra is not about doing linear algebra on 2-d slices of a larger-dimensional object.)
- eapriv 8y agoI can’t see see the similarity. SQL join is the categorical fiber product. Tensor product is not a categorical product. It can be related to the product, but not in a trivial way. In particular, I can’t agree with your statement that the tensor product “involves taking all possible pairs of the components of the input data". It’s one way to construct the tensor product, but conceptually it’s not really about that.
- lisper 8y ago> SQL join is the categorical fiber product You are now beyond the limits of my understanding. I never grokked category theory. SQL join is a Cartesian product. The Tensor product is analogous to a Cartesian product except that the inputs and outputs are ordered tuples instead of sets. That's all I was getting at.
- jcranmer 8y agoWhen you ask someone to explain something, and the response that you get is merely "it should be obvious," what it achieves is a) you have just been told that you are a stupid idiot and b) you are in fact so stupid that you are not worth educating. The remark isn't quite so biting if it's paired with an actual explanation, but by itself, it serves little purpose other than to insult the enquirer.
- lisper 8y agoI disagree. In some cases, such a question is evidence that you have not thought about the problem at all. In this case, the connection is so obvious and so trivial that it's analogous to the observation that, say, there is a connection between multiplication and the areas of rectangles. If you ask me to explain that on HN I think it's not unreasonable for me to tell you to just go think about it some more.
- jcranmer 8y agoYou are the kind of person who made me flip out trying to do abstract algebra homework. When you're trying to get help figuring out a problem, and everyone just keeps responding "group actions are the magic hammer," it is absolutely no help whatsoever. Clearly, the problem is that I was taught group actions very badly, and I needed someone to sit down and explain them to me so that I could see why they would be useful. But nope, too busy being smug to actually explain anything. As for HN, a lot of people are going to be self-educated in advanced topics. That means there's going to be holes in people's knowledge, especially as it relates to alternative theoretical treatments.
- lisper 8y agoI totally sympathize. But in this case, I really don't see how anyone could fail to miss the connection if they just looked at the description of tensor product in the book, and the description of join in Wikipedia. I don't think that is an unreasonable amount of homework to expect people to do.