This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numba import cuda | |
# Define Pauli matrices | |
sigma_x = np.array([[0, 1], [1, 0]], dtype=np.complex128) | |
sigma_z = np.array([[1, 0], [0, -1]], dtype=np.complex128) | |
# Define Hadamard gate | |
hadamard = (1 / np.sqrt(2)) * np.array([[1, 1], [1, -1]], dtype=np.complex128) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numba import jit, cuda, float64 | |
# Define the Hadamard gate matrix | |
hadamard = np.array([[1, 1], [1, -1]]) / np.sqrt(2) | |
# Define a function that will be accelerated by CUDA | |
@cuda.jit | |
def hadamard_gate_kernel(qubits, out): | |
tx = cuda.threadIdx.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config": { | |
"chainId": 36700, | |
"homesteadBlock": 0, | |
"eip150Block": 0, | |
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"eip155Block": 0, | |
"eip158Block": 0, | |
"byzantiumBlock": 0, | |
"constantinopleBlock": 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO [10-13|10:13:27.941] Starting Geth on Ethereum mainnet... | |
INFO [10-13|10:13:27.941] Bumping default cache on mainnet provided=1024 updated=4096 | |
DEBUG[10-13|10:13:27.941] Sanitizing Go's GC trigger percent=25 | |
INFO [10-13|10:13:27.943] Maximum peer count ETH=50 LES=0 total=50 | |
WARN [10-13|10:13:27.943] The flag --rpc is deprecated and will be removed in the future, please use --http | |
WARN [10-13|10:13:27.943] The flag --rpcaddr is deprecated and will be removed in the future, please use --http.addr | |
WARN [10-13|10:13:27.943] The flag --rpcapi is deprecated and will be removed in the future, please use --http.api | |
INFO [10-13|10:13:27.943] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory" | |
DEBUG[10-13|10:13:27.943] FS scan times list="41.175µs" set="4.178µs" diff="2.587µs" | |
TRACE[10-13|10:13:27.943] Started watching keystore folder path=/root/.ethereum/keystore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute, Aer, IBMQ, Aer | |
def apply_secret_unitary(secret_unitary, qubit, quantum_circuit, dagger): | |
functionmap = { | |
'x': quantum_circuit.x, | |
'y': quantum_circuit.y, | |
'z': quantum_circuit.z, | |
'h': quantum_circuit.h, | |
't': quantum_circuit.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute, Aer, IBMQ, Aer | |
crz, crx, result = ClassicalRegister(1), ClassicalRegister(1), ClassicalRegister(1) | |
q = QuantumRegister(3) | |
qc = QuantumCircuit(q, crz, crx, result) | |
qc.x(0) | |
## Bell pair - JBG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute, Aer, IBMQ, Aer | |
def apply_secret_unitary(secret_unitary, qubit, quantum_circuit, dagger): | |
functionmap = { | |
'x': quantum_circuit.x, | |
'y': quantum_circuit.y, | |
'z': quantum_circuit.z, | |
'h': quantum_circuit.h, | |
't': quantum_circuit.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute, Aer, IBMQ, Aer | |
def apply_secret_unitary(secret_unitary, qubit, quantum_circuit, dagger): | |
functionmap = { | |
'x': quantum_circuit.x, | |
'y': quantum_circuit.y, | |
'z': quantum_circuit.z, | |
'h': quantum_circuit.h, | |
't': quantum_circuit.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i = 0 | |
setInterval(() => document.querySelector('h1').style.transform = `rotateY(${i++}deg)`) | |
r = 0 | |
i = setInterval(() => Array.from(document.querySelectorAll("._1zGQT")).forEach(n => n.style.transform = `rotate(${r++}deg)`), 100) | |
i = 0 | |
setInterval(() => document.querySelector('h1').style.transform = `rotateY(${i++}deg)`) | |
ac = new AudioContext() | |
o1 = ac.createOscillator() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
activate application "Safari" | |
on send_message(msg) | |
tell application "System Events" | |
tell process "Safari" | |
click at {436, 763} | |
delay 2 | |
keystroke msg | |
delay 2 | |
click at {1012, 794} |
NewerOlder