Package: quantumaudio
quantumaudioQuantumaudio Module: A Python package for Quantum Representations of Audio in qubit systems & examplesquantumaudiois 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 itmightalso 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 toFRQIquantum image representations)QSM - Quantum State Modulation (also known asFRQAin the literature)For an introduction to quantum audio please refer to the book chapterQuantum Representations of Sound: From Mechanical Waves to Quantum Circuitsby Paulo V. Itaboraí and Eduardo R. Miranda (draft versionavailable at ArXiV). The chapter also discusses QPAM, SQPAM and QSM, and glances over methods to implement quantum audio signal processing.Additional documentaion is availableherealong with a Jupyter Notebooktutorialshowing how the main methods work and general implementation workflow with the package. Additionally, to listen the results, there is a set ofexamplesfor interfacing the quantum circuits withSuperCollider, a powerful synthesis engine for live musical applications.DependenciesThequantumaudiopackage alone has the following dependencies:qiskit (the quantum programming framework)numpymatplotlibbitstring (for decoding purposes)ipython (for listening purposes inside jupyter notebooks)For running thesupercollider examples, additional packages are needed:SuperCollider scsynth (install SuperCollider)Cythonpyliblopython-supercollider client(pip install supercollider)InstallationThis python module is distributed as a package in PyPi. It can be installed in any operating system by usingpipin a console or terminal:Windowspip install quantumaudioMac & Linuxpip3 install quantumaudioOptionally, you can download the latestrelease, 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:Windowspip install quantumaudio[examples]Mac & Linuxpip3 install quantumaudio[examples]Jupyter Notebook ExamplesIdeally, you wouldpip installthe package in your own python environment and then download the latest example/tutorial files from thereleasespage.NOTEThere is a known bug when installingpyliblopackages throughpip install quantumaudio[examples]in some systems. A temporary workaround is shownhere.UsageTo learn how to use this module, refer to thetutorialnotebook.Both the tutorial and supercollider examples were written asJupyter Notebooksthat can be read inside this repo, or run in your local Jupyter Notebook server.Feedback and Getting helpPlease open anew issue, to help improve the code. They are most welcome.You may gain insight by learning more aboutQiskitandSuperCollider. We also strongly reccomend the reading of theQuantum Representations of Soundbook chapter for a better understanding of quantum representations of audio.API ReferenceMost methods and functions in the module contain docstrings for better understanding the implementation. This API documentation is available and readablehere.ContributingClone/Fork this repo and help contributing to the code! Pull Requests are very welcome. You can also contact themain authorto exchange ideas (highly reccomended). Make sure to install the[dev]and[doc]optional dependencies for running necessarypytests.AcknowledgementsThis repo was created by the quantum computer music team at theInterdisciplinary Centre for Computer Music Research (ICCMR), University of Plymouth, UK.Paulo Itaboraíis the lead developer.See also theQuTune Projectrepository for other resources developed by the ICCMR group.quantumaudiohas anMIT license. If you use this code in your research or art, please cite it according to thecitation 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.