Download julia/bob_quantum.jl from Snapkitty/sov-kernel-monster: direct link, hf CLI and curl.
- Browser
- Download file 695 Bytes
-
https://huggingface.co/Snapkitty/sov-kernel-monster/resolve/main/julia/bob_quantum.jl
- Command line
-
hf download hf://Snapkitty/sov-kernel-monster/julia/bob_quantum.jl
-
curl -L -o bob_quantum.jl https://huggingface.co/Snapkitty/sov-kernel-monster/resolve/main/julia/bob_quantum.jl
695 Bytes
| module BobQuantum | |
| const LIBBOB = "libbob_quantum.so" | |
| export BobRNG, BobLattice, BobState, BobHamiltonian, | |
| RNG, Lattice, State, Hamiltonian, | |
| evolve!, energy, entropy, | |
| measure, measure_shots, | |
| normalize!, add_term!, expectation, | |
| evolve_exact!, evolve_trotter!, evolve_krylov! | |
| struct BobRNG | |
| handle::Ptr{Cvoid} | |
| function BobRNG(seed::UInt64) | |
| handle = ccall((:bob_rng_create, LIBBOB), Ptr{Cvoid}, (UInt64,), seed) | |
| obj = new(handle) | |
| finalizer(destroy, obj) | |
| return obj | |
| end | |
| end | |
| struct BobLattice | |
| handle::Ptr{Cvoid} | |
| function BobLattice(nx::Int, ny::Int, nz::Int, coupling::Float64, seed::UInt |