quantumaudio: A Python class implementation for Quantum Representations of Audio in Qiskit. Developed by the quantum computer music team at the Interdisciplinary Centre for Computer Music Research, University of Plymouth, UK
Quantumaudio Module: A Python package for Quantum Representations of Audio in qubit systems & examples
quantumaudio is a Python module with class implementations for building quantum circuits that encode and decode audio signals as quantum states. This is primarily aimed for quantum computing simulators, but it might also run on real quantum hardware. The main objective is to have a readily available tools for using quantum representations of audio in artistic contexts and for studying future Quantum Signal Processing algorithms for audio.
This package contains class implementations for generating quantum circuits from audio signals, as well as necessary pre and post processing functions.
It contatins implementations for three representation algorithms cited on the publication above, namely:
- QPAM - Quantum Probability Amplitude Modulation (Simple quantum superposition or "Amplitude Encoding")
- SQPAM - Single-Qubit Probability Amplitude Modulation (similar to FRQI quantum image representations)
- QSM - Quantum State Modulation (also known as FRQA in the literature)
For an introduction to quantum audio please refer to the book chapter Quantum Representations of Sound: From Mechanical Waves to Quantum Circuits by Paulo V. Itaboraí and Eduardo R. Miranda (draft version available at ArXiV). The chapter also discusses QPAM, SQPAM and QSM, and glances over methods to implement quantum audio signal processing.
Additional documentaion is available here along with a Jupyter Notebook tutorial showing how the main methods work and general implementation workflow with the package. Additionally, to listen the results, there is a set of examples for interfacing the quantum circuits with SuperCollider, a powerful synthesis engine for live musical applications.
quantumaudio package alone has the following dependencies:
- qiskit (the quantum programming framework)
- bitstring (for decoding purposes)
- ipython (for listening purposes inside jupyter notebooks)
For running the supercollider examples, additional packages are needed:
- SuperCollider scsynth (install SuperCollider)
- python-supercollider client (
pip install supercollider)
This python module is distributed as a package in PyPi. It can be installed in any operating system by using
pip in a console or terminal:
pip install quantumaudio
- Mac & Linux
pip3 install quantumaudio
Optionally, you can download the latest release, which also contains the examples and tutorial notebooks.
It is possible to install the additional python dependencies for running the supercollider examples automatically, by running the installation command with the
[examples] optional dependencies:
pip install quantumaudio[examples]
- Mac & Linux
pip3 install quantumaudio[examples]
Jupyter Notebook Examples
Ideally, you would
pip install the package in your own python environment and then download the latest example/tutorial files from the releases page.
There is a known bug when installing
pyliblo packages through
pip install quantumaudio[examples] in some systems. A temporary workaround is shown here.
To learn how to use this module, refer to the tutorial notebook.
Both the tutorial and supercollider examples were written as Jupyter Notebooks that can be read inside this repo, or run in your local Jupyter Notebook server.
Feedback and Getting help
Please open a new issue, to help improve the code. They are most welcome.
You may gain insight by learning more about Qiskit and SuperCollider. We also strongly reccomend the reading of the Quantum Representations of Sound book chapter for a better understanding of quantum representations of audio.
Most methods and functions in the module contain docstrings for better understanding the implementation. This API documentation is available and readable here.
Clone/Fork this repo and help contributing to the code! Pull Requests are very welcome. You can also contact the main author to exchange ideas (highly reccomended). Make sure to install the
[doc] optional dependencies for running necessary pytests.
This repo was created by the quantum computer music team at the Interdisciplinary Centre for Computer Music Research (ICCMR), University of Plymouth, UK. Paulo Itaboraí is the lead developer.
See also the QuTune Project repository for other resources developed by the ICCMR group.
quantumaudio has an MIT license. If you use this code in your research or art, please cite it according to the citation file.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for quantumaudio-0.0.2-py3-none-any.whl