Spaces:
Configuration error
Configuration error
Download integrations/quantum_primitives.py from Codexcoder/deepseek-v4-sovereign: direct link, hf CLI and curl.
- Browser
- Download file 267 Bytes
-
https://huggingface.co/spaces/Codexcoder/deepseek-v4-sovereign/resolve/main/integrations/quantum_primitives.py
- Command line
-
hf download hf://spaces/Codexcoder/deepseek-v4-sovereign/integrations/quantum_primitives.py
-
curl -L -o quantum_primitives.py https://huggingface.co/spaces/Codexcoder/deepseek-v4-sovereign/resolve/main/integrations/quantum_primitives.py
267 Bytes
| import numpy as np | |
| def ket(a, b): | |
| return np.array([a, b]) | |
| def tensor(a, b): | |
| return np.kron(a, b) | |
| def hadamard(): | |
| return np.array([[1, 1], [1, -1]]) / np.sqrt(2) | |
| def cnot(): | |
| return np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]]) | |