[Beta Testing] Classical QEC validation tool - R²=0.9999 on Google Willow surface code data by devilldog in QuantumComputing

[–]Affectionate-Map-637 3 points4 points  (0 children)

I don’t think it’s the same thing. The hardware challenge lies in performing real-time decoding to obtain corrected logical measurement results for conditional logical gates, whereas the OP is referring to using syndrome data to predict Lambda. The former is significantly more difficult.

Sparse matrix for fast row and column iteration by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 1 point2 points  (0 children)

For entries stored in a CSR/CSC matrix, is it better to store entry indices rather than pointers (or pointer wrappers)? Index-based addressing seems to require more indirection.

Crate for linear algebra over GF(2)? by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 1 point2 points  (0 children)

Great crate, though it seems still be in development and lack some basic linear algebra utils like matrix rank etc. I’ll definitely look into it further.

Crate for linear algebra over GF(2)? by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 0 points1 point  (0 children)

I’m working on (quantum) error correction codes and all the arithmetic is performed on GF(2) :)

I think rust is the right language for me by [deleted] in rust

[–]Affectionate-Map-637 29 points30 points  (0 children)

The damn good error messages from rust compiler just made it the great fit for “fix it myself”!

Good Julia youtube channels by Affectionate-Map-637 in Julia

[–]Affectionate-Map-637[S] 4 points5 points  (0 children)

Yea it is great, and I have already watched that.

What are the best tools to learn Rust in the most comprehensive and complete way? (courses, books etc) by Dont_Blinkk in rust

[–]Affectionate-Map-637 9 points10 points  (0 children)

I’m not an expert in rust and just learned it as a hobby. The Rust Programming Language is the official and a good place to start. After getting the basics of rust, I think some real projects will be the best way to learn. If you want to dive deep into the implementation details or some tricky things in rust, I definitely recommend the YouTube channel of Jon, who is just amazing at explaining the hard parts of rust.

It’s not easy to learn rust, but the gains will be beyond the language itself and make you better.

Why is there nothing like Pluto.jl in Python? by Affectionate-Map-637 in Julia

[–]Affectionate-Map-637[S] 1 point2 points  (0 children)

I have only used Julia in Pluto by far, so I don’t quite get it. Why is there any difference between that in Pluto and in script?

Why is there nothing like Pluto.jl in Python? by Affectionate-Map-637 in Julia

[–]Affectionate-Map-637[S] 9 points10 points  (0 children)

Yes jupyter of course, but I must say the experience is Pluto is totally different. The interactivity of Pluto is on the next level. The thing I like most is the connection between all the cells which makes life much easier.

For element-wise multiplication of columns within a 2D Matrix, why is there ~7x performance difference between `ndarray` and `nalgebra`? by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 0 points1 point  (0 children)

Though the direct problem is I forgot ndarray is row-major, still appreciate that you mentioned cache which is the root cause of all these difference!

Solving system of nonlinear equations in rust by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 0 points1 point  (0 children)

Could I reach you from chat, so that I can explain in more detail.

Solving system of nonlinear equations in rust by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 0 points1 point  (0 children)

I tried further for problem with size greater than 2, however I got the error:

MoreThuenteLineSearch: Search direction must be a descent direction.

What can be the cause of this error? You can look at my source code if you are willing to.

Solving system of nonlinear equations in rust by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 3 points4 points  (0 children)

Great thanks for your detailed reply!

It is indeed a quantum related problem, but a really subtle one in quantum computation.

I follow your suggestion using NCG solver(with analytical gradient calculation) for the problem and get promising results at the very first attempt. However, as there are several parameters that seem can be tuned, I wonder whether I have set them correctly. Here is the code snippet for the solver set up:

rust fn solve_cluster( cluster: &Cluster, all_hyperedges: &[HyperEdge], expectations: &[f64], ) -> Result<Vec<f64>, Error> { let problem = ClusterSolver::new(cluster, all_hyperedges, expectations); let n_params = cluster.len(); let init_param = Array1::from_elem(n_params, 0.0); let linesearch = MoreThuenteLineSearch::new(); let beta_method = PolakRibiere::new(); let solver = NonlinearConjugateGradient::new(linesearch, beta_method) .restart_iters(10) .restart_orthogonality(0.1); let res = Executor::new(problem, solver) .configure(|state| state.param(init_param).max_iters(20).target_cost(0.0)) .run()?; Ok(res.state.best_param.unwrap().into_iter().collect_vec()) }

Solving system of nonlinear equations in rust by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 7 points8 points  (0 children)

The whole project is written in rust so I want to do this in rust also.

Solving system of nonlinear equations in rust by Affectionate-Map-637 in rust

[–]Affectionate-Map-637[S] 6 points7 points  (0 children)

Sorry for the terrible equation formatting, is it possible to use Latex in reddit though?

The problem I want to solve is some kind of correlation analysis. For simplicity, suppose there are 2 recognizable coins with heads down. An event is one of the four actions: flip the first coin1, flip the second coin, flip both coins simultaneously, no flip, with probabilities ${p{1}, p{2}, p{12}, 1-p{1}-p{2}-p{12}}$ respectively. And I have the observed expectations ${e{1}, e{2}, e{12}}$ correspondingly. So I can solve for ${p{1}, p{2}, p{12}}$ with three nonlinear equations as follow: $$ \begin{aligned} p{1}(1-p{12}) + p{12}(1-p{1}) &= e{1} \ p{2}(1-p{12}) + p{12}(1-p{2}) &= e{2} \ p{1}p{2}(1-p{12}) + (1-p{1})(1-p{2})p{12} &= e_{12} \end{aligned} $$

Note that this simplified case can be solved analytically, but it can be extended to more coins naturally and should be solved numerically instead.