Goose

A friendly OCaml environment for Quantum Computing

Simple

Quantum Computing might sound a little bit scary. Goose is designed with simplicity in mind, making it accessible to a wide audience ranging from students to advanced researchers.

Modular

The design of the library is highly modular, thanks to the use of OCaml functors. Combined with OCaml's strong typing, this enables you to customize the library to fit your needs.

Extensible

The functor-oriented style of Goose and its strongly-typed API is an ideal starting point for further extensions. From compilers to static analyzers, Goose gives you the basic building blocks you need to prototype new tools for quantum programming languages.


Circuit IR

Goose is an OCaml library to model, simulate, and compile quantum programs. At its core, it features a simple intermediate representation (IR) for quantum circuits. This IR can be targeted by compilers or used as an input for Goose's built-in simulator and compiler.

Open QASM

OpenQASM is an open source quantum assembly programming language to design quantum circuits. It is the de facto standard for interoperability of quantum computing tools. Goose supports OpenQASM 2.0 as an input language and features a compiler from OpenQASM to circuit IR.

Simulation

You don't have access to a Quantum Computer? Don't worry! Goose features an easy to use quantum simulator. Goose's simulator takes IR circuits as an input and simulates their execution on real quantum hardware. The result of the simulation is returned as a straightforward array of complex numbers.

Compilation to C

Large circuits with a lot of qbits can take a long time to simulate. When performance is important, Goose can compile circuits to efficient C code. The C translation is performed by symbolic simulation of the circuit.