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

Inquiry on plots for unionfind decoder #37

Open
mkangquantum opened this issue Mar 10, 2022 · 0 comments
Open

Inquiry on plots for unionfind decoder #37

mkangquantum opened this issue Mar 10, 2022 · 0 comments

Comments

@mkangquantum
Copy link

Hi, first or all, thank you for making this amazing repo.
I really like the plotting feature that allows me to understand what is happening.
I have three issues/questions, and I would really appreciate if you could solve these, especially the first one.

1. Plotting unionfind decoder

I'm running the following in jupyter notebook.

%matplotlib qt
from qsurface.main import initialize, run
code, decoder = initialize((5,5), "toric", "unionfind", enabled_errors=["pauli"], plotting=True, initial_states=(0,0))
run(code, decoder, error_rates = {"p_bitflip": 0.05, "p_phaseflip": 0.05}, decode_initial=False)

For the first three plots (initialization, error applied, ancilla qubits measured, everything is fine.
But when I hit next, another window pops up, and the grid doesn't show anymore.
It looks like this:
Capture

Could you please solve this, so that the grid shows up, just like when I use the mwpm decoder?

  1. Warning when I press "previous" in interactive plot

I have the following message:
Traceback (most recent call last):
File "C:\Users\lg\anaconda3\lib\site-packages\matplotlib\cbook_init_.py", line 270, in process
func(*args, **kwargs)
File "C:\Users\lg\anaconda3\lib\site-packages\matplotlib\widgets.py", line 225, in
return self._observers.connect('clicked', lambda event: func(event))
File "C:\Users\lg\anaconda3\lib\site-packages\qsurface\plot.py", line 695, in _draw_prev
return self._draw_from_history(self.history_iter > 1, -1, **kwargs)
File "C:\Users\lg\anaconda3\lib\site-packages\qsurface\plot.py", line 682, in _draw_from_history
self.draw_figure(**kwargs)
File "C:\Users\lg\anaconda3\lib\site-packages\qsurface\plot.py", line 648, in draw_figure
self.focus()
File "C:\Users\lg\anaconda3\lib\site-packages\qsurface\plot.py", line 471, in focus
output = self.blocking_input(self.params.blocking_wait)
File "C:\Users\lg\anaconda3\lib\site-packages\qsurface\plot.py", line 159, in call
return super().call(n=1, timeout=timeout)
File "C:\Users\lg\anaconda3\lib\site-packages\matplotlib\blocking_input.py", line 93, in call
self.fig.canvas.start_event_loop(timeout=timeout)
File "C:\Users\lg\anaconda3\lib\site-packages\matplotlib\backends\backend_qt5.py", line 424, in start_event_loop
raise RuntimeError("Event loop already running")
RuntimeError: Event loop already running

  1. Question: What is info / bitflip / phaseflip in this image?
    image

Again, I really appreciate this repo, and I hope you reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant