chaogate
Simulations of the 3-MOSFET system known as a
choagateusingpyspice.
This library corresponds to a selection of the code used in "Chaogate Parameter Optimization using Bayesian Optimization and Genetic Algorithm", “AI for Hardware Security", ISQED’21, 4/7/2020.
Install
pip install chaogate
How to use
import chaogate
from chaogate import *
Ensure you change the global_path to the folder containing the as described in the core page.
By default, they point to:
global_path
'C:\\Anaconda3\\Lib\\site-packages\\PySpice\\Examples\\libraries\\chaogate'
We can instantiate a chaogate with the chaogate function, though this is automatically called by all the other functions which need it in this library. Most functions, such as sweep, grid, and bifurcate, accept kwargs as an argument, which refers to all the possible keyword arguments of the choagate netlist. For exmaple,
s1,s2=sweep(Vbias=(0,1.2,0.01),TEMP=(-20,120,20))
plot_sweep(s1,ncurves=10)
plot_sweep(s2,ncurves=10)
sweep : Elapsed time: 0.3116 seconds
Once we sweep, we calculate the relevant chaotic properties using iterate.
This is packaged into an automatic process, along with calculating the lyapunov exponent, with the bifurcate function.
We can calculate these quantities over entire regions of parameter space with functions like grid, then estimate the computational stability with boolean_divergence:
g=bifurcate(Vbias=(0,1.2,0.01),Vdd=(1.15,1.25,0.001),as_grid=True)
grid : Elapsed time: 29.5447 seconds
iterate_map : Elapsed time: 5.9907 seconds
plot_bifurcate(itr=g.iterate.sel(Vdd=1.2),lya=g.lyapunov.sel(Vdd=1.2))
grad = boolean_gradient(g.iterate)
div = boolean_divergence(grad)
plt.matshow(div)
plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x255f89bae88>
We can quickly compare the difference between the desired chaotic properties (positive $\lambda$), and the undesirable properties (the boolean divergence) by taking a linear combination such as:
normalized_lyapunov = (g.lyapunov.data>0)*g.lyapunov.data/np.max(g.lyapunov.data)
normalized_divergence = div/np.max(div)
optimizer = normalized_lyapunov - normalized_divergence
plt.matshow(optimizer)
plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x255f4b6be48>
With an appropriate optimizatier we can then begin to assess the appropriate chaogate design
sidis.refresh()
Metadata
Release files for chaogate 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chaogate-0.0.1.tar.gz | 18.6 kB | Without provenance | Details for chaogate-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chaogate-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for chaogate-0.0.1-py3-none-any.whl |
Total release size: 34.5 kB
Release files / chaogate-0.0.1.tar.gz
| Download URL | chaogate-0.0.1.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffd4537d7e914199ea87280de16e98db98ba378f7a8310236c0f8312b2cf1f85
|
|
BLAKE2b-256 checksum How to use checksums |
73a9292db2b935d8ccce083560272082b3e5fbac8140d948e494757e0c19863f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / chaogate-0.0.1-py3-none-any.whl
| Download URL | chaogate-0.0.1-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
558706e69d4a355e24a5c78b5bfe608ff1510e3035885c81754a31b8c355dce3
|
|
BLAKE2b-256 checksum How to use checksums |
17ebcf58eb79ceadbc5b44a3c51897643639cc2459f6c1c037212a7a074c778e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for chaogate 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.