A Quantum Engineering Focused Linux Distro From Scratch — Day 4

Marcus Edwards
2 min readJan 13, 2023

--

The task for me today was to begin on a tarball server for QC packages available in systems languages like C and Perl. It is debatable whether Python is in this category but for now I am not including it.

I’d written a small AWS lambda function whose job was to read RSS feeds in the past (here) so I decided it would be easy to write something that consumed the RSS release update feeds on QC projects’ GitHub repos.

Here is a quick Python script for creating a quantum-specific file like wget-list-sysv. In future installations I’ll work on expanding the list and re-write this in Rust since who needs Python when you’ve used it at your day job for years?

I referenced the GitHub tags RSS feed for qHiPSTER to write this small program.

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-US">
<id>tag:github.com,2008:https://github.com/intel/intel-qs/releases</id>
<link type="text/html" rel="alternate" href="https://github.com/intel/intel-qs/releases"/>
<link type="application/atom+xml" rel="self" href="https://github.com/intel/intel-qs/releases.atom"/>
<title>Tags from intel-qs</title>
<updated>2019-12-12T18:15:09-08:00</updated>
<entry>
<id>tag:github.com,2008:Repository/242080770/v2.0.0-beta</id>
<updated>2019-12-12T18:15:09-08:00</updated>
<link rel="alternate" type="text/html" href="https://github.com/intel/intel-qs/releases/tag/v2.0.0-beta"/>
<title>v2.0.0-beta: Major feature updates to Intel-QS.</title>
<content type="html">&lt;p&gt;Major feature updates to Intel-QS.&lt;/p&gt;
&lt;p&gt; - New CMake 3.15 based build system with auto-dependency checking.
&lt;br /&gt; - Remove dependency on Intel proprietary compiler tools.
&lt;br /&gt; - Added new quantum algorithm example files and tutorials.
&lt;br /&gt; - Adds capability to build within Docker images for Cloud enabling.
&lt;br /&gt; - Adds a Python interface for seamless integration with other
&lt;br /&gt; quantum frameworks.
&lt;br /&gt; - Performance improvements.
&lt;br /&gt; - Easier MPI/MKL/OpenMP/TBB selection for performance tuning.&lt;/p&gt;</content>
</entry>
</feed>
import logging
import feedparser

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"
# TODO: add all packages in C, Rust, Perl lists @ https://quantiki.org/wiki/list-qc-simulators
]

file = open("quantum_packages", "w")

for source in SOURCES:
try:
if ".atom" in source:
releases = feedparser.parse(source).entries
release = releases[0]

version = release.id.split(",")[-1].split("/")[-1]
url = "/".join(source.split("/")[:-1]) + "/archive/refs/tags/" + version + ".tar.gz"
elif ".tar.gz" in source:
url = source

logger.info("Found source: {0}".format(url))
file.write(url + "\r\n")

except Exception as e:
logger.error(str(e))

file.close()

A program a day keeps unemployment away.

sudo apt-get install python3-pip
pip install feedparser
marcuse@redblue:~/Documents/package-updater$ python3 updater.py
marcuse@redblue:~/Documents/package-updater$ ls
quantum_packages updater.py
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

--

--

No responses yet