Skip to content

Instantly share code, notes, and snippets.

View goerz's full-sized avatar

Michael Goerz goerz

View GitHub Profile
@goerz
goerz / 2022-03-19_ChainRulesComplexDet.ipynb
Last active March 20, 2022 03:54
Analytical Reverse-AD for the determinant of a complex matrix (https://github.com/JuliaDiff/ChainRules.jl/issues/600)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goerz
goerz / find.jl
Created January 16, 2022 18:30
Find a string in a deeply nested Julia data structure
function find_string(obj, name::String, string::String)
for _name in propertynames(obj)
found = find_string(getproperty(obj, _name), name * "." * String(_name), string)
if !isnothing(found)
return found
end
end
end
function find_string(obj::String, name::String, string::String)
@goerz
goerz / +2021-12_RabiCycling_README.md
Last active December 16, 2021 03:10
Analytical solutions for the dynamics of a two-level system (Rabi cycling)
@goerz
goerz / +2021-12_Ramsey_README.md
Last active September 22, 2023 23:23
Ramsey Fringes
# Put this script in an empty folder, an inside the folder, run
#
# julia --project=.
# julia> include("simple_state_to_state.jl")
#
using Pkg
Pkg.add(url="https://github.com/JuliaQuantumControl/QuantumPropagators.jl.git", rev="da1dde1b1b3c7caa94be4aff5401669b2c7c8f2a")
Pkg.add(url="https://github.com/JuliaQuantumControl/QuantumControlBase.jl.git", rev="12ce4061fe8b67fe9e419e016b2631fbfbc1ba19")
Pkg.add(url="https://github.com/JuliaQuantumControl/GRAPE.jl.git", rev="d92c6e162a094c4590cbd668328ec349bfff0a0d")
Pkg.add(url="https://github.com/JuliaQuantumControl/QuantumControl.jl.git", rev="5b59c7b5c96280576d77d1d38697affa921c973d")
@goerz
goerz / Manifest.toml
Created October 17, 2021 06:19
State-to-State optimization with GRAPE/LBFGS
# This file is machine-generated - editing it directly is not advised
[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.1"
[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
@goerz
goerz / 2021-08-29_mg_random_matrices_circular_law.ipynb
Last active July 24, 2023 16:30
Generating Random Matrices with Normalized Spectral Ranges (Girko Circular Law)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goerz
goerz / arxiv_summarize.py
Created December 5, 2020 18:40
Python script for generating markdown/Obsidian summaries of arXiv files
#!/usr/bin/env python
"""Create markdown summaries from arXiv identifiers.
Test with::
pytest arxiv_summarize.py -s -x --doctest-modules
See ``--help`` for usage summary::
python arxiv_summarize.py --help
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.