All Projects → avalon-lang → avaloni

avalon-lang / avaloni

Licence: MIT license
Interpreter of the Avalon programming language.

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to avaloni

vein
🔮⚡️Vein is an open source high-level strictly-typed programming language with a standalone OS, arm and quantum computing support.
Stars: ✭ 31 (+121.43%)
Mutual labels:  interpreter, quantum-computing
snabl
a Lispy Forth in C++
Stars: ✭ 21 (+50%)
Mutual labels:  interpreter
sturdy
Sturdy is a library for developing sound static analyses in Haskell.
Stars: ✭ 49 (+250%)
Mutual labels:  interpreter
feynman path
Visualization tool for the Feynman Path Integral applied to quantum circuits
Stars: ✭ 33 (+135.71%)
Mutual labels:  quantum-computing
QuAlgorithmZoo.jl
A curated implementation of quantum algorithms with Yao.jl
Stars: ✭ 78 (+457.14%)
Mutual labels:  quantum-computing
Tutorials
This repository contains study material that EPFL, Harvard, MIT Quantum Computing associations and others provide to the students as training and practice.
Stars: ✭ 34 (+142.86%)
Mutual labels:  quantum-computing
LLVM-JVM
[W.I.P] A Just-In-Time Java Virtual Machine written in Haskell
Stars: ✭ 22 (+57.14%)
Mutual labels:  interpreter
wizard-engine
Research WebAssembly Engine
Stars: ✭ 164 (+1071.43%)
Mutual labels:  interpreter
molt
Embeddable TCL Interpreter for Rust applications
Stars: ✭ 86 (+514.29%)
Mutual labels:  interpreter
sigmastate-interpreter
ErgoScript compiler and ErgoTree Interpreter implementation for Ergo blockchain
Stars: ✭ 56 (+300%)
Mutual labels:  interpreter
public research
Publicly available research done by BOHR.TECHNOLOGY.
Stars: ✭ 16 (+14.29%)
Mutual labels:  quantum-computing
qc portfolio optimization
A program that implements the portfolio optimization experiments using a hybrid quantum computing algorithm from arXiv:1911.05296. The code was developed as part of the 2020 Quantum mentorship program. Many thanks to my mentor Guoming Wang from Zapata Computing!
Stars: ✭ 21 (+50%)
Mutual labels:  quantum-computing
qcor
C++ compiler for heterogeneous quantum-classical computing built on Clang and XACC
Stars: ✭ 78 (+457.14%)
Mutual labels:  quantum-computing
lispy
LISP interpreter in Python
Stars: ✭ 31 (+121.43%)
Mutual labels:  interpreter
malbolge
A Malbolge implementation and interpreter in Rust.
Stars: ✭ 23 (+64.29%)
Mutual labels:  interpreter
Qu.js
Quantum Computing for Humans!
Stars: ✭ 15 (+7.14%)
Mutual labels:  quantum-computing
kiwi-8
CHIP-8 interpreter for Windows and MacOS
Stars: ✭ 16 (+14.29%)
Mutual labels:  interpreter
IBM-Quantum-QCE20-Tutorials
Repository of code notebooks for tutorials at IEEE Quantum Week (QCE20) https://qce.quantum.ieee.org/tutorials/
Stars: ✭ 38 (+171.43%)
Mutual labels:  quantum-computing
qiskit.org
The Qiskit official website
Stars: ✭ 85 (+507.14%)
Mutual labels:  quantum-computing
A-quantum-inspired-genetic-algorithm-for-k-means-clustering
Implementation of a Quantum inspired genetic algorithm proposed by A quantum-inspired genetic algorithm for k-means clustering paper.
Stars: ✭ 28 (+100%)
Mutual labels:  quantum-computing

Avalon - A classical-quantum programming language

Quantum computing is progressing slowly but surely. And as it progresses, tools are going to be needed to program quantum computers.

Avalon is a programming language aimed at a specific class of quantum computers called classical-quantum hybrid quantum computers. A hybrid classical-quantum computer has the property of having a classical computer driving (telling) the quantum computer what to do. These computers are being built by IBM and Rigetti and Avalon seeks to target both, starting with Rigetti.

Currently, all you will get is an interpreter to start prototyping on your own system while I'm working on generating QUIL (Rigetti) code. The documentation can be found at Read The Docs and please do look in the tests/integration folder for sample code to run.

Why Avalon

Quantum computing is progressing and it needs tools among which programming languages are going to play a vital role. Yes, there exists other programming languages that target hybrid classical-quantum computers but I have found them to be lacking in abstractions and many even exposing hardware primitives making them unfriendly to the novice developer.

Even more important, as we approach the NISQ era, compilers are going to play a vital role in the optimisation of quantum programs when we have little to no error correction built into the hardware. It is the hope that Avalon will come out as the leading programming language for writing programs meant for near-term quantum computers.

What it looks like

Avalon sample program in my editor

State of the project

Currently, the classical part is close to 90% finished (excluding known bugs). The missing feature is pointer types. Getters and setters are being reworked into a better form. Otherwise the rest works as intended.

The quantum part, 1-Qubit data types and gates that act on them are implemented and can be tested. The 2-Qubits, 4-Qubits and 8-Qubits data types are implemented but gates that operate on them are still missing but upcoming.

Show me the code

Please find below the teleportation code found in tests/integration/quantum/teleportation.avl reproduced for your copy-paste-run pleasure.

import io
import quant

def __main__ = (val args : [string]) -> void:
    -- initialize quantum variables
    val source = 0q1,
        destination = 0q0,
        ancilla = 0q0

    -- create an entanglement between the destination and the ancilla
    Quant.had(ref destination)
    Quant.cx(ref destination, ref ancilla)

    -- perform the teleportation
    Quant.cx(ref source, ref ancilla)
    Quant.had(ref source)

    -- measure the source and the ancilla
    var source_bit = cast(ref source) -> bit,
        ancilla_bit = cast(ref ancilla) -> bit

    -- perform phase correction on the destination
    if source_bit == 0b1:
        Quant.pz(ref destination)
    if ancilla_bit == 0b1:
        Quant.px(ref destination)

    -- measure and print the destination which should contain <0q1>
    var destination_bit = cast(ref destination) -> bit
    Io.println(string(destination_bit))

    return

Installation

Currently, installation can only happen from source and the code has only been tested on a Linux system.
Installation directions can be found at installing Avalon.

Documentation

Documentation is currently being written as the language evolves.
You can find the documentation at Read The Docs.

Contributing

Thank you for considering it. Please see the contribution guidelines for help on contributing.

Contact

You can reach me at [email protected]

License

This code is licensed under the MIT license. Please see the LICENSE file for the terms.

Acknowledgement

Development of Avalon is being supported by the Unitary Fund grant. My thanks to Will J. Zeng for running the program.

Copyright

Copyright (c) 2018 Ntwali Bashige Toussaint

In case you found code that is yours and I failed to give attribution or I am claiming copyright of the code, please do email me to resolve the issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].