Anomaly cancellation
Project description
Anomalies
Implement the anomaly free solution of arXiv:1905.13729 [PRL]:
Obtain a numpy array z
of N
integers which satisfy the Diophantine equations
>>> z.sum()
0
>>> (z**3).sum()
0
The input is two lists l
and k
with any (N-3)/2
and (N-1)/2
integers for N
odd, or N/2-1
and N/2-1
for N
even (N>4
).
The function is implemented below under the name: free(l,k)
Install
$ pip install anomalies
USAGE
>>> from anomalies import anomaly
>>> anomaly.free([-1,1],[4,-2])
array([ 3, 3, 3, -12, -12, 15])
>>> anomaly.free.gcd
3
>>> anomaly.free.simplified
array([ 1, 1, 1, -4, -4, 5])
Example
A sample for 4<N<13
with integers until |30|
with ~400 000
chiral solutions can be download from: [JSON]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
anomalies-0.2.6.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file anomalies-0.2.6.tar.gz
.
File metadata
- Download URL: anomalies-0.2.6.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf3e1290bb786fd0e35911197df6eda2e1a5e9ede9a9cec10db43a5860e4cd7 |
|
MD5 | 69cdd49cdb712e5a8dd4dcdd8b952666 |
|
BLAKE2b-256 | 3682b7e3a0c0abbb1b53618d10a39d3e26b56bfe75dc06cdb47ba207e5409311 |
File details
Details for the file anomalies-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: anomalies-0.2.6-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a27294a0c06bdd5f73b1e8cbdffab7e52fc0d78083bc6d7de436dd2730a435ad |
|
MD5 | d7bcbce8982cbb532d8505584c0fa52b |
|
BLAKE2b-256 | 27c988d6fac1e0d8f0176148bd302a55baa522a615592af0eb474224bc2a0cc3 |