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

Add tests for the circuit plotting #178

Closed
BoxiLi opened this issue Nov 9, 2022 · 12 comments
Closed

Add tests for the circuit plotting #178

BoxiLi opened this issue Nov 9, 2022 · 12 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@BoxiLi
Copy link
Member

BoxiLi commented Nov 9, 2022

Install texlive and the circuit plotting dependencies in one of the test actions and add a few tests.

@BoxiLi
Copy link
Member Author

BoxiLi commented Nov 9, 2022

@BoxiLi BoxiLi added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 9, 2022
@Anika-Roy
Copy link

Hello! is this open?

@BoxiLi
Copy link
Member Author

BoxiLi commented Dec 17, 2022

Hi, yes this is still open. You are welcome to contribute!

@Anika-Roy
Copy link

Could you assign it to me please?
Also, I'm new to open source, could you guide me a little on how to get started?

@Anika-Roy
Copy link

Could you tell me what circuit plotting tests are you looking for? A related issue mentioned SWAP gate i think.

@BoxiLi
Copy link
Member Author

BoxiLi commented Dec 24, 2022

Hi, @Anika-Roy sorry for the delay. And thank you for your interest!

The main goal is to run one or a few circuit plotting tasks during the test action so that if something goes wrong, errors will be detected. There is no way to check if the plotted circuit is exactly what we want. But this will at least get our attention when an error is raised.

We don't have a default circuit to test against. But you can find a few examples in the documentation. Ideally the test should cover as many types of gates (and some measurements) as possible. The circuit itself does not to have any meaning.

You can find a guide on how to contribute in the doc. Please let me know if you have more questions!

@Anika-Roy
Copy link

Thank you for replying!
I'll start working on it and let you know when I have some doubts.

@BoxiLi
Copy link
Member Author

BoxiLi commented Dec 24, 2022

It is designed for the notebook but should also work in an ipython console or pure python.

But your error looks independent on that. Have you installed LaTeX and the other external packages? And are you using import qutip_qip or import qutip.qip?

You can have a look at the installation guide in the documentation. There are a few additional softwares that needs to be installed for the plotting.

@Anika-Roy
Copy link

Got it,
thank you

@Anika-Roy
Copy link

I'm facing trouble with running circuit plots.
The documentation handled the error:
"RuntimeError: convert-im6.q16: not authorized qcirc.pdf' @ error/constitute.c/ReadImage/412. convert-im6.q16: no images defined qcirc.png' @ error/convert.c/ConvertImageCommand/3258."
I implemented the solution but I keep getting a slightly different error:
"RuntimeError: convert-im6.q16: attempt to perform an operation not allowed by the security policy PDF' @ error/constitute.c/IsCoderAuthorized/408. convert-im6.q16: no images defined qcirc.png' @ error/convert.c/ConvertImageCommand/3258."

I have downloaded all the dependencies that were mentioned. Could you help me fix this?

@BoxiLi
Copy link
Member Author

BoxiLi commented Dec 28, 2022

I have never seen this but this is certainly related to Imagemagick. May you need this instead https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion.
With domain="coder".

@BoxiLi
Copy link
Member Author

BoxiLi commented Aug 22, 2024

Close as it is addressed in the GSoC project

@BoxiLi BoxiLi closed this as completed Aug 22, 2024
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 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants