diff --git a/CHANGELOG.md b/CHANGELOG.md index a7bc02846..797a9a049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # News -## v0.4.1-dev +## v0.4.1 +- `apply_single_*` are not exported anymore, as `sX`/`sY`/`sZ` are cleaner choices. - Faster single-qubit projections with `projectX!`, `projectY!`, `projectZ!`. - Move circuit plotting with `Quantikz.jl` to `QuantumCliffordPlots.jl` - Random states with zeroed phases with `phases=false`. diff --git a/Project.toml b/Project.toml index b664a4922..0387b76b8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "QuantumClifford" uuid = "0525e862-1e90-11e9-3e4d-1b39d7109de1" authors = ["Stefan Krastanov "] -version = "0.4.1-dev" +version = "0.4.1" [deps] Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" diff --git a/src/QuantumClifford.jl b/src/QuantumClifford.jl index b9ee41ac6..2291afec7 100644 --- a/src/QuantumClifford.jl +++ b/src/QuantumClifford.jl @@ -33,7 +33,6 @@ export @P_str, PauliOperator, ⊗, I, X, Y, Z, permute, tensor, tensor_pow, stab_to_gf2, gf2_gausselim!, gf2_isinvertible, gf2_invert, gf2_H_to_G, single_z, single_x, single_y, - apply_single_z!, apply_single_x!, apply_single_y!, random_invertible_gf2, random_pauli, random_stabilizer, random_destabilizer, random_clifford, bell, ghz, diff --git a/src/experimental/NoisyCircuits.jl b/src/experimental/NoisyCircuits.jl index ce064d3c8..510d35c47 100644 --- a/src/experimental/NoisyCircuits.jl +++ b/src/experimental/NoisyCircuits.jl @@ -6,7 +6,7 @@ module NoisyCircuits #TODO permit the use of alternative RNGs using QuantumClifford -using QuantumClifford: AbstractStabilizer, AbstractCliffordOperator +using QuantumClifford: AbstractStabilizer, AbstractCliffordOperator, apply_single_x!, apply_single_y!, apply_single_z! using StatsBase: countmap using Combinatorics: combinations diff --git a/src/symbolic_cliffords.jl b/src/symbolic_cliffords.jl index 77d3f4685..a208aee1a 100644 --- a/src/symbolic_cliffords.jl +++ b/src/symbolic_cliffords.jl @@ -423,7 +423,7 @@ end # TODO is there a reason to keep these given that sZ/sX/sY exist? # TODO currently these are faster than sZ/sX/sY -"""Apply a Pauli Z to the `i`-th qubit of state `s`. You might prefer to use `sZ` instead of this.""" +"""Apply a Pauli Z to the `i`-th qubit of state `s`. You should use `apply!(stab,sZ(i))` instead of this.""" function apply_single_z!(stab::AbstractStabilizer, i) s = tab(stab) Tme = eltype(s.xzs) @@ -438,7 +438,7 @@ function apply_single_z!(stab::AbstractStabilizer, i) stab end -"""Apply a Pauli X to the `i`-th qubit of state `s`. You might prefer to use `sX` instead of this.""" +"""Apply a Pauli X to the `i`-th qubit of state `s`. You should use `apply!(stab,sX(i))` instead of this.""" function apply_single_x!(stab::AbstractStabilizer, i) s = tab(stab) Tme = eltype(s.xzs) @@ -453,7 +453,7 @@ function apply_single_x!(stab::AbstractStabilizer, i) stab end -"""Apply a Pauli Y to the `i`-th qubit of state `s`. You might prefer to use `sY` instead of this.""" +"""Apply a Pauli Y to the `i`-th qubit of state `s`. You should use `apply!(stab,sY(i))` instead of this.""" function apply_single_y!(stab::AbstractStabilizer, i) s = tab(stab) Tme = eltype(s.xzs) diff --git a/test/runtests.jl b/test/runtests.jl index c016cc1ac..04228777b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,7 @@ using Test, Random using QuantumClifford using QuantumClifford: stab_looks_good, mixed_stab_looks_good, destab_looks_good, mixed_destab_looks_good +using QuantumClifford: apply_single_x!, apply_single_y!, apply_single_z! using QuantumClifford: mul_left! using QuantumClifford: perm_inverse using LinearAlgebra: inv @@ -40,4 +41,4 @@ doset("graphs") && include("./test_graphs.jl") doset("doctests") && include("./doctests.jl") using Aqua -doset("aqua") && Aqua.test_all(QuantumClifford, ambiguities=false,project_toml_formatting=false) \ No newline at end of file +doset("aqua") && Aqua.test_all(QuantumClifford, ambiguities=false,project_toml_formatting=false) diff --git a/test/test_noisycircuits.jl b/test/test_noisycircuits.jl index b74eaca5b..f900f7223 100644 --- a/test/test_noisycircuits.jl +++ b/test/test_noisycircuits.jl @@ -1,5 +1,4 @@ using QuantumClifford.Experimental.NoisyCircuits -using Quantikz: circuit2string, QuantikzOp import AbstractAlgebra function test_noisycircuits()