From c6e2fc7ac3d4dc00bdd5c5a6d060e6e9f55eee23 Mon Sep 17 00:00:00 2001 From: Ivan Rojkov Date: Mon, 29 Jul 2024 22:00:31 +0200 Subject: [PATCH] Change minor comments in the source code --- src/CVsim.jl | 4 ++-- src/prepare_GKP.jl | 4 +--- src/wignerify.jl | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/CVsim.jl b/src/CVsim.jl index 465b25b..1c34415 100644 --- a/src/CVsim.jl +++ b/src/CVsim.jl @@ -5,11 +5,11 @@ module CVsim using Permutations using LinearAlgebra - # Parameters of the simulations + # Parameters of the CV simulations export CVsim_Parameters include("parameters.jl") - # Fast calculation of the Wigner quasiprobability + # Wigner quasiprobability functions export wignerify include("wignerify.jl") diff --git a/src/prepare_GKP.jl b/src/prepare_GKP.jl index 3937563..241e6a1 100644 --- a/src/prepare_GKP.jl +++ b/src/prepare_GKP.jl @@ -133,8 +133,6 @@ function albert_preparation(P::CVsim_Parameters; Δ::Float64 = 0.37, n_peaks::Int = 51, GKP_1::Bool = false) - - # displace(α) = exp(1im* √2 * dense( imag(α) * position(P.b) - real(α) * momentum(P.b) )) displace(α) = exp(-1im*imag(α)*real(α)) * LazyProduct( exp(1im*√2.0 * dense( imag(α)*position(P.b))), P.Tpm, @@ -238,7 +236,7 @@ function default_GKP_preparation(P::CVsim_Parameters; n_peaks::Int = 20 ) - # Determine the if one wants to create a minus state + # Determine if one wants to create a minus state minus_state = ( parity && (period == sqrt(pi)) ) parity_term(ind) = (-1)^(ind*minus_state) diff --git a/src/wignerify.jl b/src/wignerify.jl index 976d241..cb02b5d 100644 --- a/src/wignerify.jl +++ b/src/wignerify.jl @@ -39,7 +39,7 @@ function wignerify(mat::Matrix{ComplexF64}) # Some constants wig_Np = length(mat[:,1]) - wig_pshift = wig_Np ÷ 2 # integer division + wig_pshift = wig_Np ÷ 2 # Extract anti-diagonals from mat and organizing them in columns mat_skew = zeros(ComplexF64,(wig_Np, wig_Np)) @@ -59,7 +59,7 @@ function wignerify(mat::Matrix{ComplexF64}) # Fourier transform along the columns wigner = mapslices(x->fft_op*x, mat_skew; dims=1) - # execute a linear phase shift which is equivalent to a pixel shift on + # Execute a linear phase shift which is equivalent to a pixel shift on # mat_skew (but the even antidiagonals get a half-odd pixel shift) shift_amt = ([0:wig_Np-1;] .- (wig_pshift)) .* [0:2:2*wig_Np-2;]' wigner .*= exp.((2im*pi / wig_Np) .* shift_amt)