Home

Awesome

Build status:

CUDA support for Yao.jl.

Only tested locally, expect some adventures and rough edges.

Installation

<p> CuYao is a &nbsp; <a href="https://julialang.org"> <img src="https://julialang.org/favicon.ico" width="16em"> Julia Language </a> &nbsp; package. It provides CUDA support for <a href="https://github.com/QuantumBFS/Yao.jl">Yao.jl</a>. To install CuYao, please <a href="https://docs.julialang.org/en/v1/manual/getting-started/">open Julia's interactive session (known as REPL)</a> and press <kbd>]</kbd> key in the REPL to use the package mode, then type the following command </p>

For stable release

pkg> add CuYao

For current master

pkg> add CuYao#master

You don't need to install Yao if you have CuYao installed. They share the same API except CUDA backend.

Documentation

For documentation of Yao, please refer to documentation (stable).

CuYao.jl provides only two extra APIs, reg |> cu to upload a register to GPU, and cureg |> cpu to download a register to CPU.

To start, see the following example

using CuYao

cureg = rand_state(9; nbatch=1000) |> cu   # or `curand_state(9; nbatch=1000)`.
cureg |> put(9, 2=>Z)
measure!(cureg |> append_qubits!(1) |> focus!(4,1,3))
cureg |> relax!(4,1,3) |> cpu

Constructors curand_state, cuzero_state, cuproduct_state, cuuniform_state and cughz_state are tailored for GPU, they are faster than uploading a CPU register to CPU.

Features

Supported Gates

Supported Register Operations

Other Operations

The Team

This project is an effort of QuantumBFS, an open source organization for quantum science. Yao is currently maintained by Xiu-Zhe (Roger) Luo and Jin-Guo Liu with contributions from open source community. All the contributors are listed in the contributors.

License

CuYao is released under the Apache 2 license.