npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

protom

v1.0.3

Published

Build your awesome project with mathematical prediction, qubits memory and 3D render.

Downloads

1

Readme

logo Protom

license version

Abstract

Protom is mathematical base to work with modern concept such like Machine Learning, Deep Learning, Quantum machine, 3D render or Data Analyze. The goal is to teach one language for many applications with an identical process. Behind your jobs, Protom can optimize the algorithms with the same solutions: balance between CPU / GPU / RAM, compression and standardization of data, easy import / export and compatibility.

The core of Protom is developed in Javascript. You can use it in your web and/or desktop applications. The Gitlab deposit is open source, you can fork or contribute. I will ask you to create units tests and comment your code.

Prerequisites

You should have to install Node.js on your computer (Windows / Linux / Mac / ARM systems).

Download here

Install

You can clone the project and install the node modules:

git clone https://gitlab.com/Yarflam/protom.git &&\
cd protom &&\
npm install

How to use it?

I write some papers in the /docs/papers folder:

Explore

Tree view

  • core
    • bayes
      • Bayes.js: first test to apply Bayes' theorem
    • helpers
      • gentools.js: access to random tools
        • Lack of clarity -> refactoring is required
    • quantum
      • Qubit: simple quantum unit.
      • Qureg: Quantum Register (aka Q-System or Q-Space) - manipulate entranglement, quantum gates and measure.
    • struct
      • controllers
        • Activation.js: activation functions
          • { Machine Learning }
        • Caller.js
          • Role: call a specific function in data type classes
          • Example: convert to another type
        • Operation.js
          • Role: perform a mathematical operation
        • Optimizer.js: use loss functions to minimize the errors
          • Example: Gradient descent
          • { Machine Learning }
      • datatypes
        • Complex.js: define a complex number
          • Example: 4 + 2i
        • Matrix.js: define a matrix
          • Notice: division is not supported
          • Example: [ 2, 5, 11 ]
        • Num.js: define a number
          • Example: 133.7
        • Quaternion.js: define a quaternion
          • Example: 20 + 21i + 7j + 8k
        • Tensor.js: define a tensor
          • Example: [ <vect1>, <vect2> ... <vectN> ]
        • Vector.js: define a vector
          • Example: < 3.1, 4.15, 1, 0, 1 >
      • nodes
        • Const: constants
        • Placeholder: dynamic values
        • Var: variables
    • Protom.js: main application.
      • Role: manage the structures and orchestrates the operations
    • index.js & web.js: different entry points (Node.js or web front)
  • docs
    • draft
      • zun3D: 3D engine
    • papers
      • DevelopmentPaper.ipynb: general
      • Quantum Programming.ipynb: quantum mechanics application
  • public: front pages (web)
  • sandbox:
    • dev-playground.js: my tests on the Protom core (Yarflam)
    • search-bayes: Test in application of Bayes' theorem
    • search-map.js & search-map2.js: generate maps in command line (just for fun)
  • test: automated tests with Jest
    • protom-func.spec.js: check the Protom core
    • struct-datatypes.spec.js: check the data types (num, complex, quaternion, vector, matrix, tensor)
    • struct-nodes.spec.js: check the nodes (const, var, placeholder)

Data types

| Type | About | Refers to | Example | | :--------- | :-------------------------------- | :--------------------------------------: | :--------------------: | | Num | Simple number | | 2.75 | | Complex | Complex number (real + imaginary) | Num | 4 + 2i | | Quaternion | Quaternion (w, i, j, k) | Num | 20 + 21i + 7j + 8k | | Vector | One dimension D | Num, Complex, Quaternion | <0.73, 0.12> | | Matrix | Two dimensions DxD | Num, Complex, Quaternion | [[ 1, 2 ], [ 3, 4 ]] | | Tensor | Multiple dimensions DxDx...D | Num, Complex, Quaternion, Vector, Matrix | [[ 1, 2 ], [ 3, 4 ]] |

Nodes

| Node | About | | :---------- | :--------------------------------------------------- | | Const | Constant value | | Var | Dynamic value, it can evolve by optimizer algorithms | | Placeholder | Free space to have fill by inputs |

Controllers

