Closed diego-plan9 closed 6 years ago
Hi, I made my own implementation to plot circuits to SVG (and then to PNG or whatever you need as long as there exist a library to transform the SVG to the format you need). There are still some issues:
Nevertheless, I have a github page for it and I will try to publish it as soon as possible. I will also add some pictures to show the results obtained by the tool.
It would be indeed nice to have a look and potentially be able to use it, @nelimeee ! Could you ping back when you have more information about the licensing, and the code published?
I'm not so concerned about point 3 (as, depending on the license, it can ideally be polished further and adapted), but the licensing might be an issue. Ideally, in order to use it as a library or including it in the SDK, it should have a “permissive” license (giving the public permission to use, modify, and share, without any condition for downstream licensing). Either way, looking forward to be able to check your implementation!
@diego-plan9 The code is published on my GitHub. About the licensing, the license is basically a BSD or Apache-like license, except that it enforces the obligation to cite the authors and select the French law as the governing law. You can read the license's FAQ for readable informations, the license is "CeCILL-B".
Thanks for pushing the code - it's looking nice! And also for the clarification on the license, which after having a look at the FAQ mentioned still seems to be the hot topic. Please keep in mind I'm not a lawyer, but could you provide more info on the following:
under "Using CeCILL", it states (emphasis mine):
CeCILL has the following characteristics: ...
CeCILL is contaminating: when a software under CeCILL is integrated or integrates a software under a different licence, the result of this integration must be distributed under CeCILL
could you confirm that that specific paragraph does not apply to CeCILL-B? If I'm reading it correctly, 5.3.3 on the CeCILL-B license would be the one that differs.
To put it in context, it's about making sure that using your library (either directly or with the modifications related to the rendering, if needed) fits into our current policy, which is distributing the SDK itself under Apache License 2.0, and as a result using dependencies that are licensed with fully compatible licenses (BSD, Apache, etc, as you mention) - which hopefully will be the case! :crossed_fingers:
Hi! After reading a little bit the license and speaking with colleagues:
From 5.3.2:
If the Licensee makes any Contribution to the Software, the resulting Modified Software may be distributed under a license agreement other than this Agreement subject to compliance with the provisions of Article 5.3.4.
Means that if someone modify the code, he/she is free to change the license to whatever he/she wants. The only restrictions are listed in 5.3.4.
PS: if you want I'm on the QISKit Slack. You can ping me in the latex_drawer channel, or in private whenever you want =)
The tool is now available via pip. Installation procedure:
pip3 install cffi
pip3 install qasm2image
A quick documentation on how to use the tool is given in the GitHub page of the project.
As mentioned in private and hinted in slack, unfortunately the licensing issues could not be solved satisfactorily - and at the same time another effort for implementing the circuit drawer in pure Python has emerged at #579 that, while visually very similar, is more aligned with our goals in the legal aspects (and also in some finer implementation details), so we are integrating it in the codebase.
Nevertheless, thanks @nelimeee for your efforts and also for your patience, and looking forward to more contributions - and for everyone following the thread, in the pure open source spirit, in practice it is a third (and nice) alternative for drawing circuits via pip install qasm2image
!
Currently we have a feature that plots the circuits to .png, implemented in #295 (closing #235).
Ideally, it would be easier for the end-user to be able to use that feature if it was implemented in pure Python, as it currently depends on some "heavy" non-Python software (pdflatex, mostly) that might not be available or installable under all environments.