Skip to content

gpftc/qfunction

Repository files navigation

Qfunction





PyPI - Downloads
CodeFactor Grade

Library for researcher with statistics and mechanics equation non-extensive 📈📊📚

Non-extensive works

This package is for development and works using the deformed non-extensive algebra, using for calculus, the simple algebra and the specials functions from quantum mechanics and theoretical physic, on the non-extensive mode.
The all functions and equation on this work, is based in the articles and papers from Dr. Bruno G. da Costa, your friend, the PhD Ignácio S. Gomes and others peoples and articles about the non-extensive works.

Installation:


this lib is found on the site of packages for python the pypi and on the site that is a repository for the codes and softwares with licenses from majority business of the word, the github.

Linux

$ pip install qfunction -U

Windows

C\:> py -m pip install qfunction -U



Examples


fundamentals

simple algebra

from qfunction.fundamentals.canonic import prod
from qfunction.fundamentals import q_sum,q_mult,q_ln,q_sub

#the sum deformed on q=1
print(q_sum(4,2,1,q=1)) 
#output: 6

#the sum deformed on q=1.9
print(q_sum(4,2,1,q=1.9)) 
#output: -0.200000000000351

#the multiplication deformed on q=1
print(q_mult(1,2,q=1))
#output: 2

#the multiplication deformed on q=.8
print(q_mult(1,2,q=.8))
#output: 1.9999999999999998

#the natural logarithm on q=1
print(q_ln(3,q=1))
#output: 1.0984848484848484

#the natural logarithm deformed on q=.5
print(q_ln(3,q=.5))
#output: 1.4641016151377162

print(q_sub(4,3,q=.9))

Quantum

creating a quantum circuit base

from qfunction.quantum import QuantumCircuit as Qc

q = 1.
qc = Qc(4,q=q)
qc.Y(2)
qc.H(2,1)
qc.med(2)
#print(qc)

any equations

from qfunction.quantum.equations import S,S_q
from qfunction.fundamentals import q_cos,q_sin
from numpy import array,linspace,pi

t = array([1,2,34,56,34,23])
p = t/t.sum()
#print(p)
#print(S(p))

t = linspace(-2,2,100)*2*pi

theta = t/2
gamma = t
q =1

## testing the entropy deformed  ##
print(S_q(theta,gamma,q))

q = .5
print(S_q(theta,gamma,q))

q = 1.5
print(S_q(theta,gamma,q))

Algorithms

one simlpe example of code game on quantum circuit deformed

from qfunction.quantum import QuantumCircuit as Qc
from qfunction.quantum.algorithms import ArenaGame

q = .9
qc = Qc(1,q=q)
game = ArenaGame(qc=qc)

game.up()
game.left()
game.left()
game.show()

Others Examples on colab.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published