Channels
This section describes functions for working with Quantum Channels, including application, representation, and property checking.
Applying Channels
Quantum channels can be applied to quantum states (density matrices) and state vectors (kets). The applychannel function handles various channel representations such as KrausOperators, SuperOperator, CholJamiolkowskiMatrices (as DynamicalMatrix), Stinespring, IdentityChannel, and UnitaryChannel.
julia> ρ = [0.5 0; 0 0.5]2×2 Matrix{Float64}: 0.5 0.0 0.0 0.5julia> Φ = IdentityChannel(2)IdentityChannel{Matrix{ComplexF64}} dimensions: (2, 2)julia> applychannel(Φ, ρ)2×2 Matrix{Float64}: 0.5 0.0 0.0 0.5julia> U = UnitaryChannel([0 1; 1 0])UnitaryChannel{Matrix{Int64}} dimensions: (2, 2) [0 1; 1 0]julia> applychannel(U, ρ)2×2 Matrix{Float64}: 0.5 0.0 0.0 0.5
Also, channels object are callable
julia> Φ(ρ)2×2 Matrix{Float64}: 0.5 0.0 0.0 0.5
Channel Representations
Channels can be represented in various bases. The channelbasis function generates a basis for quantum channels, which can then be used with represent to find the coefficients of a channel in that basis, or combine to reconstruct the channel from coefficients.
julia> # Create a channel basis for qubits (idim=2, odim=2) basis = channelbasis(2) # Represent a channel (e.g., Identity) in this basisChannelBasis{Matrix{ComplexF64}}(ChannelBasisIterator{Matrix{ComplexF64}}(2, 2, HermitianBasisIterator{Matrix{ComplexF64}}(2)))julia> id_op = vec(Matrix{ComplexF64}(I, 4, 4))16-element Vector{ComplexF64}: 1.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 1.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 1.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 1.0 + 0.0imjulia> coeffs = represent(basis, reshape(id_op, 4, 4)) # Example for illustration # Reconstruct # op = combine(basis, coeffs)13-element Vector{Float64}: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0
Predicates
We provide a set of predicates to check properties of quantum operations.
CP (Completely Positive)
iscp(Φ): Checks ifΦis Completely Positive.
TP (Trace Preserving) and TNI (Trace Non-Increasing)
istp(Φ): Checks ifΦis Trace Preserving.istni(Φ): Checks ifΦis Trace Non-Increasing.
CPTP (Quantum Channel)
iscptp(Φ): Checks ifΦis both CP and TP.iscptni(Φ): Checks ifΦis both CP and TNI.
Measurements
ispovm(Φ): Checks if a set of operators forms a POVM.iseffect(Φ): Checks if an operator is a valid quantum effect.
julia> K = KrausOperators([[1 0; 0 1]])KrausOperators{Matrix{Int64}} dimensions: (2, 2) [1 0; 0 1]julia> iscptp(K)true