Documentation | Build Status |
---|---|
CVsim.jl is a Julia package for simulating continuous variable quantum systems, with a focus on studying quantum information processing using bosonic codes such as Gottesman-Kitaev-Preskill (GKP), Cat or Binomial states. Unlike traditional approaches that employ the Fock basis representation of states, this package utilizes the first quantization method, specifically sampling the position or momentum quadratures.
- Simulation of continuous variable quantum systems
- Utilizes the first quantization approach for state and operator representation
- Emphasis on bosonic codes (e.g. Cat, GKP and Binomial codes), including some theoretically suggested and/or experimentally demonstrated protocols for:
- State preparation
- Error-correction and stabilization
- Fast calculation of the Wigner quasiprobability function using fast Fourier transfrom (FFT)
To use this package, you need to have Julia installed on your system. You can download Julia from the official website: https://julialang.org/
CVsim.jl should be available in the Julia General Registry such that its installation can simply be done by
using Pkg; Pkg.add("CVsim")
or through the package manager:
- Open a Julia REPL (Read-Eval-Print Loop) or a Julia IDE.
- Change the directory to the root of the cloned/downloaded repository.
- Enter the package manager by pressing
]
. - Activate the package by running the following command:
or alternatively (if you want the latest, potentially unstable, release)
add CVsim
add https://github.com/irojkov-ph/CVsim.jl
- After installation, exit the package manager by pressing
backspace
.
To use the package, follow these steps:
- Open a Julia REPL or a Julia IDE.
- Import the package:
using CVsim
- Create and initialize the parameters of a continuous variable quantum system:
P = CVsim_Parameters(qvec_min=..., qvec_max=..., n_points=..., b_prefered=...)
qvec_min
(Float): Minimum position.qvec_max
(Float): Maximum position.n_points
(Int): Number of points equidistantly distributed betweenqvec_min
andqvec_max
.encoding
(String): Preferred basis for state representation which is either"position"
or"momentum"
.
- Perform desired operations and calculations using the provided functions and methods.
For detailed documentation, please refer to the documentation folder in this repository.
using CVsim
# Create a continuous variable quantum system with default parameters
system = CVsim_Parameters()
# Initialize a default GKP state (which is a logical |0⟩ state)
GKP0 = prepare_GKP(P)
# Perform operations on the state
# ...
# Calculate the Wigner quasi probability function of the state
Wig = wignerify(GKP0)
# Plot the result (here we use the Plots.jl package for plotting)
using Plots; pyplot();
ticks = [ k*sqrt(pi) for k = div(P.b.xmin,sqrt(pi)):2:div(P.b.xmax,sqrt(pi)) ];
labels = [ string(round(k)) for k = div(P.b.xmin,sqrt(pi)):2:div(P.b.xmax,sqrt(pi)) ];
contourf(P.qvec, P.pvec, Wig, legend=false,
c=cgrad([:blue, :white, :red]),
clim=(-maximum(Wig),maximum(Wig)),
levels=200, framestyle = :box, aspect_ratio=1,
alpha=0.7,grid=true,gridalpha=1.0,
ylabel="p", ylim = (ticks[1],ticks[end]),
yticks=((ticks,labels)),
xlabel="q", xlim = (ticks[1],ticks[end]),
xticks=((ticks,labels))
)
This package was developed and employed for the first time for studying gates between two finite-energy GKP states (see Rojkov et al. (2023)). If you use this package in the context of a potential publication we would be pleased if you cite our work as well as the package itself using the following bibtex entries
@article{two_qubit_rojkov_2023,
title = {Two-qubit operations for finite-energy Gottesman-Kitaev-Preskill encodings},
author = {Ivan Rojkov and Paul Moser R\"{o}ggla and Martin Wagener and Moritz Fontbot\'{e}-Schmidt and Stephan Welte and Jonathan Home and Florentin Reiter},
journal = {arXiv:quant-ph/2305.05262},
year = {2023},
month = may,
}
@software{cvsim_rojkov_2024,
author = {Rojkov, Ivan},
title = {CVsim.jl: Continuous variable quantum system simulation package},
month = jul,
year = 2024,
publisher = {Zenodo},
version = {v0.1.0},
doi = {10.5281/zenodo.13127577},
url = {https://doi.org/10.5281/zenodo.13127577}
}
Contributions to this package are welcome! If you encounter any issues or have suggestions for improvements, please create a new issue in the issue tracker.
If you would like to contribute code, fork the repository, make your changes, and submit a pull request. Please ensure that your code follows the established coding style and is well-documented.
This package is distributed under the MIT License.