QuantumUtils / quantum-utils-mathematica

QuantumUtils for Mathematica is a software library for quantum information scientists.
Other
76 stars 18 forks source link

Problem with RunAllTests[] #20

Open khyee opened 6 years ago

khyee commented 6 years ago

Hello,

I use Mathematica 11.3.0 on my iMac with macOS 10.12.6.

After installation following instructions, I check if the installed packages are running correctly by running the commands; Needs["QUTesting`"]; RunAllTests[]

After running the commands, I found the following errors.

screen shot 2018-08-14 at 2 34 39 pm

Could you help me fix these errors?

Thanks, Ki.

ihincks commented 6 years ago

Hmm @chriseclectic is the expert on this module, and without looking further, my best guess is that the problem is due to a change in NDSolve between versions. I think they disallowed variable names of the form a[_?NumberQ] for some reason.

In any case, I am just here to point out that if you don't intend to use LindbladSolver, everything thing else in quantum-utils should work. And also that the QSim module has a redundant lindblad simulator.

ihincks commented 6 years ago

@khyee could you do me a favour and test if this runs for you:

s = NDSolve[{y[4]'[x] == y[4][x] Cos[x + y[4][x]], y[4][0] == 1},
 y[4], {x, 0, 30}]
Plot[Evaluate[y[4][x] /. s], {x, 0, 30}, PlotRange -> All]

I don't have access to 11.3 right now, but the above runs fine in my 11.0, and I want to check if my hunch is correct before posting a patch.

ihincks commented 6 years ago

(by the way, all 240 tests pass on my system)

chriseclectic commented 6 years ago

Unfortunately I only have access to Mathematica 10 so I can't test on version 11.

ihincks commented 6 years ago

@chriseclectic yeah no worries. As far as I can tell, the breakage is undocumented and happened sometime between 11.0 and 11.3.

If the problem is that things like y[4] can no longer be used as variable names in NDSolve then we might have to move to something like Symbol['y4'] which will be a bit obnoxious because we don't want to leak tonnes of variable names.

khyee commented 6 years ago

@ihincks Thank you for replying.

Your code runs well in my 11.3.

screen shot 2018-08-17 at 2 28 23 pm
ihincks commented 6 years ago

Thanks @khyee . Huh, now I have no idea what's going on, and have no way to test atm. If you get any errors running stuff from LindbladSolver post them here, otherwise this issue is stuck.