Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scale-out-matrix-phases should have a lenient alternative #822

Open
stylewarning opened this issue May 26, 2022 · 0 comments
Open

scale-out-matrix-phases should have a lenient alternative #822

stylewarning opened this issue May 26, 2022 · 0 comments
Labels
good first issue Good for newcomers math Likely requires good working math knowledge.

Comments

@stylewarning
Copy link
Member

scale-out-matrix-phases takes matrices $A$ and $B$ and attempts to find a value $\phi := e^{i\theta}$ that most accurately allows $B[:,0] \approx \phi A[:,0]$. Here, '$\approx$' means double~. If, for any entry, it finds that there is no $\phi$ within double-noodle precision, it'll error saying that they're not in the same projective class.

I like to have another function that calculates something like

$$ \operatorname{argmin}_{\theta\in[0,2\pi)} \Vert B- e^{i\theta} A\Vert, $$

for some suitable choice of norm (operator norm? vectorized norm?). Maybe it's already in quilc and I just don't know about it.

(Note that some of this work has already been implemented and merged by @aijony by printing a phase-invariant distance $\sqrt{1-\frac{1}{n}|\operatorname{Tr} AB^\dagger|}$ in the -m option if you have a TOLERANCE pragma.)

@stylewarning stylewarning added good first issue Good for newcomers math Likely requires good working math knowledge. labels May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers math Likely requires good working math knowledge.
Projects
None yet
Development

No branches or pull requests

1 participant