diff --git a/docs/make.jl b/docs/make.jl index 3496007..adc93d8 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -48,6 +48,7 @@ function main() "references.md", "API" => "API.md", "CircuitZoo API" => "API_CircuitZoo.md", + "StatesZoo API" => "API_StatesZoo.md", "Bibliography" => "bibliography.md", ], ] diff --git a/docs/src/API_CircuitZoo.md b/docs/src/API_CircuitZoo.md index ba2083a..48a41c2 100644 --- a/docs/src/API_CircuitZoo.md +++ b/docs/src/API_CircuitZoo.md @@ -9,7 +9,7 @@ ``` -## Autogenerated API list for `QuantumClifford.CircuitZoo` +## Autogenerated API list for `QuantumSavory.CircuitZoo` ```@autodocs Modules = [QuantumSavory.CircuitZoo] diff --git a/docs/src/API_StatesZoo.md b/docs/src/API_StatesZoo.md new file mode 100644 index 0000000..63dbb29 --- /dev/null +++ b/docs/src/API_StatesZoo.md @@ -0,0 +1,17 @@ +# Available States + +```@raw html + +``` + +## Autogenerated API list for `QuantumSavory.StatesZoo` + +```@autodocs +Modules = [QuantumSavory.StatesZoo] +Private = false +``` \ No newline at end of file diff --git a/src/StatesZoo/StatesZoo.jl b/src/StatesZoo/StatesZoo.jl index fd1629a..2c87d15 100644 --- a/src/StatesZoo/StatesZoo.jl +++ b/src/StatesZoo/StatesZoo.jl @@ -1,5 +1,6 @@ module StatesZoo +using DocStringExtensions using QuantumSymbolics, QuantumOpticsBase using QuantumSymbolics: withmetadata, @withmetadata, Metadata import QuantumSymbolics: express_nolookup diff --git a/src/StatesZoo/single_dual_rail_midswap/single_dual_rail_midswap.jl b/src/StatesZoo/single_dual_rail_midswap/single_dual_rail_midswap.jl index a5dc4ec..ccaa1b8 100644 --- a/src/StatesZoo/single_dual_rail_midswap/single_dual_rail_midswap.jl +++ b/src/StatesZoo/single_dual_rail_midswap/single_dual_rail_midswap.jl @@ -28,6 +28,12 @@ function midswap_dual_rail(eA,eB,gA,gB,Pd,Vis) end """ +$TYPEDEF + +Fields: + +$FIELDS + Generates the spin-spin density matrix for linear photonic entanglement swap with emissive memories emitting single rail photonic qubits from the paper [prajit2023entangling](@cite) It takes the following parameters: @@ -35,6 +41,14 @@ It takes the following parameters: - gA, gB: Memory initialization parameter for memories A and B - Pd: Detector dark count probability per photonic mode (assumed to be the same for both detectors) - Vis: Interferometer visibility for the midpoint swap' can be complex to account for phase instability + +```jldoctest +julia> r = Register(2) + +julia> initialize!(r[1:2], SingleRailMidSwapBell(0.9, 0.9, 0.5, 0.5, 1e-8, 0.99)) + +julia> observable(r[1:2], Z⊗Z) +``` """ @withmetadata struct SingleRailMidSwapBell <: AbstractTwoQubitState eA::Float64 @@ -49,6 +63,12 @@ symbollabel(x::SingleRailMidSwapBell) = "ρˢʳᵐˢ" """ +$TYPEDEF + +Fields: + +$FIELDS + Generates the spin-spin density matrix for linear photonic entanglement swap with emissive memories emitting dual rail photonic qubits from the paper [prajit2023entangling](@cite). It takes the following parameters: @@ -56,6 +76,14 @@ Generates the spin-spin density matrix for linear photonic entanglement swap wit - gA, gB: Memory initialization parameter for memories A and B - Pd: Detector dark count probability per photonic mode (assumed to be the same for both detectors) - Vis: Interferometer visibility for the midpoint swap + +```jldoctest +julia> r = Register(2) + +julia> initialize!(r[1:2], DualRailMidSwapBell(0.9, 0.9, 0.5, 0.5, 1e-8, 0.99)) + +julia> observable(r[1:2], Z⊗Z) +``` """ @withmetadata struct DualRailMidSwapBell <: AbstractTwoQubitState eA::Float64 diff --git a/src/StatesZoo/zalm_pair/zalm_pair.jl b/src/StatesZoo/zalm_pair/zalm_pair.jl index 37db62b..49660d6 100644 --- a/src/StatesZoo/zalm_pair/zalm_pair.jl +++ b/src/StatesZoo/zalm_pair/zalm_pair.jl @@ -562,6 +562,12 @@ end """ +$TYPEDEF + +Fields: + +$FIELDS + Generate symbolic object for the spin-spin density matrix for a cascaded source swapped with emissive spin memories. The cascaded source from papers [prajit2022heralded](@cite) and [kevin2023zero](@cite) @@ -579,6 +585,13 @@ It takes the following parameters: - Pdo1: dark click probability per photonic mode on Alice side swap - Pdo2: dark click probability per photonic mode on Bob side swap - VisF: product of visibilities of all three interferometers (Allowed range: [0,1]) + +```jldoctest +julia> r = Register(2) + +julia> initialize!(r[1:2], ZALMSpinPair(1e-3, 0.5, 0.5, 1, 1, 1, 1, 0.9, 1e-8, 1e-8, 1e-8, 0.99)) + +juilia> observable(r[1:2], Z⊗Z) ``` """ @withmetadata struct ZALMSpinPair <: AbstractTwoQubitState