I’ve been using Julia for quite a while now. It was not a love from first sight, Julia is harder that Python and has some uncommon design choices, after all. But eventually I realized how powerful it is. And it’s not only about speed. The killer feature is the multiple dispatch and its type system. It instantly makes Julia superior to other popular languages. I can write algorithms using abstract types, someone else can independently introduce specific types and it could work together flawlessly without much interaction between developers. E.g. think of combining the interval arithmetic and dual numbers. How much pain would it cost to combine the two in other languages, especially if developed independently?

]]>But Python is still slow, nevertheless. I tried implementing my algorithm for the local bound in several languages, and Python was the slowest by far, orders of magnitude slower than C++. MATLAB was a bit better than Python but not much, and Julia had performance similar to C++.

]]>My complaint about Python’s performance was not about the solvers, but about Python itself: I did try MOSEK, for instance, and as expected it doesn’t make any difference, as MOSEK offloads the work to C anyway. But the pre-processing part is so painfully slow that it overshadows the solution time. Often it doesn’t matter, but I need to do a lot of non-commutative polynomial optimization, which needs rather nontrivial pre-processing. In fact it was my frustration with the Python package for it, ncpol2sdpa, that drove me to write Moment.

I did a couple of benchmarks with Julia, nothing serious, and the result was as expected: little difference in the solving times (except the difference from using primal versus dual forms), and much faster pre-processing.

As for Julia code, the really cool stuff is yet to be published, but I wrote an example for bounding random robustness at the end of the tutorial I linked above, and another for doing quantum state discrimination here.

]]>Enjoy your musings, as always.

Like you, I have had a similar trajectory of finding the right combination of tooling to invoke SDPs for problems in quantum information. I wouldn’t necessarily call myself a MATLAB refugee, but I used it extensively before Python solvers supported complex-valued matrices (which I’m glad they now do). These days, I’ve been building a lot of tooling around the solvers in Python in my toqito Python package.

Out of curiosity, have you tried solving your SDPs in Python using a solver like MOSEK? As you point out, the CVXOPT solver can be painfully slow but I’ve noticed that MOSEK is much better. I wonder how that compares to the SDP solvers in Julia–I’d be curious to know as that would be an interesting datapoint for me to seriously consider switching over (or at least to start using Julia more in my workflow).

I’ve gone back and forth on this for Julia. Indeed, when I started with `toqito`, the complex-valued thing was still an issue, and Julia was still quite cumbersome and challenging to work with (as you point out). Plus, many of the bugs that you requested the developers fix weren’t fixed at that time either.

Perhaps I should give the Julia thing another go. It seems we are interested in a fairly wide overlap of problems, so if you happen to have any Julia code that showcases some neat SDPs for quantum information, I’d love to play with it!

Cheers!

]]>It’s a nice reformulation, but the main problem is not the extra affine constraints, but the doubling of the dimension of the PSD variable, and this you cannot solve.

I think the best solution still is to handle complex numbers directly. Note that SeDuMi is not the only solver that can handle it, Hypatia can also do it and it’s a much better solver.

]]>https://arxiv.org/abs/2307.11599 ]]>

Isn’t that the objective of A (Super) I developers? Or are you speaking about AI species…? ]]>

Theorem: All integers are uninteresting.

Proof: Indeed, let us assume that there are interesting integers. Then there must be an integer which is the smallest among the interesting ones, which is therefore the smallest interesting numbers. Well, who cares?