Giter Site home page Giter Site logo

bollu / bollu.github.io Goto Github PK

View Code? Open in Web Editor NEW
359.0 359.0 23.0 477.05 MB

code + contents of my website, and programming life

Home Page: http://bollu.github.io/

Shell 6.03% CSS 0.26% Makefile 1.70% Haskell 0.13% C 63.61% M4 0.56% TeX 14.99% Perl 0.01% C++ 1.03% Python 1.86% Smalltalk 0.94% SuperCollider 0.02% LLVM 0.14% Assembly 0.02% Coq 0.02% CMake 0.01% APL 0.01% Roff 0.09% Jupyter Notebook 7.11% JavaScript 1.47%

bollu.github.io's People

Contributors

0xflotus avatar anurudhp avatar bollu avatar kimsey0 avatar kwalcock avatar mahmoudfarouq avatar meghprkh avatar njayinthehouse avatar projitb avatar sampwing avatar superty avatar tpetricek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bollu.github.io's Issues

Grobner basis is an overkill. It is a system of linear equations

Referring #computing-equivalent-gate-sets-using-grobner-bases.

The problem is a system of linear equations with 2^n - 2 variables a, axorb, axorc, etc. and 2^n - 1 equations (2^n equations with trivial 0 = 0 equation): 1*a + 1*b + 1*axorc + 1*bxorc = 1 (mod 8) for (a, b, c) = (1, 1, 0) etc.
For example n = 3:

A =
[1 0 1 0 1 0]
[0 1 1 0 0 1]
[1 1 0 0 1 1]
[0 0 0 1 1 1]
[1 0 1 1 0 1]
[0 1 1 1 1 0]
[1 1 0 1 0 0]

b = (0, 1, 1, 0, 1, 0, 0, 1)

I know nothing about Sage but I implement this: https://gist.github.com/pcpthm/9bf91ed750cb2b4abc4009475680d908.

Linear equation on integer (not necessary prime) modulo ring can be solved by modified Gaussian eliminations in O(N^3) time where N is size of matrix ~ 2^n. This is still exponential in term of n but considerably faster / less power. Probably specialized algorithm can be implemented via FFT-like or something with O(N^2 * poly(n)) runtime.

Perhaps the matrix can be analyzed to get the idea of general solution.

Website security errors

Hi there,

Followed a Hacker News link to your repo, but I noticed there are security errors on your blog page. Thought you would want to know.

Screenshot 2019-06-04 at 06 41 17

J Incunabulum

What is the t variable really tracking?

The t variable is the type of the array. In the Incunabulum there are only 2 types: unboxed, and boxed. See https://www.jsoftware.com/papers/AIOJ/typedefA.htm

How does one create a multi-dimensional array easily?

d=3,2
a=d#~6

What are some interesting programs one can run with this mini-interpreter?

Not any that couldn't be run with any other APL. Imo, the main value of the Incunabulum is just how it works.

J interpreter: meaning of `t`

What is the t variable really tracking?

Each value is either an array of numbers (t==0) or it is an array of boxes (t==1).
So t is the type of the scalars that make up the array.

The monadic box operator < converts a value into a box.

IMO, since I still don't understand all of the code.

Add a feed?

Hi! I am the editor of Haskell Weekly. An issue from a couple weeks ago (https://haskellweekly.news/issues/92.html) featured your most recent blog post. I would like to be notified when you write a new post, but as far as I can tell your blog does not have a feed. Would you mind adding an Atom or RSS feed? Thanks!

How does one work with arrays in a linear language?

Given an array of qubits xs: Qubit[], I want to switch to little endian. Due to no-cloning, I can't copy them! I suppose I can use recursion to build up a new "list". But this is not the efficient array version we know and love and want.

The code that I want to work but does not:

function switchEndian(xs: Qubit[]): Unit {
    for(i in 0..Length(xs) - 1) {
        Qubit q = xs[i]; // boom, this does not work!
        xs[i] = xs[Length(xs) - 1 - i]
        xs[Length(xs) - 1 - i] = q;
    }
}

You just need a linear swap function.

function switchEndian(xs: Qubit[]): Unit {
    for(i in 0..Length(xs) - 1) {
        swap(xs[i], xs[Length(xs) - 1 - i]);
    }
}

J interpreter: create a multidimensional array

My theory is that

2 2#~4

should produce a 2x2 matrix. It is only a theory, since I am so far unable to run the interpreter without it crashing. It seems to me that # is the APL "rho" operator and ~ is the APL "iota" operator.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.