| Controller | About | Elements | | :--------- | :----------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Activation | Activation function | GaussHeavisideLeaky-ReluReLUSigmoid / LogisticSoftmax [N.I.]Softplus [N.I.]Softsign [N.I.]SwishTanh | | Optimizer | Algorithm to optimize learning | AdadeltaAdagradAdamAdamaxFtrlGradient DescentMomentumProximal AdagradProximal Gradient DescentRMS PropSDCASyncReplicas | | Loss | Loss function | | | Caller | Call a specific method of node | | | Operation | Calculate node in the graph | |

Engines

Summary

| Name | About | | :------------- | :------------------------------- | | Neural Network | Multilayer perceptron | | Quantum System | Simulation of a quantum computer | | 3D render | Orthogonal projections | | Data tools | Statistics |

Quantum System

In development...

Standards

Sequence of Q-bytes:

All gates are written in big-endian - an easy-to-use common representation - but they are executed in little-endian.

Compatibility with numbers:

You can use Number (or Num object) and Complex number.

Gates

| Gates | Code | Params | Matrix | | :------------------------------- | :---: | :----: | :--------------------------------------------- | | PauliX / SigmaX | X | 1 | [[ 0, 1 ], [ 1, 0 ]] | | PauliY / SigmaY | Y | 1 | [[ 0, -i ], [ i, 0 ]] | | PauliZ / SigmaZ | Z | 1 | [[ 1, 0 ], [ 0, -1 ]] | | Hadamard | H | 1 | 1/sqrt(2) * [[ 1, 1 ], [ 1, -1 ]] | | SqrtNot | | 1 | [[ (1+i)/2, (1-i)/2 ], [ (1-i)/2, (1+i)/2 ]] | | Phase | P | 1 + θ | [[ 1, 0 ], [ 0, e^(θi) ]] | | S-Gate | S | 1 | [[ 1, 0 ], [ 0, e^(π/2i) ]] | | T-Gate | T | 1 | [[ 1, 0 ], [ 0, e^(π/4i) ]] | | I-Gate / Identity | I | 1 | [[ 1, 0 ], [ 0, 1 ]] | | CNot | CN | 2 | see below | | CtrlZ | CZ | 2 | see below | | Swap | SW | 2 | see below | | SqrtSwap | RS | 2 | see below | | Toffoli | CCX | 3 | see below | | Fredkin | CSWAP | 3 | see below |

CNot

[[ 1, 0, 0, 0 ],
 [ 0, 1, 0, 0 ],
 [ 0, 0, 0, 1 ],
 [ 0, 0, 1, 0 ]]

CtrlZ

[[ 1, 0, 0,  0 ],
 [ 0, 1, 0,  0 ],
 [ 0, 0, 1,  0 ],
 [ 0, 0, 0, -1 ]]

Swap

[[ 1, 0, 0, 0 ],
 [ 0, 0, 1, 0 ],
 [ 0, 1, 0, 0 ],
 [ 0, 0, 0, 1 ]]

SqrtSwap

[[ 1,       0,       0, 0 ],
 [ 0, (1+i)/2, (1-i)/2, 0 ],
 [ 0, (1-i)/2, (1+i)/2, 0 ],
 [ 0,       0,       0, 1 ]]

Toffoli

[[ 1, 0, 0, 0, 0, 0, 0, 0 ],
 [ 0, 1, 0, 0, 0, 0, 0, 0 ],
 [ 0, 0, 1, 0, 0, 0, 0, 0 ],
 [ 0, 0, 0, 1, 0, 0, 0, 0 ],
 [ 0, 0, 0, 0, 1, 0, 0, 0 ],
 [ 0, 0, 0, 0, 0, 1, 0, 0 ],
 [ 0, 0, 0, 0, 0, 0, 0, 1 ],
 [ 0, 0, 0, 0, 0, 0, 1, 0 ]]

Fredkin

[[ 1, 0, 0, 0, 0, 0, 0, 0 ],
 [ 0, 1, 0, 0, 0, 0, 0, 0 ],
 [ 0, 0, 1, 0, 0, 0, 0, 0 ],
 [ 0, 0, 0, 1, 0, 0, 0, 0 ],
 [ 0, 0, 0, 0, 1, 0, 0, 0 ],
 [ 0, 0, 0, 0, 0, 0, 1, 0 ],
 [ 0, 0, 0, 0, 0, 1, 0, 0 ],
 [ 0, 0, 0, 0, 0, 0, 0, 1 ]]

Authors

  • Yarflam - initial work

License

The project is licensed under Creative Commons (BY-NC-SA) - see the LICENSE.md file for details.