Skip to content

Instantly share code, notes, and snippets.

@caryan
caryan / stim_sampling_batch_size_optimisation
Created April 29, 2025 17:27
Stim + decoding batch size optimisation
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import plotly.colors as pc
from tqdm.auto import tqdm
from sinter._decoding._decoding_pymatching import PyMatchingDecoder
from sinter._decoding._stim_then_decode_sampler import StimThenDecodeSampler
@caryan
caryan / Where to measure a Ramsey curve.ipynb
Created July 2, 2020 03:58
The tradeoff between sensitivity and projection noise in the optimal sampling time for a Ramsey experiment
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caryan
caryan / Timing Small Functions.ipynb
Created June 19, 2020 04:08
Measuring Python function call overhead
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caryan
caryan / Quantum Optimal Control with SciML.ipynb
Created June 10, 2020 04:32
Quantum Optimal Control with SciML and Julia
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caryan
caryan / ModelingToolkit Manual CSE.ipynb
Created May 20, 2020 21:17
Demonstrate how manual CSE can speed up ModelingToolkit ODE functions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caryan
caryan / Savitsky Golay.ipynb
Last active February 28, 2020 05:43
Two approaches to Savitsky Golay filtering in Julia
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caryan
caryan / pylint_to_gitlab_codeclimate.py
Last active June 12, 2025 01:37
Convert pylint output to simplified CodeClimate JSON suitable for Gitlab Code Quality checks
import hashlib
import html
import json
import sys
from typing import Optional
from pylint.reporters import JSONReporter
from pylint.lint import Run
# map pylint categories to CodeClimate severity
@caryan
caryan / Compiling QAOA with CZ and iSWAP.ipynb
Created November 20, 2019 04:50
fully connected Ising QAOA mapped to a line with CZ and iSWAP
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caryan
caryan / keybase.md
Created December 9, 2016 02:28
Identity claim for keybase.io

Keybase proof

I hereby claim:

  • I am caryan on github.
  • I am caryan (https://keybase.io/caryan) on keybase.
  • I have a public key whose fingerprint is 437A E338 3B0B DB58 2F86 1E08 DE63 FA60 3D8F 1124

To claim this, I am signing this object:

@caryan
caryan / variant_calling.jl
Created May 30, 2016 00:29
Julia script wrapping a Picard and GATK variant calling pipeline
using Glob
using DataFrames
const PICARD = "/home/cryan/Downloads/picard-tools-2.1.0/picard.jar"
const GATK = "/home/cryan/Downloads/GATK/GenomeAnalysisTK.jar"
function prepare_reference(ref)
#index the reference for bwa
run(`bwa index $ref.fasta`)
#sort the reference TODO: does it need to be sorted? .fai file seems minimal