Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Goerz goerz

View GitHub Profile
@goerz
goerz / profile_propagate.jl
Created Mar 26, 2022
Profile Newton Propagation
View profile_propagate.jl
# Include this file in a devrepl of
module TransmonModel
using LinearAlgebra
using SparseArrays
using QuantumControl.Shapes: flattop
const GHz = 2π
const MHz = 0.001GHz
const ns = 1.0
@goerz
goerz / extract_textblocks.py
Created Mar 24, 2022
Python script for extracting textblocks from Beamer presentations
View extract_textblocks.py
#!/usr/bin/env python
"""Extract textblocks from a Beamer presentation.
This is useful for making Powerpoint slides from Beamer presentations.
"""
import logging
import click
from pathlib import Path
PREAMBLE = r"""\documentclass[compress, aspectratio=169]{beamer}
@goerz
goerz / 2022-03-19_ChainRulesComplexDet.ipynb
Last active Mar 20, 2022
Analytical Reverse-AD for the determinant of a complex matrix (https://github.com/JuliaDiff/ChainRules.jl/issues/600)
View 2022-03-19_ChainRulesComplexDet.ipynb
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 Jan 16, 2022
Find a string in a deeply nested Julia data structure
View find.jl
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 Dec 16, 2021
Analytical solutions for the dynamics of a two-level system (Rabi cycling)
View +2021-12_RabiCycling_README.md
View +2021-12_Ramsey_README.md
View simple_state_to_state.jl
# 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 Oct 17, 2021
State-to-State optimization with GRAPE/LBFGS
View Manifest.toml
# 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 Aug 29, 2021
Generating Random Matrices with Normalized Spectral Ranges (Girko Circular Law)
View 2021-08-29_mg_random_matrices_circular_law.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 06_example_3states_benchmark.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.