Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Acting scalar variables on matrices while creating density plots

1 Ansicht (letzte 30 Tage)
JJH
JJH am 5 Aug. 2017
Geschlossen: MATLAB Answer Bot am 20 Aug. 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?

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by