QuantumSymbolics.CNOT
— ConstantCNOT gate
diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 6275a96..021dbbe 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-22T17:40:10","documenter_version":"1.5.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-01T04:16:11","documenter_version":"1.5.0"}} \ No newline at end of file diff --git a/dev/API/index.html b/dev/API/index.html index 9d3ab72..b44c279 100644 --- a/dev/API/index.html +++ b/dev/API/index.html @@ -4,12 +4,12 @@ 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 âꜛ
- there is no unicode dagger superscript, so we use the uparrow
QuantumSymbolics.Destroy
— ConstantAnnihilation operator, also available as the constant â
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̂
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.DephasingCPTP
— TypeSingle-qubit dephasing CPTP map
QuantumSymbolics.GateCPTP
— TypeA unitary gate followed by a CPTP map
QuantumSymbolics.IdentityOp
— TypeThe identity operator for a given basis
julia> IdentityOp(X1⊗X2)
+Autogenerated API list
QuantumSymbolics.CNOT
— ConstantCNOT gate
sourceQuantumSymbolics.CPHASE
— ConstantCPHASE gate
sourceQuantumSymbolics.Create
— ConstantCreation operator, also available as the constant âꜛ
- there is no unicode dagger superscript, so we use the uparrow
sourceQuantumSymbolics.Destroy
— ConstantAnnihilation operator, also available as the constant â
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̂
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.DephasingCPTP
— TypeSingle-qubit dephasing CPTP map
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₃)
@@ -17,7 +17,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))
@@ -34,29 +34,29 @@
𝒵ₗ━━
+ Z_
-+ _Z
sourceQuantumSymbolics.PauliNoiseCPTP
— TypeSingle-qubit Pauli noise CPTP map
julia> apply!(express(Z1), [1], express(PauliNoiseCPTP(1/4,1/4,1/4)))
++ _Z
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.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₂;
+ 0.0+0.0im 0.5+0.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.SApplyBra
— TypeSymbolic application of an operator on a bra (from the right).
julia> @bra b; @op A;
+(|k₁⟩+|k₂⟩)
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.SHermitianOperator
— TypeSymbolic Hermitian operator
sourceQuantumSymbolics.SHermitianUnitaryOperator
— TypeSymbolic Hermitian and unitary operator
sourceQuantumSymbolics.SKet
— TypeSymbolic ket
sourceQuantumSymbolics.SMulOperator
— TypeSymbolic application of operator on operator.
julia> @op A; @op B;
+⟨b||k⟩
sourceQuantumSymbolics.SHermitianOperator
— TypeSymbolic Hermitian operator
sourceQuantumSymbolics.SHermitianUnitaryOperator
— TypeSymbolic Hermitian and unitary operator
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.SScaled
— TypeScaling of a quantum object (ket, operator, or bra) by a number.
julia> @ket k
+|k⟩⟨b|
sourceQuantumSymbolics.SScaled
— TypeScaling of a quantum object (ket, operator, or bra) by a number.
julia> @ket k
|k⟩
julia> 2*k
@@ -66,10 +66,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.SUnitaryOperator
— TypeSymbolic unitary operator
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
+S[A]
sourceQuantumSymbolics.SSuperOperator
— TypeSymbolic superoperator
sourceQuantumSymbolics.SUnitaryOperator
— TypeSymbolic unitary operator
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
julia> StabilizerState(S"XX ZZ")
𝒮₂
@@ -78,22 +78,22 @@
Ket(dim=2)
basis: Spin(1/2)
0.7071067811865475 + 0.0im
- -0.7071067811865475 + 0.0im
sourceBase.conj
— MethodComplex conjugate of quantum objects (kets, bras, operators).
julia> @op A; @ket k;
+ -0.7071067811865475 + 0.0im
sourceBase.conj
— MethodComplex conjugate of quantum objects (kets, bras, operators).
julia> @op A; @ket k;
julia> conj(A)
Aˣ
julia> conj(k)
-|k⟩ˣ
sourceBase.exp
— MethodExponential of a symbolic operator.
julia> @op A; @op B;
+|k⟩ˣ
sourceBase.exp
— MethodExponential of a symbolic operator.
julia> @op A; @op B;
julia> exp(A)
-exp(A)
sourceBase.inv
— MethodInverse of an operator.
julia> @op A;
+exp(A)
sourceBase.inv
— MethodInverse of an operator.
julia> @op A;
julia> inv(A)
A⁻¹
julia> inv(A)*A
-𝕀
sourceBase.transpose
— MethodTranspose of quantum objects (kets, bras, operators).
julia> @op A; @op B; @ket k;
+𝕀
sourceBase.transpose
— MethodTranspose of quantum objects (kets, bras, operators).
julia> @op A; @op B; @ket k;
julia> transpose(A)
Aᵀ
@@ -102,13 +102,13 @@
(Aᵀ+Bᵀ)
julia> transpose(k)
-|k⟩ᵀ
sourceBase.vec
— MethodVectorization of a symbolic operator.
julia> @op A; @op B;
+|k⟩ᵀ
sourceBase.vec
— MethodVectorization of a symbolic operator.
julia> @op A; @op B;
julia> vec(A)
|A⟩⟩
julia> vec(A+B)
-(|A⟩⟩+|B⟩⟩)
sourceLinearAlgebra.tr
— MethodTrace of an operator
julia> @op A; @op B;
+(|A⟩⟩+|B⟩⟩)
sourceLinearAlgebra.tr
— MethodTrace of an operator
julia> @op A; @op B;
julia> tr(A)
tr(A)
@@ -119,7 +119,7 @@
julia> @bra b; @ket k;
julia> tr(k*b)
-⟨b||k⟩
sourceQuantumInterface.dagger
— MethodDagger, i.e., adjoint of quantum objects (kets, bras, operators).
julia> @ket a; @op A;
+⟨b||k⟩
sourceQuantumInterface.dagger
— MethodDagger, i.e., adjoint of quantum objects (kets, bras, operators).
julia> @ket a; @op A;
julia> dagger(2*im*A*a)
(0 - 2im)|a⟩†A†
@@ -135,14 +135,14 @@
ℋ
julia> dagger(U)
-U⁻¹
sourceQuantumInterface.projector
— MethodProjector for a given ket.
julia> projector(X1⊗X2)
+U⁻¹
sourceQuantumInterface.projector
— MethodProjector 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
sourceQuantumInterface.ptrace
— MethodPartial trace over system i of a composite quantum system
julia> @op 𝒪 SpinBasis(1//2)⊗SpinBasis(1//2);
+ -0.5+0.0im 0.5+0.0im
sourceQuantumInterface.ptrace
— MethodPartial trace over system i of a composite quantum system
julia> @op 𝒪 SpinBasis(1//2)⊗SpinBasis(1//2);
julia> op = ptrace(𝒪, 1)
tr1(𝒪)
@@ -173,16 +173,16 @@
((0 + ⟨b||k⟩)B+(tr(A))|k⟩⟨b|)
julia> ptrace(mixed_state, 2)
-((0 + ⟨b||k⟩)A+(tr(B))|k⟩⟨b|)
sourceQuantumSymbolics.anticommutator
— MethodSymbolic anticommutator of two operators.
julia> @op A; @op B;
+((0 + ⟨b||k⟩)A+(tr(B))|k⟩⟨b|)
sourceQuantumSymbolics.anticommutator
— MethodSymbolic anticommutator of two operators.
julia> @op A; @op B;
julia> anticommutator(A, B)
-{A,B}
sourceQuantumSymbolics.commutator
— MethodSymbolic commutator of two operators.
julia> @op A; @op B;
+{A,B}
sourceQuantumSymbolics.commutator
— MethodSymbolic commutator of two operators.
julia> @op A; @op B;
julia> commutator(A, B)
[A,B]
julia> commutator(A, A)
-𝟎
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)
+𝟎
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
@@ -202,7 +202,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)
@@ -213,20 +213,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.5.0 on Monday 22 July 2024. Using Julia version 1.10.4.