QuantumSymbolics.CNOT
— ConstantCNOT gate
diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index d3f5797..e8dcd3b 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-12T13:45:44","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-17T01:41:05","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/API/index.html b/dev/API/index.html index 9e33fb5..674ea7e 100644 --- a/dev/API/index.html +++ b/dev/API/index.html @@ -4,33 +4,33 @@ padding-top: 0 !important; padding-bottom: 0 !important; } -
QuantumSymbolics.CNOT
— ConstantCNOT gate
QuantumSymbolics.CPHASE
— ConstantCPHASE gate
QuantumSymbolics.Create
— ConstantCreation operator, also available as the constant âꜛ
, in an infinite dimension Fock basis. There is no unicode dagger superscript, so we use the uparrow
QuantumSymbolics.Destroy
— ConstantAnnihilation operator, also available as the constant â
, in an infinite dimension Fock basis.
QuantumSymbolics.F₁
— ConstantSingle photon basis state of n
QuantumSymbolics.H
— ConstantHadamard gate
QuantumSymbolics.I
— ConstantIdentity operator in qubit basis
QuantumSymbolics.N
— ConstantNumber operator, also available as the constant n̂
, in an infinite dimension Fock basis.
QuantumSymbolics.Pm
— ConstantPauli "minus" operator, also available as the constant σ₋
QuantumSymbolics.Pp
— ConstantPauli "plus" operator, also available as the constant σ₊
QuantumSymbolics.X
— ConstantPauli X operator, also available as the constant σˣ
QuantumSymbolics.X1
— ConstantBasis state of σˣ
QuantumSymbolics.X2
— ConstantBasis state of σˣ
QuantumSymbolics.Y
— ConstantPauli Y operator, also available as the constant σʸ
QuantumSymbolics.Y1
— ConstantBasis state of σʸ
QuantumSymbolics.Y2
— ConstantBasis state of σʸ
QuantumSymbolics.Z
— ConstantPauli Z operator, also available as the constant σᶻ
QuantumSymbolics.Z1
— ConstantBasis state of σᶻ
QuantumSymbolics.Z2
— ConstantBasis state of σᶻ
QuantumSymbolics.vac
— ConstantVacuum basis state of n
QuantumSymbolics.AbstractRepresentation
— TypeAn abstract type for the supported representation of quantum objects.
QuantumSymbolics.CliffordRepr
— TypeRepresentation using tableaux governed by QuantumClifford.jl
QuantumSymbolics.CoherentState
— TypeCoherent state in defined Fock basis.
QuantumSymbolics.CreateOp
— TypeCreation (raising) operator.
julia> f = FockState(2)
+Autogenerated API list
QuantumSymbolics.CNOT
— ConstantCNOT gate
sourceQuantumSymbolics.CPHASE
— ConstantCPHASE gate
sourceQuantumSymbolics.Create
— ConstantCreation operator, also available as the constant âꜛ
, in an infinite dimension Fock basis. There is no unicode dagger superscript, so we use the uparrow
sourceQuantumSymbolics.Destroy
— ConstantAnnihilation operator, also available as the constant â
, in an infinite dimension Fock basis.
sourceQuantumSymbolics.F₁
— ConstantSingle photon basis state of n
sourceQuantumSymbolics.H
— ConstantHadamard gate
sourceQuantumSymbolics.I
— ConstantIdentity operator in qubit basis
sourceQuantumSymbolics.N
— ConstantNumber operator, also available as the constant n̂
, in an infinite dimension Fock basis.
sourceQuantumSymbolics.Pm
— ConstantPauli "minus" operator, also available as the constant σ₋
sourceQuantumSymbolics.Pp
— ConstantPauli "plus" operator, also available as the constant σ₊
sourceQuantumSymbolics.X
— ConstantPauli X operator, also available as the constant σˣ
sourceQuantumSymbolics.X1
— ConstantBasis state of σˣ
sourceQuantumSymbolics.X2
— ConstantBasis state of σˣ
sourceQuantumSymbolics.Y
— ConstantPauli Y operator, also available as the constant σʸ
sourceQuantumSymbolics.Y1
— ConstantBasis state of σʸ
sourceQuantumSymbolics.Y2
— ConstantBasis state of σʸ
sourceQuantumSymbolics.Z
— ConstantPauli Z operator, also available as the constant σᶻ
sourceQuantumSymbolics.Z1
— ConstantBasis state of σᶻ
sourceQuantumSymbolics.Z2
— ConstantBasis state of σᶻ
sourceQuantumSymbolics.vac
— ConstantVacuum basis state of n
sourceQuantumSymbolics.AbstractRepresentation
— TypeAn abstract type for the supported representation of quantum objects.
sourceQuantumSymbolics.CliffordRepr
— TypeRepresentation using tableaux governed by QuantumClifford.jl
sourceQuantumSymbolics.CoherentState
— TypeCoherent state in defined Fock basis.
sourceQuantumSymbolics.CreateOp
— TypeCreation (raising) operator.
julia> f = FockState(2)
|2⟩
julia> create = CreateOp()
a†
julia> qsimplify(create*f, rewriter=qsimplify_fock)
-(sqrt(3))|3⟩
sourceQuantumSymbolics.DephasingCPTP
— TypeSingle-qubit dephasing CPTP map
sourceQuantumSymbolics.DestroyOp
— TypeAnnihilation (lowering or destroy) operator in defined Fock basis.
julia> f = FockState(2)
+(sqrt(3))|3⟩
sourceQuantumSymbolics.DephasingCPTP
— TypeSingle-qubit dephasing CPTP map
sourceQuantumSymbolics.DestroyOp
— TypeAnnihilation (lowering or destroy) operator in defined Fock basis.
julia> f = FockState(2)
|2⟩
julia> destroy = DestroyOp()
a
julia> qsimplify(destroy*f, rewriter=qsimplify_fock)
-(sqrt(2))|1⟩
sourceQuantumSymbolics.DisplaceOp
— TypeDisplacement operator in defined Fock basis.
julia> f = FockState(0)
+(sqrt(2))|1⟩
sourceQuantumSymbolics.DisplaceOp
— TypeDisplacement operator in defined Fock basis.
julia> f = FockState(0)
|0⟩
julia> displace = DisplaceOp(im)
D(im)
julia> qsimplify(displace*f, rewriter=qsimplify_fock)
-|im⟩
sourceQuantumSymbolics.FockState
— TypeFock state in defined Fock basis.
sourceQuantumSymbolics.GateCPTP
— TypeA unitary gate followed by a CPTP map
sourceQuantumSymbolics.IdentityOp
— TypeThe identity operator for a given basis
julia> IdentityOp(X1⊗X2)
+|im⟩
sourceQuantumSymbolics.FockState
— TypeFock state in defined Fock basis.
sourceQuantumSymbolics.GateCPTP
— TypeA unitary gate followed by a CPTP map
sourceQuantumSymbolics.IdentityOp
— TypeThe identity operator for a given basis
julia> IdentityOp(X1⊗X2)
𝕀
julia> express(IdentityOp(Z2))
Operator(dim=2x2)
- basis: Spin(1/2)sparse([1, 2], [1, 2], ComplexF64[1.0 + 0.0im, 1.0 + 0.0im], 2, 2)
sourceQuantumSymbolics.KrausRepr
— TypeKraus representation of a quantum channel
julia> @op A₁; @op A₂; @op A₃;
+ basis: Spin(1/2)sparse([1, 2], [1, 2], ComplexF64[1.0 + 0.0im, 1.0 + 0.0im], 2, 2)
sourceQuantumSymbolics.KrausRepr
— TypeKraus representation of a quantum channel
julia> @op A₁; @op A₂; @op A₃;
julia> K = kraus(A₁, A₂, A₃)
𝒦(A₁,A₂,A₃)
@@ -38,7 +38,7 @@
julia> @op ρ;
julia> K*ρ
-(A₁ρA₁†+A₂ρA₂†+A₃ρA₃†)
sourceQuantumSymbolics.MixedState
— TypeCompletely depolarized state
julia> MixedState(X1⊗X2)
+(A₁ρA₁†+A₂ρA₂†+A₃ρA₃†)
sourceQuantumSymbolics.MixedState
— TypeCompletely depolarized state
julia> MixedState(X1⊗X2)
𝕄
julia> express(MixedState(X1⊗X2))
@@ -55,52 +55,52 @@
𝒵ₗ━━
+ Z_
-+ _Z
sourceQuantumSymbolics.NumberOp
— TypeNumber operator.
julia> f = FockState(2)
++ _Z
sourceQuantumSymbolics.NumberOp
— TypeNumber operator.
julia> f = FockState(2)
|2⟩
julia> num = NumberOp()
n
julia> qsimplify(num*f, rewriter=qsimplify_fock)
-2|2⟩
sourceQuantumSymbolics.PauliNoiseCPTP
— TypeSingle-qubit Pauli noise CPTP map
julia> apply!(express(Z1), [1], express(PauliNoiseCPTP(1/4,1/4,1/4)))
+2|2⟩
sourceQuantumSymbolics.PauliNoiseCPTP
— TypeSingle-qubit Pauli noise CPTP map
julia> apply!(express(Z1), [1], express(PauliNoiseCPTP(1/4,1/4,1/4)))
Operator(dim=2x2)
basis: Spin(1/2)
0.5+0.0im 0.0+0.0im
- 0.0+0.0im 0.5+0.0im
sourceQuantumSymbolics.PhaseShiftOp
— TypePhase-shift operator in defined Fock basis.
julia> c = CoherentState(im)
+ 0.0+0.0im 0.5+0.0im
sourceQuantumSymbolics.PhaseShiftOp
— TypePhase-shift operator in defined Fock basis.
julia> c = CoherentState(im)
|im⟩
julia> phase = PhaseShiftOp(pi)
U(π)
julia> qsimplify(phase*c, rewriter=qsimplify_fock)
-|1.2246467991473532e-16 - 1.0im⟩
sourceQuantumSymbolics.QuantumMCRepr
— TypeSimilar to QuantumOpticsRepr
, but using trajectories instead of superoperators.
sourceQuantumSymbolics.QuantumOpticsRepr
— TypeRepresentation using kets, bras, density matrices, and superoperators governed by QuantumOptics.jl
.
sourceQuantumSymbolics.SAdd
— TypeAddition of quantum objects (kets, operators, or bras).
julia> @ket k₁; @ket k₂;
+|1.2246467991473532e-16 - 1.0im⟩
sourceQuantumSymbolics.QuantumMCRepr
— TypeSimilar to QuantumOpticsRepr
, but using trajectories instead of superoperators.
sourceQuantumSymbolics.QuantumOpticsRepr
— TypeRepresentation using kets, bras, density matrices, and superoperators governed by QuantumOptics.jl
.
sourceQuantumSymbolics.SAdd
— TypeAddition of quantum objects (kets, operators, or bras).
julia> @ket k₁; @ket k₂;
julia> k₁ + k₂
-(|k₁⟩+|k₂⟩)
sourceQuantumSymbolics.SAnticommutator
— TypeSymbolic anticommutator of two operators.
julia> @op A; @op B;
+(|k₁⟩+|k₂⟩)
sourceQuantumSymbolics.SAnticommutator
— TypeSymbolic anticommutator of two operators.
julia> @op A; @op B;
julia> anticommutator(A, B)
-{A,B}
sourceQuantumSymbolics.SApplyBra
— TypeSymbolic application of an operator on a bra (from the right).
julia> @bra b; @op A;
+{A,B}
sourceQuantumSymbolics.SApplyBra
— TypeSymbolic application of an operator on a bra (from the right).
julia> @bra b; @op A;
julia> b*A
-⟨b|A
sourceQuantumSymbolics.SApplyKet
— TypeSymbolic application of an operator on a ket (from the left).
julia> @ket k; @op A;
+⟨b|A
sourceQuantumSymbolics.SApplyKet
— TypeSymbolic application of an operator on a ket (from the left).
julia> @ket k; @op A;
julia> A*k
-A|k⟩
sourceQuantumSymbolics.SBra
— TypeSymbolic bra
sourceQuantumSymbolics.SBraKet
— TypeSymbolic inner product of a bra and a ket.
julia> @bra b; @ket k;
+A|k⟩
sourceQuantumSymbolics.SBra
— TypeSymbolic bra
sourceQuantumSymbolics.SBraKet
— TypeSymbolic inner product of a bra and a ket.
julia> @bra b; @ket k;
julia> b*k
-⟨b||k⟩
sourceQuantumSymbolics.SCommutator
— TypeSymbolic commutator of two operators.
julia> @op A; @op B;
+⟨b||k⟩
sourceQuantumSymbolics.SCommutator
— TypeSymbolic commutator of two operators.
julia> @op A; @op B;
julia> commutator(A, B)
[A,B]
julia> commutator(A, A)
-𝟎
sourceQuantumSymbolics.SConjugate
— TypeComplex conjugate of quantum objects (kets, bras, operators).
julia> @op A; @ket k;
+𝟎
sourceQuantumSymbolics.SConjugate
— TypeComplex conjugate of quantum objects (kets, bras, operators).
julia> @op A; @ket k;
julia> conj(A)
Aˣ
julia> conj(k)
-|k⟩ˣ
sourceQuantumSymbolics.SDagger
— TypeDagger, i.e., adjoint of quantum objects (kets, bras, operators).
julia> @ket a; @op A;
+|k⟩ˣ
sourceQuantumSymbolics.SDagger
— TypeDagger, i.e., adjoint of quantum objects (kets, bras, operators).
julia> @ket a; @op A;
julia> dagger(2*im*A*a)
(0 - 2im)|a⟩†A†
@@ -116,22 +116,22 @@
ℋ
julia> dagger(U)
-U⁻¹
sourceQuantumSymbolics.SExpOperator
— TypeExponential of a symbolic operator.
julia> @op A; @op B;
+U⁻¹
sourceQuantumSymbolics.SExpOperator
— TypeExponential of a symbolic operator.
julia> @op A; @op B;
julia> exp(A)
-exp(A)
sourceQuantumSymbolics.SHermitianOperator
— TypeSymbolic Hermitian operator
sourceQuantumSymbolics.SHermitianUnitaryOperator
— TypeSymbolic Hermitian and unitary operator
sourceQuantumSymbolics.SInvOperator
— TypeInverse of an operator.
julia> @op A;
+exp(A)
sourceQuantumSymbolics.SHermitianOperator
— TypeSymbolic Hermitian operator
sourceQuantumSymbolics.SHermitianUnitaryOperator
— TypeSymbolic Hermitian and unitary operator
sourceQuantumSymbolics.SInvOperator
— TypeInverse of an operator.
julia> @op A;
julia> inv(A)
A⁻¹
julia> inv(A)*A
-𝕀
sourceQuantumSymbolics.SKet
— TypeSymbolic ket
sourceQuantumSymbolics.SMulOperator
— TypeSymbolic application of operator on operator.
julia> @op A; @op B;
+𝕀
sourceQuantumSymbolics.SKet
— TypeSymbolic ket
sourceQuantumSymbolics.SMulOperator
— TypeSymbolic application of operator on operator.
julia> @op A; @op B;
julia> A*B
-AB
sourceQuantumSymbolics.SOperator
— TypeSymbolic operator
sourceQuantumSymbolics.SOuterKetBra
— TypeSymbolic outer product of a ket and a bra.
julia> @bra b; @ket k;
+AB
sourceQuantumSymbolics.SOperator
— TypeSymbolic operator
sourceQuantumSymbolics.SOuterKetBra
— TypeSymbolic outer product of a ket and a bra.
julia> @bra b; @ket k;
julia> k*b
-|k⟩⟨b|
sourceQuantumSymbolics.SPartialTrace
— TypePartial trace over system i of a composite quantum system
julia> @op 𝒪 SpinBasis(1//2)⊗SpinBasis(1//2);
+|k⟩⟨b|
sourceQuantumSymbolics.SPartialTrace
— TypePartial trace over system i of a composite quantum system
julia> @op 𝒪 SpinBasis(1//2)⊗SpinBasis(1//2);
julia> op = ptrace(𝒪, 1)
tr1(𝒪)
@@ -162,14 +162,14 @@
((0 + ⟨b||k⟩)B+(tr(A))|k⟩⟨b|)
julia> ptrace(mixed_state, 2)
-((0 + ⟨b||k⟩)A+(tr(B))|k⟩⟨b|)
sourceQuantumSymbolics.SProjector
— TypeProjector for a given ket.
julia> projector(X1⊗X2)
+((0 + ⟨b||k⟩)A+(tr(B))|k⟩⟨b|)
sourceQuantumSymbolics.SProjector
— TypeProjector for a given ket.
julia> projector(X1⊗X2)
𝐏[|X₁⟩|X₂⟩]
julia> express(projector(X2))
Operator(dim=2x2)
basis: Spin(1/2)
0.5+0.0im -0.5-0.0im
- -0.5+0.0im 0.5+0.0im
sourceQuantumSymbolics.SScaled
— TypeScaling of a quantum object (ket, operator, or bra) by a number.
julia> @ket k
+ -0.5+0.0im 0.5+0.0im
sourceQuantumSymbolics.SScaled
— TypeScaling of a quantum object (ket, operator, or bra) by a number.
julia> @ket k
|k⟩
julia> 2*k
@@ -179,10 +179,10 @@
A
julia> 2*A
-2A
sourceQuantumSymbolics.SSuperOpApply
— TypeSymbolic application of a superoperator on an operator
julia> @op A; @superop S;
+2A
sourceQuantumSymbolics.SSuperOpApply
— TypeSymbolic application of a superoperator on an operator
julia> @op A; @superop S;
julia> S*A
-S[A]
sourceQuantumSymbolics.SSuperOperator
— TypeSymbolic superoperator
sourceQuantumSymbolics.STrace
— TypeTrace of an operator
julia> @op A; @op B;
+S[A]
sourceQuantumSymbolics.SSuperOperator
— TypeSymbolic superoperator
sourceQuantumSymbolics.STrace
— TypeTrace of an operator
julia> @op A; @op B;
julia> tr(A)
tr(A)
@@ -193,7 +193,7 @@
julia> @bra b; @ket k;
julia> tr(k*b)
-⟨b||k⟩
sourceQuantumSymbolics.STranspose
— TypeTranspose of quantum objects (kets, bras, operators).
julia> @op A; @op B; @ket k;
+⟨b||k⟩
sourceQuantumSymbolics.STranspose
— TypeTranspose of quantum objects (kets, bras, operators).
julia> @op A; @op B; @ket k;
julia> transpose(A)
Aᵀ
@@ -202,13 +202,17 @@
(Aᵀ+Bᵀ)
julia> transpose(k)
-|k⟩ᵀ
sourceQuantumSymbolics.SUnitaryOperator
— TypeSymbolic unitary operator
sourceQuantumSymbolics.SVec
— TypeVectorization of a symbolic operator.
julia> @op A; @op B;
+|k⟩ᵀ
sourceQuantumSymbolics.SUnitaryOperator
— TypeSymbolic unitary operator
sourceQuantumSymbolics.SVec
— TypeVectorization of a symbolic operator.
julia> @op A; @op B;
julia> vec(A)
|A⟩⟩
julia> vec(A+B)
-(|A⟩⟩+|B⟩⟩)
sourceQuantumSymbolics.SZeroBra
— TypeSymbolic zero bra
sourceQuantumSymbolics.SZeroKet
— TypeSymbolic zero ket
sourceQuantumSymbolics.SZeroOperator
— TypeSymbolic zero operator
sourceQuantumSymbolics.StabilizerState
— TypeState defined by a stabilizer tableau
For full functionality you also need to import the QuantumClifford
library.
julia> using QuantumClifford, QuantumOptics # needed for the internal representation of the stabilizer tableaux and the conversion to a ket
+(|A⟩⟩+|B⟩⟩)
sourceQuantumSymbolics.SZeroBra
— TypeSymbolic zero bra
sourceQuantumSymbolics.SZeroKet
— TypeSymbolic zero ket
sourceQuantumSymbolics.SZeroOperator
— TypeSymbolic zero operator
sourceQuantumSymbolics.SqueezeOp
— TypeSqueezing operator in defined Fock basis.
julia> S = SqueezeOp(pi)
+S(π)
+
+julia> qsimplify(S*vac, rewriter=qsimplify_fock)
+|0,π⟩
sourceQuantumSymbolics.SqueezedState
— TypeSqueezed vacuum state in defined Fock basis.
sourceQuantumSymbolics.StabilizerState
— TypeState defined by a stabilizer tableau
For full functionality you also need to import the QuantumClifford
library.
julia> using QuantumClifford, QuantumOptics # needed for the internal representation of the stabilizer tableaux and the conversion to a ket
julia> StabilizerState(S"XX ZZ")
𝒮₂
@@ -217,12 +221,12 @@
Ket(dim=2)
basis: Spin(1/2)
0.7071067811865475 + 0.0im
- -0.7071067811865475 + 0.0im
sourceBase.conj
— Methodconj(x::Symbolic{AbstractKet})
+ -0.7071067811865475 + 0.0im
sourceBase.conj
— Methodconj(x::Symbolic{AbstractKet})
conj(x::Symbolic{AbstractBra})
conj(x::Symbolic{AbstractOperator})
-conj(x::Symbolic{AbstractSuperOperator})
Symbolic transpose operation. See also SConjugate
.
sourceBase.exp
— Methodexp(x::Symbolic{AbstractOperator})
Symbolic inverse of an operator. See also SExpOperator
.
sourceBase.inv
— Methodinv(x::Symbolic{AbstractOperator})
Symbolic inverse of an operator. See also SInvOperator
.
sourceBase.transpose
— Methodtranspose(x::Symbolic{AbstractKet})
+conj(x::Symbolic{AbstractSuperOperator})
Symbolic transpose operation. See also SConjugate
.
sourceBase.exp
— Methodexp(x::Symbolic{AbstractOperator})
Symbolic inverse of an operator. See also SExpOperator
.
sourceBase.inv
— Methodinv(x::Symbolic{AbstractOperator})
Symbolic inverse of an operator. See also SInvOperator
.
sourceBase.transpose
— Methodtranspose(x::Symbolic{AbstractKet})
transpose(x::Symbolic{AbstractBra})
-transpose(x::Symbolic{AbstractOperator})
Symbolic transpose operation. See also STranspose
.
sourceBase.vec
— Methodvec(x::Symbolic{AbstractOperator})
Symbolic vector representation of an operator. See also SVec
.
sourceLinearAlgebra.tr
— Methodtr(x::Symbolic{AbstractOperator})
Symbolic trace operation. See also STrace
.
sourceQuantumInterface.dagger
— Methoddagger(x::Symbolic{AbstractBra})
Symbolic transpose operation. See also SDagger
.
sourceQuantumInterface.dagger
— Methoddagger(x::Symbolic{AbstractKet})
Symbolic transpose operation. See also SDagger
.
sourceQuantumInterface.dagger
— Methoddagger(x::Symbolic{AbstractOperator})
Symbolic transpose operation. See also SDagger
.
sourceQuantumInterface.projector
— Methodprojector(x::Symbolic{AbstractKet})
Symbolic projection operation. See also SProjector
.
sourceQuantumInterface.ptrace
— Methodptrace(x::Symbolic{AbstractOperator})
Symbolic partial trace operation. See also SPartialTrace
.
sourceQuantumSymbolics.anticommutator
— FunctionThe anticommutator of two operators.
sourceQuantumSymbolics.commutator
— FunctionThe commutator of two operators.
sourceQuantumSymbolics.consistent_representation
— MethodPick a representation that is consistent with given representations and appropriate for the given state.
sourceQuantumSymbolics.express
— Functionexpress(s, repr::AbstractRepresentation=QuantumOpticsRepr()[, use::AbstractUse])
The main interface for expressing quantum objects in various representations.
julia> express(X1)
+transpose(x::Symbolic{AbstractOperator})
Symbolic transpose operation. See also STranspose
.
sourceBase.vec
— Methodvec(x::Symbolic{AbstractOperator})
Symbolic vector representation of an operator. See also SVec
.
sourceLinearAlgebra.tr
— Methodtr(x::Symbolic{AbstractOperator})
Symbolic trace operation. See also STrace
.
sourceQuantumInterface.dagger
— Methoddagger(x::Symbolic{AbstractBra})
Symbolic transpose operation. See also SDagger
.
sourceQuantumInterface.dagger
— Methoddagger(x::Symbolic{AbstractKet})
Symbolic transpose operation. See also SDagger
.
sourceQuantumInterface.dagger
— Methoddagger(x::Symbolic{AbstractOperator})
Symbolic transpose operation. See also SDagger
.
sourceQuantumInterface.projector
— Methodprojector(x::Symbolic{AbstractKet})
Symbolic projection operation. See also SProjector
.
sourceQuantumInterface.ptrace
— Methodptrace(x::Symbolic{AbstractOperator})
Symbolic partial trace operation. See also SPartialTrace
.
sourceQuantumSymbolics.anticommutator
— FunctionThe anticommutator of two operators.
sourceQuantumSymbolics.commutator
— FunctionThe commutator of two operators.
sourceQuantumSymbolics.consistent_representation
— MethodPick a representation that is consistent with given representations and appropriate for the given state.
sourceQuantumSymbolics.express
— Functionexpress(s, repr::AbstractRepresentation=QuantumOpticsRepr()[, use::AbstractUse])
The main interface for expressing quantum objects in various representations.
julia> express(X1)
Ket(dim=2)
basis: Spin(1/2)
0.7071067811865475 + 0.0im
@@ -242,7 +246,7 @@
sX
julia> express(QuantumSymbolics.X, CliffordRepr(), UseAsObservable())
-+ X
sourceQuantumSymbolics.qexpand
— Methodqexpand(s)
Manually expand a symbolic expression of quantum objects.
julia> @op A; @op B; @op C;
++ X
sourceQuantumSymbolics.qexpand
— Methodqexpand(s)
Manually expand a symbolic expression of quantum objects.
julia> @op A; @op B; @op C;
julia> qexpand(commutator(A, B))
(-1BA+AB)
@@ -253,20 +257,20 @@
julia> @ket k₁; @ket k₂;
julia> qexpand(A*(k₁+k₂))
-(A|k₁⟩+A|k₂⟩)
sourceQuantumSymbolics.qsimplify
— Methodqsimplify(s; rewriter=nothing)
Manually simplify a symbolic expression of quantum objects.
If the keyword rewriter
is not specified, then qsimplify
will apply every defined rule to the expression. For performance or single-purpose motivations, the user has the option to define a specific rewriter for qsimplify
to apply to the expression. The defined rewriters for simplification are the following objects: - qsimplify_pauli
- qsimplify_commutator
- qsimplify_anticommutator
julia> qsimplify(σʸ*commutator(σˣ*σᶻ, σᶻ))
+(A|k₁⟩+A|k₂⟩)
sourceQuantumSymbolics.qsimplify
— Methodqsimplify(s; rewriter=nothing)
Manually simplify a symbolic expression of quantum objects.
If the keyword rewriter
is not specified, then qsimplify
will apply every defined rule to the expression. For performance or single-purpose motivations, the user has the option to define a specific rewriter for qsimplify
to apply to the expression. The defined rewriters for simplification are the following objects: - qsimplify_pauli
- qsimplify_commutator
- qsimplify_anticommutator
julia> qsimplify(σʸ*commutator(σˣ*σᶻ, σᶻ))
(0 - 2im)Z
julia> qsimplify(anticommutator(σˣ, σˣ), rewriter=qsimplify_anticommutator)
-2𝕀
sourceQuantumSymbolics.@bra
— Macro@bra(name, basis=SpinBasis(1//2))
Define a symbolic bra of type SBra
. By default, the defined basis is the spin-1/2 basis.
julia> @bra b₁
+2𝕀
sourceQuantumSymbolics.@bra
— Macro@bra(name, basis=SpinBasis(1//2))
Define a symbolic bra of type SBra
. By default, the defined basis is the spin-1/2 basis.
julia> @bra b₁
⟨b₁|
julia> @bra b₂ FockBasis(2)
-⟨b₂|
sourceQuantumSymbolics.@ket
— Macro@ket(name, basis=SpinBasis(1//2))
Define a symbolic ket of type SKet
. By default, the defined basis is the spin-1/2 basis.
julia> @ket k₁
+⟨b₂|
sourceQuantumSymbolics.@ket
— Macro@ket(name, basis=SpinBasis(1//2))
Define a symbolic ket of type SKet
. By default, the defined basis is the spin-1/2 basis.
julia> @ket k₁
|k₁⟩
julia> @ket k₂ FockBasis(2)
-|k₂⟩
sourceQuantumSymbolics.@op
— Macro@op(name, basis=SpinBasis(1//2))
Define a symbolic ket of type SOperator
. By default, the defined basis is the spin-1/2 basis.
julia> @op A
+|k₂⟩
sourceQuantumSymbolics.@op
— Macro@op(name, basis=SpinBasis(1//2))
Define a symbolic ket of type SOperator
. By default, the defined basis is the spin-1/2 basis.
julia> @op A
A
julia> @op B FockBasis(2)
-B
source
Settings
This document was generated with Documenter.jl version 1.7.0 on Thursday 12 September 2024. Using Julia version 1.10.5.