Skip to content

Instantly share code, notes, and snippets.

View WrathfulSpatula's full-sized avatar
☮️
I miss you, I'm not gonna qrack; I love you, I'm not gonna qrack...

Daniel Strano WrathfulSpatula

☮️
I miss you, I'm not gonna qrack; I love you, I'm not gonna qrack...
View GitHub Profile
@WrathfulSpatula
WrathfulSpatula / quantum_supremacy_2019-10-30.txt
Created October 30, 2019 22:33
Provisional Qrack benchmarks, for review and discussion
TEST_CASE("test_quantum_supremacy", "[supreme]")
{
// This is an attempt to simulate the circuit argued to establish quantum supremacy.
const int depth = 20;
benchmarkLoop([](QInterfacePtr qReg, int n) {
// The test runs 2 bit gates according to a tiling sequence.
// The 1 bit indicates +/- column offset.
@WrathfulSpatula
WrathfulSpatula / tests.cpp
Last active April 29, 2019 13:19
Grover's search of an unstructured lookup table in Qrack
//////////////////////////////////////////////////////////////////////////////////////
//
// (C) Daniel Strano and the Qrack contributors 2017-2019. All rights reserved.
//
// This example highlights the ways Qrack has to use Grover's search on an unstructured
// lookup table.
//
// Line #82 starts the 'textbook' variant of Grover's search. Line #119 starts the
// unstructured lookup table variant. Line #167 starts a (commented-out) working
// VM6502Q assembly variant of the unstructured lookup table variant.
@WrathfulSpatula
WrathfulSpatula / Qrack_VC4CL_valgrind_output.txt
Last active February 2, 2019 21:18
Output of valgrind for VC4CL build of Qrack
==1557== Memcheck, a memory error detector
==1557== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1557== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==1557== Command: ./unittest --proc-opencl-single
==1557== Parent PID: 1553
==1557==
==1557== Invalid read of size 8
==1557== at 0x4865BC4: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so)
==1557== Address 0x4d0d910 is 24 bytes inside a block of size 31 alloc'd
==1557== at 0x4847D4C: operator new(unsigned int) (vg_replace_malloc.c:328)
@WrathfulSpatula
WrathfulSpatula / uniformly_controlled_bit_order.py
Created January 25, 2019 16:03
Demonstration of control bit ordering side effect in ProjectQ
import pytest
import projectq
from projectq import MainEngine
from projectq.backends import Simulator
from projectq.cengines import (AutoReplacer, DecompositionRuleSet, DummyEngine,
InstructionFilter)
from projectq.meta import Compute, Control, Uncompute
from projectq.ops import (All, Measure, Ry, Rz, UniformlyControlledRy,