Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Acting scalar variables on matrices while creating density plots

1 vue (au cours des 30 derniers jours)
JJH
JJH le 5 Août 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi, I am trying to make a density plot in Matlab. My problem is that I want to use some Hamiltonian,
H=a*kron(PauliX,PauliZ)+b*kron(PauliZ,PauliY)
and take the unitary evolution
U=expm(-i*H*t)
over some two qubit input state
rhoe=[0.5 0; 0 0.5]
rhon=[0.5 0; 0 0.5]
rhoin=kron(rhoe,rhon)
such that
rhoout=U*rhoin*U'
The variables in my density plot will be a, t and the value given in element 1,1 of rhoout. I want to be able to vary both a and t but I am having the problem that the matrix dimensions are wrong. Ideally, I would do a for loop for a=0:n and t=0:m but I don't know how to get this to work and also save the outputs of each rhoout. I have been trying to use the pcolor function but my problem is in getting a list of rhoout values. Can anyone tell me how I could go about coding this?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by