<jupyter_start><jupyter_text>q_exp$$ exp_{q}(u) = \lim_{a \to q}{(1+u(1-a))^{\frac{1}{1-a}}} $$$$$$com isso, vemos que$$ exp_{1}(u) = \lim_{a \to 1}{(1+u(1-a))^{\frac{1}{1-a}}} $$que igualando  $ n = {\frac{1}{1-a}} $ vemos que $(1-a) = \frac{1}{n}$, e $n \to \infty$com o $ \lim_{a \to 1}{\frac{1}{1-a}}$ da equção acima, vemos que podemos verificar que $$ exp_{1}(u) = \lim_{n \to \infty}{{ \left(1+\frac{u}{n} \right)}^{n}}$$$$$$ q_ln$$ ln_{q}(u) = \lim_{a \to q}{\left(\frac{u^{1-a}-1}{1-a}\right)} $$que pode ser reescrita em$$ \lim_{a \to q}{(u^{1-a}-1)\left(\frac{1}{1-a}\right)} $$igualando  $ h = {1-a} $, vemos que $h \to 0$com o $ \lim_{a \to 1}{{1-a}}$ da equção acima. Então podemos verificar que$$ln_{1}(u) = \lim_{h \to 0}\frac{u^h-1}{h}$$<jupyter_code>np.double(2)
from sympy import *
x = symbols('x')
f = sin(x)/x
limit(f,x,2)
from yaraah.tools import puts
#transfromador de iamginário para real da biblioteca mpmath
def real_mp(number):
    return number.real()
float(mpf('1').real)


############# function base q_expotion ###############

def __q_exp__(u:float,q:float) -> np.double :
    
    __q__ = lambda _q_: 1/(1-_q_)
    param_q = limit(__q__,q)
    
    A = lambda w: 1/(w-1)
    #parametro limite de A
    param_A = np.double(limit(A,q).real)
    
    if(q > 1.9 and t >= param_A): return np.nan
    
     #function base q_expotion
    __e__ = lambda q_: np.power((1+u*(1-q_)),param_q)
    #try:
    return np.double(limit(__e__,q).real) if((1+u*(1-q))>=0) else 0
    #except(ZeroDivisionError):
       
        
'''
def q_exp(t,q=1):
    if(type(t) == np.ndarray or type(t) == list):
        res = []
        for i in t:
            res.append(__q_exp__(i,q))
            print(res)
        return np.array(res)
    else:
        return __q_exp__(t,q)
'''
q_exp = __q_exp__
t = np.linspace(-2,2,100)
for i in t:
    print(q_exp(i,q=1))
type(t) == np.ndarray
plt.plot(y,t)
b = b()
b.show()
np.double(2222)
from qutip import *
import numpy as np
import matplotlib.pyplot as plt

n=2#Atomic number
j = n//2
psi0 = spin_coherent(j, np.pi/3, 0)#Set the initial state of the system to spin coherent state

Jp=destroy(2*j+1).dag()#Up Operator
J_=destroy(2*j+1)#Descending operator
Jz=(Jp*J_-J_*Jp)/2#Jz

H=Jz**2#System's Hamiltonian

tlist=np.linspace(0,3,100)#Time list
result=mesolve(H,psi0,tlist)#State evolution over time

theta=np.linspace(0, np.pi, 50)
phi=np.linspace(0, 2*np.pi, 50)

#Calculate the husimi q function in the four states separately
Q1, THETA1, PHI1 = spin_q_function(result.states[0], theta, phi)
Q2, THETA2, PHI2 = spin_q_function(result.states[30], theta, phi)
Q3, THETA3, PHI3 = spin_q_function(result.states[60], theta, phi)
Q4, THETA4, PHI4 = spin_q_function(result.states[90], theta, phi)

#Draw the husimi q function in the four states in the four subgraphs
fig = plt.figure(dpi=150,constrained_layout=1)
ax1 = fig.add_subplot(221,projection='3d')
ax2 = fig.add_subplot(222,projection='3d')
ax3 = fig.add_subplot(223,projection='3d')
ax4 = fig.add_subplot(224,projection='3d')

plot_spin_distribution_3d(Q1, THETA1, PHI1,fig=fig,ax=ax1)
plot_spin_distribution_3d(Q2, THETA2, PHI2,fig=fig,ax=ax2)
plot_spin_distribution_3d(Q3, THETA3, PHI3,fig=fig,ax=ax3)
plot_spin_distribution_3d(Q4, THETA4, PHI4,fig=fig,ax=ax4)

for ax in [ax1,ax2,ax3,ax4]:
    ax.view_init(0.5*np.pi, 0)
    ax.axis('off')#Do not display the axis

fig.show()

from qutip import *
import numpy as np
import matplotlib.pyplot as plt

alpha=1#Coherent light parameter alpha
n=2#Atomic number
j = n/2

psi0 = tensor(coherent(10,alpha),spin_coherent(j, 0, 0))#Set the initial state of the system

a=destroy(10)#Light field annihilation operator
a_plus=a.dag()#Light field generation operator
Jp=destroy(n+1).dag()#Atomic ascending operator
J_=destroy(n+1)#Atomic descending operator
Jx=(Jp+J_)/2#Atomic Jx operator
Jy=(Jp-J_)/(2j)#Atomic Jy operator, where j is the imaginary unit
Jz=(Jp*J_-J_*Jp)/2#Atomic Jz operator

H=tensor(a,Jp)+tensor(a_plus,J_)#System's Hamiltonian
tlist=np.linspace(0,10,1000)#Time list
result=mesolve(H,psi0,tlist)#State evolution over time

fig=plt.figure()
ax1 = fig.add_subplot(221)
ax2 = fig.add_subplot(222)
ax3 = fig.add_subplot(223)
ax4 = fig.add_subplot(224)

ax1.plot(tlist,expect(tensor(qeye(10),Jx),result.states))#Jx average value over time graph
ax2.plot(tlist,expect(tensor(qeye(10),Jy),result.states))#Jy's average over time graph
ax3.plot(tlist,expect(tensor(qeye(10),Jz),result.states))#Jz average change over time graph
ax4.plot(tlist,expect(tensor(qeye(10),Jx**2+Jy**2+Jz*2),result.states))#J squared average over time graph

fig.subplots_adjust(top=None,bottom=None,left=None,right=None,wspace=0.4,hspace=0.4)#Set the sub-picture spacing
fig.show()<jupyter_output><ipython-input-8-3af7aac6cfd3>:35: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
  fig.show()
{'fraction_non_alphanumeric': 0.17961757526444264, 'fraction_numerical': 0.04434499593165175, 'mean_word_length': 4.989037758830694, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '577599', 'license': 'MIT', 'n_tokens_mistral': 2156, 'n_tokens_neox': 2064, 'n_words': 431, 'path': 'qbits/Untitled.ipynb', 'repo_name': 'perseu912/insta_bot', 'size': '4916'}