Reputation
69,848
Next tag badge:
1551/1000 score
197/200 answers
Badges
3 122 277
Newest
 Enlightened
Impact
~1.1m people reached

Apr
7
comment Outer product using the quantum mathematica package
Closely related (though not using any packages): Pull out scalars from NonCommutativeMultiply in commutator of SU2 spin algebra. The answer there should also apply here: use KroneckerProduct. So in other words, don't use Mathematica's tensor functions. See also here.
Apr
7
comment Is this a serious flaw in Mathematica's default hashing algorithm
I get False for Hash[X]==Hash[Y], on Mathematica version 10.3.1 for Mac OS X. Likewise for the prepended versions.
Apr
6
comment How to type text with an underbrace underneath it like: $\underbrace{g…g}_{n-times}$?
There's also this palette that I made for a different question.
Apr
3
comment What are the idiosyncrasies which are worked around in these two MSE answers?
I wonder if this should be addressed directly to @F'x.
Apr
2
comment Animate spherical pendulum
There are several demos for this on the Wolfram site, see e.g. here
Apr
2
comment Derivatives of piecewise functions of functions
@Virgil I added the "workaround" for the case you mentioned, showing the extent to which Limit can do what you ask. However, it's probably not as "automated" as you want. However, not knowing anything about g, I don't see a better alternative right now.
Apr
2
comment Derivatives of piecewise functions of functions
@Virgil The substitution g[b] -> 1 isn't going to work anyway because it leaves g' untouched. But I think I understand what you mean. You want to keep g unspecified until the end, not give it a definition at the beginning, right? Then I guess the limit approach wouldn't help. I think it only works if the inner function is already defined so that the singular point in the outer function can actually be identified.
Apr
2
comment Derivatives of piecewise functions of functions
@MathX While you wrote this, I answered with essentially the same general thought...
Apr
1
comment Ticks in v10 - a bug or undocumented change
@rcollyer I added the bugs tag because I can't access version 10.4 yet and it definitely doesn't work properly in 10.3.
Apr
1
comment Ticks in v10 - a bug or undocumented change
Definitely looks like a bug. Maybe related to the dynamic magic giving me trouble here.
Apr
1
comment How can I solve a Hamiltonian with numerical methods?
It would help if you explain what you mean by "effect" here. Do you just want to see a big matrix as a function of time? I answered based on the interpretation that "solving a Hamiltonian" means finding its spectrum. You will have to be more specific about the time-dependent information you're looking for.
Apr
1
comment Two Variable First Order Approximation
How did you use Series - you're not explaining what you tried, i.e., the code using Series that you said doesn't work. What are the small variables? Just x, or also y, or some combination of them? Are you expanding around zero?
Apr
1
comment How can I solve a Hamiltonian with numerical methods?
It looks like your question is not about Mathematica but about physics. Unfortunately, the question has been closed because it wasn't clear what you want to calculate, and how the operators are defined. If you add more details, maybe it will be re-opened. For example, since the Hamiltonian is time-independent, the operator a will be easy to compute in the Heisenberg picture, but I don't know if that's what you mean.
Apr
1
comment Superscript prime symbol
Thanks for mentioning my answer (+1) - I think I'll re-post it here with a modification that would make typing even easier...
Mar
31
comment How can I solve a Hamiltonian with numerical methods?
You should show what you have tried - otherwise not many people will even know what you're asking. I've added an answer using my interpretation of your question.
Mar
31
comment I need to multiply a series of matrices
@Lukas I agree that some more experimentation is needed to find the optimal partition. You suggestion using $ProcessorCount sounds like a good guess - and I can't think of anything better if you can't hard-code the approximate dimensions.
Mar
30
comment Animations in 5.2
I added small corrections to make it run correctly (Circle apparently doesn't use defaults in version 5.2).
Mar
30
comment NDSolve and matrix formulation do not produce the same result. Why and which is more precise?
@Dr.belisarius this will fix the problem (see bottom of page).
Mar
30
comment How to plot a given function over its domain
@SofiaPazJimenezCastillo Don't forget to accept one of the answers by clicking the check mark.
Mar
29
comment How to force evaluation inside the body of a pure function?
It's trivial in this case (not to mention there is a built-in function Rescale): ScaleTo[data_, range_] := (data - Min[data]) (Last[range] - First[range])/(Max[data] - Min[data]). So you don't need a pure function at all.