Example 1
Let us consider the operator To verify that it is a Hermitian matrix, we can verify its conjugate transpose Its eigenvalues are and the corresponding eigenvectors (each column is an eigenvector) are We have then that eigenvalue 1 is degenerate. We can reconstruct matrix by spectral decomposition: We have now defined a Hermitian matrix We can verify that they commute, that is, . In the simplest case, we then have a subspace of only one dimension for eigenvalue 2. We can see that .
Now for eigenvalue 1, we have a two-dimensional subspace formed by the vectors . All non-null vectors in this subspace continue to be eigenvectors of with the same eigenvalue 1, Any non-null vector that is a linear combination of them, is also an eigenvector of . In fact,
Now applying to the first eigenvector, we can see that it is a linear combination of the other two vectors in the subspace and is not a eigenvector:
That is, even though these two eigenvectors associated with 1 are a basis for this subspace, they do not form a common eigenvector basis. But we can build one. Since all non-null vectors in this subspace are eigenvectors of , we only need to find those who are also eigenvectors of . In this two-dimensional space, ’s action on the vectors of the space is given by Its eigenvalues are and the corresponding eigenvectors (each column is an eigenvector) are
Combining with the previous results, we can have a new basis given by the eigenvectors (where each column corresponds to a vector of the new basis)
We can test by applying to the vectors of the new basis:
We can test by applying to the vectors of the new basis:
Example 2 Suppose we have the operators and We can verify that they do not commute, since
For the operator , the eigenvalues are with corresponding normalized eigenvectors
Suppose, for example, that after measuring , we obtain the value . The system is then in the corresponding eigenstate, Now consider measuring . The eigenvalues of are also with corresponding eigenvectors
The probability of obtaining a particular eigenvalue is given by the squared magnitude of the inner product between the corresponding eigenvector and the state of the system: . Therefore,
Thus, there is a probability of observing +1 and a probability of observing -1. In other words, since and do not commute and, in this example, do not share any eigenvectors, after measuring one of the observables, the outcome of a subsequent measurement of the other is intrinsically indeterminate within this mathematical formalism.
Codes
# Example 1
def printa():
import numpy as np
np.set_printoptions(suppress=True, precision=2)
print("Vamos considerar o operador A:")
A = np.array([
[1, 0, 0],
[0, 1, 0],
[0, 0, 2]
])
print(A)
print("\nPara verificar que é uma matriz hermitiana, podemos verificar seu transposto conjugado:")
m=A.T
m=m.conj()
print(m)
autovalores, autovetores = np.linalg.eig(A)
print("\nSeus autovalores são:")
print(autovalores)
print("\nE os correspondentes autovetores (cada coluna é um autovetor) são")
print(autovetores)
print("\nTemos então que o autovalor 1 é degenerado. Podemos reconstruir a matriz A pela decomposição espectral:")
av1=autovetores[:, 0].reshape(-1, 1)
av2=autovetores[:, 1].reshape(-1, 1)
av3=autovetores[:, 2].reshape(-1, 1)
m=autovalores[0]*av1@av1.T+autovalores[1]*av2@av2.T+autovalores[2]*av3@av3.T
print(m)
print("\nDefinimos agora uma matriz hermitiana B:")
B = np.array([
[3, 1, 0],
[1, 4, 0],
[0, 0, 5]
])
print(B)
print("\nPodemos verificar que eles comutam, isto é, AB-BA=0:")
print(A@B-B@A)
print("\nNo caso mais simples, temos então um subespaço de apenas uma dimensão para o autovalor 2. Podemos conferir que Bv=bv, sendo b=5")
v=B@av3
print(v)
print("\nAgora para o autovalor 1, temos um subespaço de duas dimensões formada pelos vetores")
print(autovetores[:, :2])
print("\nTodos vetores não nulos neste subespaço continuam a serem autovetores de A com o mesmo autovalor (c).")
print("Se denotamos os dois autovetores calculados por (v1,v2) e os utilzarmos como base, qualquer vetor não nulo que seja uma combinação linear deles u=av1+bv2 também é um autovetor de A. De fato Au=aAv1+bAv2 =acv1+bcv2=c(av1+bv2)=cu.")
print("Agora aplicando B ao primeiro autovetor, podemos ver que ele é uma combinação linear dos outros 2 vetores do espaço e não é um autovetor de B:")
v=B@av1
print(v)
print("Ou seja, ainda que esses dois autovetores associados a 1 sejam uma base para esse subespaço, eles não formam uma base de autovetores comum. Mas podemos construir uma.")
print("Como todos vetores não nulos neste subespaço são autovetores de A, só precisamos encontrar aqueles que também são autovetores de B.")
print("Neste espaço bidimensional, atuação de B sobre os vetores do espaço é dada apenas por:")
B2 = np.array([
[3, 1],
[1, 4]])
print(B2)
autovaloresB2, autovetoresB2 = np.linalg.eig(B2)
print("\nSeus autovalores são")
print(autovaloresB2)
print("\nE os correspondentes autovetores (cada coluna é um autovetor) são:")
print(autovetoresB2)
print("\nCombinando então com resultados anteriores, podemos ter nova base dada pelos autovetores comuns(onde cada coluna corresponde a um vetor da nova base):")
base = np.array([[-0.85065081,-0.52573111,0],
[ 0.52573111,-0.85065081,0],
[ 0,0,1],])
print(base)
autovaloresA, autovetoresA = np.linalg.eig(A)
autovaloresB, autovetoresB = np.linalg.eig(B)
av1=base[:, 0].reshape(-1, 1)
av2=base[:, 1].reshape(-1, 1)
av3=base[:, 2].reshape(-1, 1)
print("Podemos testar aplicando A aos vetores da nova base:")
print(A@av1/autovaloresA[0])
print(A@av2/autovaloresA[1])
print(A@av3/autovaloresA[2])
print("Onde dividimos cada vetor já pelo correspondente autovalor:")
print(autovaloresA)
print("Podemos testar aplicando B aos vetores da nova base:")
print(B@av1/autovaloresB[0])
print(B@av2/autovaloresB[1])
print(B@av3/autovaloresB[2])
print("Onde dividimos cada vetor já pelo correspondente autovalor:")
print(autovaloresB)
# Example 2
import numpy as np
np.set_printoptions(suppress=True, precision=2)
print('Se temos os operadores A:')
A = np.array([
[0, 1],
[1, 0]])
print(A)
print("E B:")
B = np.array([
[1, 0],
[0, -1]])
print(B)
print("Podemos verificar que eles não comutam, isto é, AB-BA=/=0:")
print(A@B-B@A)
autovalores, autovetores = np.linalg.eig(A)
print("\nPara o operador A, seus autovalores são:")
print(autovalores)
print("\nE os correspondentes autovetores (cada coluna é um autovetor) são")
print(autovetores)
print("Assumindi por exemplo, que após medir A, obtivemos o valor a, então o sistema está no estado:")
v=autovetores[:, 0].reshape(-1, 1)
print(v)
print("Porém agora se formos medir B, temos uma indeterminação intrinseca.")
autovalores, autovetores = np.linalg.eig(B)
print("\nPara o operador B, seus autovalores são:")
print(autovalores)
print("\nE os correspondentes autovetores (cada coluna é um autovetor) são")
print(autovetores)
print("Calculando o quadro do produto interno entre cada autovetor e o estado do sistema |<a|pso>|², temos:")
a=autovetores[:, 0]@v
a=a**2
print(str(a*100)+"% de observar +1 e")
a=autovetores[:, 1]@v
a=a**2
print(str(a*100)+"% de observar -1.")
print("Ou seja, como A e B não comutam e não possuem autovetores comuns, após medirmos um dos observáveis, o resultado de uma medida subsequente do outro está intrinsecamente indeterminado neste formalismo matemático.")