https://github.com/BrianCoyle/TPMScProject2017
Raw File
Tip revision: 6267b1ff72d4be26cba7bedf9764b4ba1d5c1305 authored by BrianCoyle on 09 August 2017, 17:14:31 UTC
Add files via upload
Tip revision: 6267b1f
GenerateState.m
function [rho] = GenerateState(zeta)

%This function generates the state cos(zeta)|00> + sin(zeta)|11> by
%taking an input angle, zeta, in the form of a density matrix rho
rho = [cos(zeta)^2,0,0,cos(zeta)*sin(zeta);...
          0,0,0,0;...
          0,0,0,0;...
       cos(zeta)*sin(zeta),0,0,sin(zeta)^2];

end
back to top