Skip to content

Commit

Permalink
Merge pull request #96 from hongyehu/main
Browse files Browse the repository at this point in the history
add all2all interaction in Rydberg atom chain system
  • Loading branch information
aarontrowbridge authored May 17, 2024
2 parents 4e12a85 + d03228e commit eb9506b
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions src/quantum_system_templates/rydberg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,32 @@ function lift(x::Char,i::Int, N::Int)
return join(qubits)
end


function RydbergChainSystem(;
N::Int=3, # number of atoms
C::Float64=862690*2π,
distance::Float64=10.0, # μm
distance::Float64=8.7, # μm
cutoff_order::Int=1, # 1 is nearest neighbor, 2 is next-nearest neighbor, etc.
local_detune::Bool=false,
all2all::Bool=true,
)
PAULIS = Dict("I" => [1 0; 0 1], "X" => [0 1; 1 0], "Y" => [0 -im; im 0], "Z" => [1 0; 0 -1], "n" => [0 0; 0 1])
if cutoff_order == 1
H_drift = sum([C*kron_from_dict(generate_pattern(N,i),PAULIS)/(distance^6) for i in 1:N-1])
elseif cutoff_order == 2
H_drift = sum([C*kron_from_dict(generate_pattern(N,i),PAULIS)/(distance^6) for i in 1:N-1])
H_drift += sum([C*kron_from_dict(generate_pattern_with_gap(N,i,1),PAULIS)/((2*distance)^6) for i in 1:N-2])
if all2all
H_drift = zeros(ComplexF64, 2^N, 2^N)
for gap in 0:N-2
for i in 1:N-gap-1
H_drift += C*kron_from_dict(generate_pattern_with_gap(N,i,gap),PAULIS)/(((gap+1)*distance)^6)
end
end
else
error("Higher cutoff order not supported")
if cutoff_order == 1
H_drift = sum([C*kron_from_dict(generate_pattern(N,i),PAULIS)/(distance^6) for i in 1:N-1])
elseif cutoff_order == 2
H_drift = sum([C*kron_from_dict(generate_pattern(N,i),PAULIS)/(distance^6) for i in 1:N-1])
H_drift += sum([C*kron_from_dict(generate_pattern_with_gap(N,i,1),PAULIS)/((2*distance)^6) for i in 1:N-2])
else
error("Higher cutoff order not supported")
end
end
H_drives = Matrix{ComplexF64}[]
# Add global X drive
Expand All @@ -81,11 +92,14 @@ function RydbergChainSystem(;
:distance => distance,
:cutoff_order => cutoff_order,
:local_detune => local_detune,
:all2all => all2all,
)
return QuantumSystem(
H_drift,
H_drives;
constructor=RydbergChainSystem,
params=params,
)
end
end


0 comments on commit eb9506b

Please sign in to comment.