Implement Mixed Magnitude Approximation - #1925
Acciaccatura wants to merge 13 commits into
Conversation
…into issue1759
There was a problem hiding this comment.
Code Review
This pull request introduces the mixed_magnitude_approx protocol for approximating unitaries, along with its corresponding exports. The review feedback highlights opportunities to pass the relative_norm_solver parameter down to internal calls (mixed_diagonal_protocol and diagonal_unitary_approx) to respect custom solvers, and suggests avoiding redundant .to_matrix() conversions by passing UnitaryChannel objects directly to from_unitaries.
|
thanks for your contribution, I will take a look asap |
NoureldinYosri
left a comment
There was a problem hiding this comment.
at a first glance looks fine, but we need tests. there is a open ticket for implementing the dimanond norm distance #1755 can you help with that?
| # From Proposition 3.21, this algorithm produces an estimation that is a | ||
| # $3\epsilon$-approximation to the target unitary. So, we should target | ||
| # $\epsilon / 3$ as our error. | ||
| eps = config.number(eps) / 3 |
There was a problem hiding this comment.
take the error budget split as an optional parameter that defaults to this split if not given
There was a problem hiding this comment.
ok! but i think the original paper (Proposition 3.22) mentions that the diamond distance is guaranteed to be eps = eps / 3 to ensure by this guarantee, that the approximation will be at most eps away from the target unitary. if we were to allow the user to change this split, I am concerned the diamond distance may no longer be guaranteed to be less than eps. wdyt?
i added eps_split and a disclaimer in the docstring on this point.
hi! i tried to attempt a solution for mixed magnitude approximation (https://arxiv.org/pdf/2203.10064) for #1759 - though I am unsure how to test this implementation. it appears I need a
diamond_norm_distance_to_unitaryforProbabilisticChannelimplemented.I've attempted to compute the bounds from Proposition 3.22 in the paper and have received favorable results - e.g.:
any advice? thanks for taking a look!