Skip to content

Instantly share code, notes, and snippets.

@marekyggdrasil
marekyggdrasil / data1.p
Last active November 7, 2019 05:20
(1) keep increasing xi (2) for every xi increase nmax to nmax + 1 and expect same spectrum
@marekyggdrasil
marekyggdrasil / res_circuit.png
Last active November 13, 2019 10:40
Quantum random generation implemented with IBM Q's AER results with non-even distribution even without noise model. Opened issue is: https://github.com/Qiskit/qiskit-aer/issues/437
res_circuit.png
@marekyggdrasil
marekyggdrasil / plot_file_a.png
Last active December 2, 2019 01:57
Inconsistent Matplotlib behaviour, running script multiple times leads to different outcomes. Posted as question on StackOverflow under URL: https://stackoverflow.com/questions/59101292/matplotlib-randomly-ignored-passed-parameters-at-each-execution
plot_file_a.png
@marekyggdrasil
marekyggdrasil / figure.png
Last active April 2, 2020 13:47
An example how to simulate measurement with QuTip, an answer to https://quantumcomputing.stackexchange.com/a/11379/8883
figure.png

Keybase proof

I hereby claim:

  • I am marekyggdrasil on github.
  • I am renzokuken (https://keybase.io/renzokuken) on keybase.
  • I have a public key ASBlmYD61f2p1NbjpbpO7pCJH_4zOEmIbMry26gc4P7lIAo

To claim this, I am signing this object:

@marekyggdrasil
marekyggdrasil / phi1.cnf
Last active July 13, 2020 15:06
CNF files for online tutorial covering the concept of SAT and boolean satisfiability in general, tutorial available under https://mareknarozniak.com/2020/07/13/satisfiability/
p cnf 3 3
1 -2 3 0
1 2 -3 0
-1 -2 3 0
@marekyggdrasil
marekyggdrasil / index.js
Last active December 10, 2020 08:29
node.js example on how to connect to the grin-wallet owner API based on: it is a modified official example from here: https://github.com/mimblewimble/grin-wallet/tree/1ced8990b9e21fa17c788d93a151ec1164ebbce5/doc/samples/v3_api_node
/* Sample Code for connecting to the V3 Secure API via Node
*
* With thanks to xiaojay of Niffler Wallet:
* https://github.com/grinfans/Niffler/blob/gw3/src/shared/walletv3.js
*
*/
const http = require('http');
const crypto = require('crypto');
@marekyggdrasil
marekyggdrasil / gen.py
Created September 18, 2018 01:31
Example how to read/write large files in incremental way using cPickle. Run `gen.py` to generate a file containing list of integers then use `read.py` to read this list incrementally from the file.
import cPickle as pickle
import io
lst = range(16)
with io.open('list.p', 'wb') as f :
pickler = pickle.Pickler(f)
for l in lst :
pickler.dump(l)
@marekyggdrasil
marekyggdrasil / distrib.png
Last active January 27, 2021 13:21
A source code for a probability plots for a trustless Mimblewimble transaction aggregator based on scalable BFT https://mareknarozniak.com/2021/01/27/aggrematon/
distrib.png