Quantum Computing, Quantum Computer, Simulator, From Scratch.
venerable Hadamard gate. (define ((apply-op op-matrix) q) (matrix* op-matrix q)) (define pauli-x (matrix [[0 1] [1 0]])) (define gX (apply-op pauli-x)) (define pauli-z (matrix [[1 0] [0 -1]])) (define gZ (apply-op pauli-z)) (define pauli-y (matrix [[0 0-i] [0+i 0]])) (define gY (apply-op pauli-y))