Skip to content

QuantumBFS/YaoPastaQ.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YaoPastaQ

Stable Dev Build Status Coverage

Yao and PastaQ integration library.

Installation

YaoPastaQ is a   Julia Language   package. To install YaoPastaQ, please open Julia's interactive session (known as REPL) and press ] key in the REPL to use the package mode, then type the following command

pkg> add https://github.com/QuantumBFS/YaoPastaQ.jl

Usage

This package provides a PastaQ register called PastaQReg and some functions to work with it.

You can create a PastaQReg using

julia> using YaoPastaQ, Yao

julia> p = chain(3, put(1=>X), repeat(H,1:3))
nqubits: 3
chain
├─ put on (1)
│  └─ X
└─ repeat on (1, 2, 3)
   └─ H

julia> apply!(create_reg(3), p)
PastaQReg{ITensors.MPS}
    active qubits: 3/3

You can also use the genlist function, which can convert a block in Yao to a list which can be read and used by the functions of PastaQ

julia> list = genlist(chain(3, put(1=>X), repeat(Rz/3),1:3)))
4-element Vector{Any}:
 ("X", 1)
 ("Rz", 1, (ϕ = 1.0471975511965976,))
 ("Rz", 2, (ϕ = 1.0471975511965976,))
 ("Rz", 3, (ϕ = 1.0471975511965976,))

License

MIT License

Releases

No releases published

Packages

No packages published

Languages