Skip to content

Instantly share code, notes, and snippets.

View Arlen22's full-sized avatar

Arlen Beiler Arlen22

View GitHub Profile

Below is a more technical restatement and synthesis of the delayed-choice quantum eraser experiment, focusing on standard quantum-mechanical concepts such as the joint Hilbert space, measurement operators, partial traces, and conditional probabilities. It reiterates how the paradox of “seemingly retroactive choice” naturally arises from the entangled wavefunction and the way measurements are defined and correlated—without requiring backward causation.


1. Joint Hilbert Space and the Entangled State

  1. Hilbert Spaces:
    • Let (\mathcal{H}_\text{signal}) be the Hilbert space describing the signal photon’s degrees of freedom (e.g., path through slit (A) vs. slit (B), transverse momentum, polarization, etc.).
    • Let (\mathcal{H}_\text{idler}) be the Hilbert space describing the idler photon’s degrees of freedom.
@Arlen22
Arlen22 / result-operator-polyfill.js
Last active March 2, 2025 17:20
A "polyfill" with examples for the try operator
function try_(callback, thisarg) {
class Result {
constructor(ok, error, value) {
this.ok = ok
this.error = error
this.value = value
}
*[Symbol.iterator]() {
yield this.ok
yield this.error
@Arlen22
Arlen22 / notes.txt
Last active November 7, 2024 07:48
3dx SpacePilot vJoy python script
I think it only requires pywinusb, which can be installed via pip.
Credit to ChatGPT for filling in a lot of the blanks left by everyone's spotty python documentation.
These links were my starting point, but I don't think the vjoy part was from any of them.
https://github.com/JakubAndrysek/PySpaceMouse
https://forum.3dconnexion.com/viewtopic.php?t=3721
@Arlen22
Arlen22 / leftpad.js
Last active September 14, 2023 18:49
function leftpad(content, length, pad){
// make sure this is a proper string
content = String(content);
// get the pad character if set (or if zero)
pad = String(pad || pad === 0 ? pad : '')[0];
// get the extra length we need to add, but not less than zero if it's already longer
var left = Math.max(length-content.length, 0);
// voila!
return pad.repeat(left) + content;
}
@Arlen22
Arlen22 / Auto LCD configs.txt
Last active June 22, 2023 14:14
Space Engineers Vectors Script 3
Center <<Cargo>>
Cargoall {T:Large Cargo Container}
Inventoryx T:* +Ingot
Inventoryx T:* +ice
Center <<Tanks>>
Tanks T:* Hydrogen
Tanks T:* Oxygen
Powertime
Powerstored T:*
@Arlen22
Arlen22 / babel.config.js
Created December 20, 2019 18:46
Next.js config that keeps getting stale on Mac OS High Sierra 10.13.6
module.exports = {
presets: ['@expo/next-adapter/babel'],
plugins: [
[
'module-resolver',
{
alias: {
'assets': './assets',
'cache': './cache',
'src': './src'
@Arlen22
Arlen22 / webpack.config.js
Created June 1, 2019 03:43
TypeScript project files
const path = require('path');
module.exports = {
entry: './src/index.ts',
target: "node",
mode: "development",
devtool: 'inline-source-map',
watch: true,
module: {
rules: [
// Written by @Arlen22 for TiddlyServer, modified for TiddlyWiki
/*
Call loadTiddlyWiki to load the datafolder specified at the mount path specified and
return the SimpleServer instance to be used for handling requests.
Requests may be handled by calling server.requestHandler(req, res)
The event emitter is included for future use. Open an issue at Arlen22/TiddlyServer to discuss further use.
*/
exports.loadTiddlyWiki = function loadTiddlyWiki(mount, folder, callback) {
@Arlen22
Arlen22 / tuple.ts
Created June 26, 2017 23:12
Tuple nonsense
interface TupleConstructor {
new <T0>(item0: T0)
: [T0];
new <T0, T1>(item0: T0, item1: T1)
: [T0, T1];
new <T0, T1, T2>(item0: T0, item1: T1, item2: T2)
: [T0, T1, T2];
new <T0, T1, T2, T3>(item0: T0, item1: T1, item2: T2, tem3: T3)
: [T0, T1, T2, T3];
@Arlen22
Arlen22 / statFolder.ts
Created May 30, 2017 01:03
A rather obtuse RxJS operator to take a path and list all the folders in it, doing a stat on each one and checking whether it contains a certain file. It should use stat on the file instead of readdir on the folder, but I'm not using this code!
export function statFolderInBatch(subscriber, input: Observable<any>) {
const signal = new Subject<number>();
var count = 0;
//use set timeout to fire after the buffer recieves this item
const sendSignal = (item) => setTimeout(() => { count = 0; signal.next(item); });
return input.concatMap(([folder, tag]) => {
return obs_readdir({ folder, tag })(folder);
}).lift({
call: (subs: Subscriber<any>, source: Observable<any>) => {
const signalFunction = (count) => signal.mapTo(1), forwardWhenEmpty = true;