Code covered by the BSD License
-
E0=ising_classical_ground(B)
ising_classical_ground Ground state energy of the classical Ising model
-
E0=ising_ground(BField,vararg...
ising_ground Ground state energy of the quantum Ising model
-
E0=ising_thermal(BField,T,var...
ising_thermal - Internal energy of the Ising model in thermal equilibrium
-
E0=xy_classical_ground(Jx,Jy,...
xy_classical_ground Ground state energy of the classical xy model
-
F=ising_free(BField,T)
ising_free - Free energy of the Ising model in thermal equilibrium
-
H=heisenberg(varargin)
heisenbergp Hamiltonian for the Heisenberg model with periodic BEC
-
H=heisenberg(varargin)
heisenberg Hamiltonian for the Heisenberg model with non-periodic BEC
-
H=ising(BField,varargin)
ising Hamiltonian for the Ising model with non-periodic boundary
-
H=isingp(BField,varargin)
isingp Hamiltonian for the Ising model with periodic BEC
-
H=spising(BField,varargin)
spising Hamiltonian for the Ising model with non-periodic BEC; sparse
-
H=spising2D(BField,Nx,Ny)
spising2D Hamiltonian for the 2D Ising model with aperiodic boundary condition; sparse
-
H=spisingp(BField,varargin)
spisingp Hamiltonian for the Ising model with periodic boundary condition; sparse
-
Hzz=splattice(op1,op2,Nx,Ny)
splattice Lattice Hamiltonian for a 2D spin model with nn interaction with aperiodic
-
Hzz=splatticep(op1,op2,Nx,Ny)
splatticep Lattice Hamiltonian for a 2D spin model with nn interaction with periodic
-
P=proj_asym(N,varargin)
proj_asym Gives the projector to the antisymmetric subspace
-
P=proj_sym(N,varargin)
proj_sym Gives the projector to the symmetric subspace
-
U=U_CNOT
U_CNOT 4x4 unitary matrix realizing a CNOT gate
-
U=U_H
U_H 2x2 unitary matrix realizing a Hadamard gate
-
U=runitary(varargin);
runitary Random unitary
-
[Jx,Jy,Jz]=su2(d);
su2 SU(2) generators for dxd matrices
-
[difference,U0]=twirl2(rho,va...
-
[fmin,f123]=optspinsq(rho)
optspinsq(rho) Optimal spin squeezing inequalities
-
[g,stab]=gstate(Gamma)
-
[m,fa0]=maxsymsep(op,varargin)
maxsymsep Maximum for symmetric multi-qubit product states.
-
[r,difference]=twirl(rho,vara...
twirl Twirling
-
[witness,alpha2,coeff2]=optwi...
optwitness Optimal entanglement witness for detecting genuine
-
b=braket(phi1,varargin)
braket Dirac's bra-ket
-
c=binom(a,b)
-
c=ccnr(rho)
ccnr Computable cross norm - realignment criterion
-
c=coll(op,varargin)
coll Defines a collective operator which is the sum of single-qudit operators.
-
c=comm(A,B)
comm Commutator of two matrices.
-
c=concurrence(rho);
concurrence Compute the concurrence of a two-qubit density matrix.
-
c=cstate(varargin)
cstate Defines a cluster state.
-
c=rstate(varargin)
rcstate Defines a ring cluster state.
-
c=spcoll(op,varargin)
spcoll Defines a collective operator which is the sum of single-qudit
-
coeff=schmidt(state,list)
schmidt Schmidt coefficients of a pure state.
-
e=ex(op,rho)
ex Expectation value of an operator
-
g=ghzstate(varargin)
ghzstate Defines a GHZ state.
-
gs=grstate(H)
grstate Normalized ground state of a Hamiltonian
-
h=nnchain(a,b,varargin)
nnchain Defines a Hamiltonian with a(k)b(k+1) nearest-neighbor
-
h=nnchainp(a,b,varargin)
nnchainp Defines a Hamiltonian with a(k)b(k+1) nearest-neighbor
-
h=spnnchain(a,b,varargin)
spnnchain Defines a Hamiltonian with a(k)b(k+1) nearest-neighbor
-
h=spnnchainp(a,b,varargin)
spnnchainp Defines a Hamiltonian with a(k)b(k+1) nearest-neighbor
-
k=ketbra(f);
ketbra Creating a density matrix from an unnormalized state vector.
-
k=ketbra2(f);
ketbra2 Creating a density matrix from an unnormalized state vector.
-
m=maxbisep(op1,list,varargin)
maxbisep Maximum for biseparable multi-qubit states.
-
m=maxeig(M);
maxeig Maximum eigenvalue of a matrix
-
m=maxppt(op,list,varargin)
maxppt Maximum for multi-qudit states with a positive partial transpose.
-
m=maxsep(op,varargin)
maxsep Maximum for multi-qudit separable states.
-
m=mineig(M);
mineig Minimum eigenvalue of a matrix
-
m=pkron(matrix,no_of_repeatat...
-
matrix=reordermat(pattern,var...
reordermat Transformation matrix for reordering the qudits according to
-
matrix=reordermatsp(pattern,v...
spreordermat Transformation matrix for reordering the qudits according to
-
maxoverlap=overlapb(state)
overlapb Maximal overlap with biseparable states
-
mb=maxb(op1,varargin)
maxb(op) gives maximum value for
-
mkron(A,B,varargin)
mkron Kronecker (tensor) product of several matrices.
-
mm=reorder(m,pattern,varargin)
reorder Reorder a state vector or a density matrix according to
-
mm=shiftquditsleft(m,varargin)
shiftquditsleft Shift the qudits to the left
-
mm=shiftquditsright(m,varargi...
shiftquditsright Shift the qudits to the right
-
mm=swapqudits(m,k,l,varargin)
swapqudits Swap two qudits of a qudit register
-
mop=quditop(op,k1,varargin)
quditop Operator acting on a qudit of a qudit register
-
mop=sptwoquditop(op,k1,k2,var...
spquditop Operator acting on a given qudit; sparse version
-
mop=sptwoquditop(op,k1,k2,var...
sptwoquditop Operator on given qudits; sparse version
-
mop=twoquditop(op,k1,k2,varar...
twoquditop(op,k1,k2,n) defines an n-qudit quantum operator
-
neg=negativity(rho,list,varar...
negativity Negativity for a qudit register.
-
obs=orthogobs(d)
orthogobs Orthogonal observables for a qudit
-
op=interact(op1,op2,n1,n2,var...
interact Interaction between two qudits
-
op=paulistr(pstring)
paulistr Converts a Pauli string into an operator.
-
op=spinteract(op1,op2,n1,n2,v...
spinteract Interaction between two qudits; sparse version
-
p=rproduct(varargin)
rproduct Random product state vector for a given number of qubits.
-
pstring=decompose(rho,varargi...
decompose Creates a string with the Pauli decomposition of a
-
q=qsize(matrix,varargin)
-
r=keep(rho_in,listneg,varargi...
keep Reduced density matrix keeping the given qubits.
-
r=keep_nonorm(rho_in,listneg,...
keep_nonorm Reduced density matrix keeping the given qubits.
-
r=rdmat(varargin)
rdmat Random density matrix
-
r=remove(rho_in,list,varargin)
remove Reduced density matrix
-
rho=BES_Breuer(lambda,d)
BES_Breuer Breuer?s two-qudit bound entangled state
-
rho=BES_Horodecki2x4(b)
BES_Horodecki2x4 Horodecki's 2x4 bound entangled state
-
rho=BES_Horodecki3x3(a)
BES_Horodecki3x3 Horodecki's 3x3 bound entangled state
-
rho=BES_UPB3x3
BES_UPB3x3 3x3 bound entangled state constructed with UPBs
-
rho=thstate(H,kT)
thstate Thermal state of a system with a given Hamiltonian
-
rhoR=mrealign(rho,list,vararg...
mrealign Generalized realignment of a multipartite operator
-
rhoR=realign(rho)
realign Realignment of the bipartite density matrix.
-
rhoT=pt(rho,list,varargin)
pt partial transposition of a density matrix
-
rhoT=pt_nonorm(rho,list,varar...
pt_nonorm partial transposition of a density matrix
-
rho_noisy=addnoise(rho,p)
addnoise Adds white noise to a density matrix.
-
s=mestate(d)
mestate Maximally entangled state
-
s=mmstate(varargin)
mmstate Density matrix for the maximally mixed state
-
s=printv(v,varargin);
printv Prints a state vector in product basis.
-
s=qeye(varargin)
qeye Identity matrix for a given number of qudits.
-
s=qvec(varargin)
qvec Empty state vector for a given number of qudits.
-
s=rvec(varargin)
rvec Random state vector for a given number of qudits.
-
s=singlet(varargin)
singlet Defines a singlet state.
-
s=smolinstate
smolinstate Gives the four-qubit bound entangled state
-
stab=gstate_stabilizer(Gamma)
gstate_stabilizer Gets the generators for the stabilizer of a graph state.
-
t=trace2(rho)
-
t=trnorm(A)
trnorm Tracenorm of a matrix
-
v=va(op,rho)
va Variance of an operator
-
vec=reordermat(pattern,vararg...
reordervec Transformation vector for reordering the qudits according to
-
w=bra(v)
bra After element-wise conjugation, transforms a vector into a normalized row vector.
-
w=dstate(e,varargin)
dstate Defines a symmetric Dicke state.
-
w=ket(v)
ket Transforms a vector into normalized column vector.
-
w=nm(v)
nm Normalization
-
w=wstate(varargin)
-
contents.m
-
example1.m
-
example2.m
-
example3.m
-
example_maxppt.m
-
example_optwitness.m
-
paulixyz.m
-
su3.m
-
su3_alternative.m
-
ver.m
-
View all files
from
QUBIT4MATLAB V4.0
by Geza Toth
MATLAB package for quantum information science and quantum mechanics.
|
| contents.m |
% MATLAB routines for quantum mechanics.
%
% General
% contents - List of commands
% ver - Version
% example1 - Example with two-state systems
% example2 - Example with multi-qubit states
% example3 - Example about operators in spin chains
% example_maxppt - Example for the usage of maxppt
% example_optwitness - Example for the usage of optwitness
%
% Bras and kets
% ket - Creating a normalized column vector (Dirac's ket)
% bra - Creating a normalized row vector (Dirac's bra)
% ketbra - Creating a projector from a vector
% ketbra2 - Creating a projector from the argument
% if the argument is a vector.
% braket - Dirac's braket
% ex - Expectation value
% va - Variance
% nm - Normalization
%
%
% Reordering a qudit register
% mkron - Kronecker product with several arguments
% pkron - Multiplying a matrix with istself given times
% using the Kornecker product
% remove - Reduced density matrix in a qudit register
% keep - Reduced density matrix in a qudit register
% reorder - Reorder a register of qudits
% reordermat - The operator corresponding to reordering
% a register of qudits
% reordervec - Transformation vector for reordering
% a register of qudits
% shiftquditsleft - Shift qudits to the left
% shiftquditsright - Shift qudits to the right
% swapqudits - Swap two qudits of a quantum state
%
%
% Interesting quantum states, quantum gates and operators
% ghzstate - Greenberger-Horne-Zeilinger state
% cstate - Cluster state
% rstate - Ring cluster state
% gstate - Graph state
% gstate_stabilizer - Stabilizer of a graph state
% wstate - W state
% dstate - Symmetric Dicke state
% singlet - Singlet state
% mestate - Maximally entangled state
% mmstate - Density matrix for the maximally mixed state
% smolinstate - Smolin's four-qubit bound entangled state
% BES_Horodecki3x3 - Horodecki's 3x3 bound entangled state
% BES_Horodecki2x4 - Horodecki's 2x4 bound entangled state
% BES_UPB3x3 - 3x3 UPB bound entangled state
% BES_Breuer - Breuer?s bound entangled state
% U_CNOT - 4x4 unitary matrix of a CNOT gate
% U_H - 2x2 unitary matrix for the Hadamard gate
% paulixyz - Define Pauli matrices x,y,z and e=eye(2)
% su2 - SU(2) generators for matrices of a given size
% su3 - Define the SU(3) generators m1,...,m8 and ee=eye(3)
% su3_alternative - Define alternative SU(3) generators
%
%
% Formatted input/output
% printv - Print state vector in product basis
% decompose - Display pauli decomposition of a matrix
% paulistr - Convert symbolic string to operator
%
%
% Two-qudit interactions and spin chains
% quditop - Operator acting on a qudit of a qudit register
% twoquditop - Operator acting on two qudits of a qudit register
% coll - Define a collective multi-qudit operator
% interact - Two-qudit interaction acting on given qudits
% nnchain - Spin chain Hamiltonian
% nnchainp - Spin chain Hamiltonian with a periodic boundary
% condition
% ising - Ising spin chain Hamiltonian
% isingp - Ising spin chain Hamiltonian with a periodic
% boundary condition
% ising_ground - Ground state energy of Ising model
% ising_free - Free energy in thermal state
% ising_thermal - Internal energy in thermal state
% ising_classical_ground - Ground state energy for the classical Ising model
% heisenberg - Heisenberg spin chain Hamiltonian
% heisenbergp - Heisenberg spin chain Hamiltonian with a periodic
% boundary condition
% xy_classical_ground - Ground state energy for the classical xy model
% orthogobs - Orthogonal observables for a qudit
%
%
% Entanglement
% pt - Partial transpose for a qudit register
% negativity - Compute the negativity of the density
% matrix
% concurrence - Concurrence for a two-qubit matrix
% realign - Realignment of a density matrix
% ccnr - Computable Cross Norm - Realignment criterion
% mrealign - Realignment for multiqudit systems
% optspinsq - Optimal spin squeezing inequalities
% schmidt - Schmidt coefficients for a pure state
% maxsep - Maximum of an operator for separable states
% maxsymsep - The same as maxsep but for
% permutationally invariant sep. states
% maxbisep - Maximum of an operator for biseparable states
% maxb - Like maxbisep, but for all bipartitons
% overlapb - Maximum overlap of a pure state with bisep. states
% maxppt - Maximum of an operator expectation value
% for states with a positive partial transpose
% optwitness - Obtaining optimal entanglement witnesses
%
% Random vectors, matrices and operations
% rvec - Random state vector for a given number of
% qudits
% rproduct - Random product state vector for a given
% number of qudits
% rdmat - Random density matrix for a qudit register
% runitary - Random unitary for a qudit register
% twirl - Twirling
% twirl2 - How close is a state to Werner states
%
%
% Miscellenous simple commands
% proj_sym - Projector to the symmetric subspace
% proj_asym - Projector to the antisymmetric subspace
% maxeig - Maximum eigenvalue of a matrix
% mineig - Minimum eigenvalue of a matrix
% trace2 - Trace-square of a matrix
% trnorm - Trace-norm
% comm - Commutator
% grstate - Normalized ground state of a Hamiltonian
% thstate - Thermal ground state
% addnoise - Add white noise to a quantum state
% binom - Binomial
% qvec - Empty statevector for given number of qudits
% qsize - Size of state vector or density matrix in qudits
% qeye - Identity matrix for given number of qudits
%
%
% Commands with sparse matrices
% spreordermat - Sparse version of reordermat
% spcoll - Sparse version of coll
% spinteract - Sparse version of interact
% spnnchain - Sparse version of nnchain
% spnnchainp - Sparse version of nnchainp
% spising - Sparse version of ising
% spisingp - Sparse version of isningp
% spquditop - Sparse version of quditop
% sptwoquditop - Sparse version of twoquditop
% splatticep - Two-dimensional lattice Hamiltonian, periodic BC, sparse
% splattice - Two-dimensional lattice Hamiltonian, aperiodic BC, sparse
% spising2Dp - Two-dimensional Ising Hamiltonian, periodic BC, sparse
%
|
|
Contact us at files@mathworks.com