Skip to content

Instantly share code, notes, and snippets.

View blakejohnson's full-sized avatar

Blake Johnson blakejohnson

View GitHub Profile
@blakejohnson
blakejohnson / Bernstein-Vazirani compiler optimization.ipynb
Last active November 5, 2021 17:58
A look at the effects of various compiler options on the performance of Bernstein-Vazirani on ibmq_jakarta
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blakejohnson
blakejohnson / Quantum Optimal Control with SciML-matplotlib.ipynb
Created July 30, 2020 12:53
An example of using SciML for quantum optimal control (courtesy of @caryan, but converted to use PyPlot)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blakejohnson
blakejohnson / my_socketpair.cpp
Created May 12, 2017 15:44
asio-based "socketpair" for Win32
#include <iostream>
#include <cstdint>
#include "asio.hpp"
using namespace std;
using asio::ip::tcp;
void my_socketpair(asio::io_service &ios, tcp::socket &s1, tcp::socket &s2) {
// uses a strategy cribbed from Cygwin to mimick a posix socket pair on win32

Keybase proof

I hereby claim:

  • I am blakejohnson on github.
  • I am blakejohnson (https://keybase.io/blakejohnson) on keybase.
  • I have a public key whose fingerprint is E85E 167F 23D8 E47D 1B9D 7271 C4B4 9D4E 4A9F 7F1F

To claim this, I am signing this object:

@blakejohnson
blakejohnson / DictManager.py
Created November 21, 2016 18:49
atom/enaml exception issue
from atom.api import (Atom, List, ContainerList, Dict, observe, Callable, Typed, Unicode)
import enaml
class DictManager(Atom):
"""
Control - Presenter for a dictionary of items.
i.e. give the ability to add/delete rename items
"""
@blakejohnson
blakejohnson / analysis.ipynb
Created December 1, 2014 17:21
Basic single-shot analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blakejohnson
blakejohnson / Coupled Duffing oscillators.ipynb
Created June 6, 2014 18:30
Coupled Duffing oscillators.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blakejohnson
blakejohnson / parseint_preamble.asm
Created December 16, 2013 18:35
Output of code_native(Base.parseint_preamble, (Bool, String, Int))
.section __TEXT,__text,regular,pure_instructions
Filename: string.jl
Source line: 1442
push RBP
mov RBP, RSP
push R15
push R14
push R13
push R12
push RBX
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
extern void dgeqrt3_(long * m, long *n, double * a, long *lda, double *t, long *ldt, long*info);
int main(int argc, char**argv)
{
int in, i;
long n,info=1;
int ct;
@blakejohnson
blakejohnson / compare.ipynb
Created October 10, 2013 15:39
Thresholding vs Soft-averaging --Marcus, Blake, and Colm
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.