A Quantum Engineering Focused Linux Distro From Scratch — Day 5
The Quantiki list for quantum assembly languages was a little out of date, so I updated it to include QMASM and Blackbird as well as their web implementations that I know.
Next it was time to add support for sourceforge RSS feeds to my small Python script.
<feed xml:lang="en">
<title>Activity for Eqcs</title>
<link href="https://sourceforge.net/p/eqcs/activity/" rel="alternate"/>
<id>https://sourceforge.net/p/eqcs/activity/</id>
<updated>2016-04-09T08:56:03Z</updated>
<subtitle>Recent activity for Eqcs</subtitle>
<entry>
<title>Eqcs released /eqcs/eqcs-0.0.7.patch</title>
<link href="https://sourceforge.nethttps%3A//sourceforge.net/projects/eqcs/files/eqcs/eqcs-0.0.7.patch/download" rel="alternate"/>
<published>2016-04-09T08:56:03Z</published>
<updated>2016-04-09T08:56:03Z</updated>
<author>
<name>Eqcs</name>
<uri>https://sourceforge.net/p/eqcs/profile/</uri>
</author>
<id>
https://sourceforge.net/projects/eqcs/files/eqcs/eqcs-0.0.7.patch/download
</id>
<summary type="html"/>
</entry>
<entry>
import logging
import feedparser
import ping3, socket
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
SOURCES = [
"https://github.com/intel/intel-qs/tags.atom",
"https://github.com/softwareqinc/staq/tags.atom",
"https://github.com/QuEST-Kit/QuEST/tags.atom",
"https://github.com/epiqc/ScaffCC/tags.atom",
"https://github.com/vm6502q/cc65/tags.atom",
"https://github.com/vm6502q/qsharp-runtime/tags.atom",
"https://github.com/vm6502q/ProjectQ/tags.atom",
"https://github.com/vm6502q/qrack-qsharp-runtime/tags.atom",
"https://github.com/vm6502q/vm6502q/tags.atom",
"https://github.com/vm6502q/pyqir/tags.atom",
"http://quantum-studio.net/qx_simulator_linux_x86_64.tar.gz",
"https://github.com/softwareQinc/qpp/tags.atom",
"http://www.informatik.uni-bremen.de/agra/eng/qmdd_download.php",
"https://www.scottaaronson.com/chp/chp.c",
"https://sourceforge.net/p/eqcs/activity/feed.atom",
"https://lanq.sourceforge.net/index.php?p=download",
"http://www.libquantum.de/files/libquantum-1.0.0.tar.gz",
"https://sourceforge.net/p/qplusplus/activity/feed.atom",
"https://www.quantware.ups-tlse.fr/QWLIB/fidelity_stat_error.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/QClib.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/benenti.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/benenti2.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/benenti3.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/bettelli.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/harper.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/giraud.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/PAREC-Source.tar.gz",
"https://www.quantware.ups-tlse.fr/bettelli/libquantum-0.6.7.tar.gz",
"https://www.quantware.ups-tlse.fr/QWLIB/lib_shor.tgz",
"https://www.quantware.ups-tlse.fr/QWLIB/peachalmers.tgz",
"https://www.quantware.ups-tlse.fr/QWLIB/lib_pea.tgz",
"https://www.quantware.ups-tlse.fr/QWLIB/lib_shor2.tgz",
"https://www.quantware.ups-tlse.fr/QWLIB/brainlinks.tgz",
"http://thegreves.com/david/software/QDD-0.3.tar.gz",
"http://hampshire.edu/lspector/qgame++/qgame-0.4.1.tar.gz",
"https://sourceforge.net/p/qsims/activity/feed.atom",
"http://web.archive.org/web/20050923134721/http://www.lri.fr/~durr/Attic/qtm/qtm.C",
"http://tph.tuwien.ac.at/~oemer/tgz/qcl-0.6.7.tgz",
"https://www-imai.is.s.u-tokyo.ac.jp/~tokunaga/QCS/QCS.tar.gz",
"https://sourceforge.net/p/qcplusplus/activity/feed.atom",
"https://sourceforge.net/p/qnc/activity/feed.atom",
"http://www.ar-tiste.com/Qbtr1-11.tar.gz",
"https://sourceforge.net/p/qucosi/activity/feed.atom",
"https://github.com/Marquezino/qwalk/tags.atom",
"https://quantum-algorithms.herokuapp.com/299/shorsim.tar",
"https://github.com/vadym-kl/sqct/tags.atom",
"https://github.com/cda-tum/ddsim/tags.atom",
"https://github.com/libtangle/qcgpu/tags.atom"
]
file = open("quantum_packages", "w")
url = ""
for source in SOURCES:
# a GitHub or SourceForge release feed
if ".atom" in source:
try:
releases = feedparser.parse(source).entries
release = releases[0]
if "github" in source:
version = release.id.split("/")[-1]
url = "/".join(source.split("/")[:-1]) + "/archive/refs/tags/" + version + ".tar.gz"
elif "sourceforge" in source:
try:
latest = "https://sourceforge.net/projects/" + source.split("/")[-3] + "/files/latest/download"
ping3.verbose_ping(latest, count=3)
url = latest
except socket.error as e:
url = release.link.href
except Exception as e:
logger.error("Could not parse RSS feed {0}".format(source))
# a direct download link
else:
try:
ping3.verbose_ping(source, count=3)
url = source
except socket.error as e:
logger.error("Could not ping {0}".format(source))
if url != "":
logger.info("Found source: {0}".format(url))
file.write(url + "\r\n")
file.close()
An error was thrown when I tried to install ping for Python! That meant there was something out of sync between my Python installation, pip3 installation and the ping package.
marcuse@redblue:~/Documents/package-updater$ pip3 install ping
Defaulting to user installation because normal site-packages is not writeable
Collecting ping
Using cached ping-0.2.tar.gz (10 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-hcsk00kx/ping_1f02a3ab8ad543bd9b5b0f6b97a54ba9/setup.py", line 23, in <module>
from ping import __version__
File "/tmp/pip-install-hcsk00kx/ping_1f02a3ab8ad543bd9b5b0f6b97a54ba9/ping.py", line 196
except socket.error, (errno, msg):
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Oddly enough even when using the pip3 package manager for Python, it will still install the Python 2 version of ping by default. All I had to do was specify ping3.
marcuse@redblue:~/Documents/package-updater$ pip3 install ping3
Defaulting to user installation because normal site-packages is not writeable
Collecting ping3
Downloading ping3-4.0.4-py3-none-any.whl (13 kB)
Installing collected packages: ping3
WARNING: The script ping3 is installed in '/home/marcuse/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed ping3-4.0.4
marcuse@redblue:~/Documents/package-updater$ export PATH=$PATH:/home/marcuse/.local/bin
marcuse@redblue:~/Documents/package-updater$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/marcuse/.local/bin
marcuse@redblue:~/Documents/package-updater$ cat quantum_packages
https://github.com/intel/intel-qs/archive/refs/tags/v2.0.0-beta.tar.gz
https://github.com/softwareqinc/staq/archive/refs/tags/v2.1.tar.gz
https://github.com/QuEST-Kit/QuEST/archive/refs/tags/v3.5.0.tar.gz
https://github.com/epiqc/ScaffCC/archive/refs/tags/5.0.tar.gz
https://github.com/vm6502q/cc65/archive/refs/tags/vm6502q.v1.7.tar.gz
https://github.com/vm6502q/qsharp-runtime/archive/refs/tags/v0.10.2002.1602.tar.gz
https://github.com/vm6502q/ProjectQ/archive/refs/tags/v0.4.1.tar.gz
https://github.com/vm6502q/qrack-qsharp-runtime/archive/refs/tags/vm6502q.v6.1.0.tar.gz
https://github.com/vm6502q/vm6502q/archive/refs/tags/vm6502q.v6.2.0.tar.gz
https://github.com/vm6502q/pyqir/archive/refs/tags/v0.5.0a1.tar.gz
http://quantum-studio.net/qx_simulator_linux_x86_64.tar.gz
https://github.com/softwareQinc/qpp/archive/refs/tags/v3.1.tar.gz
http://www.informatik.uni-bremen.de/agra/eng/qmdd_download.php
https://www.scottaaronson.com/chp/chp.c
https://sourceforge.net/projects/eqcs/files/latest/download
https://lanq.sourceforge.net/index.php?p=download
http://www.libquantum.de/files/libquantum-1.0.0.tar.gz
http://www.libquantum.de/files/libquantum-1.0.0.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/fidelity_stat_error.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/QClib.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/benenti.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/benenti2.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/benenti3.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/bettelli.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/harper.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/giraud.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/PAREC-Source.tar.gz
https://www.quantware.ups-tlse.fr/bettelli/libquantum-0.6.7.tar.gz
https://www.quantware.ups-tlse.fr/QWLIB/lib_shor.tgz
https://www.quantware.ups-tlse.fr/QWLIB/peachalmers.tgz
https://www.quantware.ups-tlse.fr/QWLIB/lib_pea.tgz
https://www.quantware.ups-tlse.fr/QWLIB/lib_shor2.tgz
https://www.quantware.ups-tlse.fr/QWLIB/brainlinks.tgz
http://thegreves.com/david/software/QDD-0.3.tar.gz
http://hampshire.edu/lspector/qgame++/qgame-0.4.1.tar.gz
http://hampshire.edu/lspector/qgame++/qgame-0.4.1.tar.gz
http://web.archive.org/web/20050923134721/http://www.lri.fr/~durr/Attic/qtm/qtm.C
http://tph.tuwien.ac.at/~oemer/tgz/qcl-0.6.7.tgz
https://www-imai.is.s.u-tokyo.ac.jp/~tokunaga/QCS/QCS.tar.gz
https://sourceforge.net/projects/qcplusplus/files/latest/download
https://sourceforge.net/projects/qnc/files/latest/download
http://www.ar-tiste.com/Qbtr1-11.tar.gz
http://www.ar-tiste.com/Qbtr1-11.tar.gz
https://github.com/Marquezino/qwalk/archive/refs/tags/v1.4.1.tar.gz
https://quantum-algorithms.herokuapp.com/299/shorsim.tar
https://quantum-algorithms.herokuapp.com/299/shorsim.tar
https://github.com/cda-tum/ddsim/archive/refs/tags/v1.13.1.tar.gz
https://github.com/cda-tum/ddsim/archive/refs/tags/v1.13.1.tar.gz
Six of the packages on Quantiki no longer had their webpages and were instead broken links. I marked these “Taken down”. Another package hadn’t been updated since 1995.
There are tools for manipulating QASM, but there are no implementations of QASM in C, Rust, Perl, PHP, any other OG systems language or Rust. This will not do. I will have to think of how to fix that and how to install the Perl packages through cpan.