GPU support to Yao.jl.
We are in an early-release beta. Expect some adventures and rough edges.
In v1.0+, please type
] in the REPL to use the package mode, then type:
pkg> add Yao pkg> add CuYao
CuYao.jl provides only two new 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 Yao, CuYao cureg = rand_state(9, 1000) |> cu cureg |> put(9, 2=>Z) measure!(cureg |> addbit(1) |> focus!(4,1,3)) |> relax!
A List of Supported Gates
- general U(N) gate
- general U(1) gate
- better X, Y, Z gate
- better T, S gate
- SWAP gate
- better control gates
- BP diff blocks
Supported Register Operations
- measure!, measure_reset!, measure_remove!, select
- focus!, relax!
- statistic functional diff blocks
- expect for statistic functional
If you find an unsupported useful feature, welcome to file an issue or submit a PR.
To contribute to this project, please open an issue first to discuss with us in case we may not accept your PR.
This project is an effort of QuantumBFS, an open source organization for quantum science. All the contributors are listed in the contributors.
CuYao is released under the Apache 2 license.