Skip to content

Instantly share code, notes, and snippets.

View ericvoorhis's full-sized avatar
🤪

Eric Voorhis ericvoorhis

🤪
View GitHub Profile
@ericvoorhis
ericvoorhis / grover_qutip.py
Created May 5, 2018 06:13 — forked from CatherineH/grover_qutip.py
Grover's search in qutip
from random import randint
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
from qutip import tensor, basis, hadamard_transform, identity
# initialize the |0> and |1> qubit states
zero = basis(2, 0)
one = basis(2, 1)
# how many times have we applied the oracle and diffuser?
@ericvoorhis
ericvoorhis / EndtimesCrowdsale.sol
Created December 12, 2017 23:22 — forked from endtimesnetwork/EndtimesCrowdsale.sol
Endtimes Crowdsale Contract
pragma solidity 0.4.17;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {