You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
((basis_l(bl) ==basis_r(bl)) && (basis_l(br) ==basis_r(br))) ||throw(ArgumentError("Superoperator must map between square operators in order to be converted to pauli represenation"))
44
-
45
-
for b in (basis_l(bl), basis_l(br))
46
-
for i=1:length(b)
47
-
(b[i] isa SpinBasis &&dimension(b[i]) ==2) ||throw(ArgumentError("Superoperator must be over systems composed of SpinBasis(1//2) to be converted to pauli representation"))
48
-
end
48
+
function_check_is_spinbasis(b)
49
+
for i=1:length(b)
50
+
(b[i] isa SpinBasis &&dimension(b[i]) ==2) ||throw(ArgumentError("Superoperator must be over systems composed of SpinBasis(1//2) to be converted to pauli representation"))
49
51
end
52
+
end
53
+
54
+
functionpauli(op::SOpKetBraType)
55
+
((basis_l(basis_l(op)) ==basis_r(basis_l(op))) && (basis_l(br) ==basis_r(basis_r(op)))) ||throw(ArgumentError("Superoperator must map between square operators in order to be converted to pauli represenation"))
(b[i] isa SpinBasis &&dimension(b[i]) ==2) ||throw(ArgumentError("Choi state must be over systems composed of SpinBasis(1//2) to be converted to chi representation"))
#const ChoiStateType = Union{Operator{CompositeBasis{ChoiBasis,S},CompositeBasis{ChoiBasis,T}} where {S,T}, Operator{CompositeBasis{ChoiBasis{BL},S},CompositeBasis{ChoiBasis{BR},T}} where {BL,BR,S,T}}
4
+
const SOpBasis = Union{KetBraBasis, PauliBasis}
5
+
const SuperOperatorType{BL,BR,T} = Operator{BL,BR,T} where {BL<:SOpBasis,BR<:SOpBasis}
6
+
const SOpKetBraType{BL,BR,T} = Operator{BL,BR,T} where {BL<:KetBraBasis,BR<:KetBraBasis}
7
+
const SOpPauliType{BL,BR,T} = Operator{BL,BR,T} where {BL<:PauliBasis,BR<:PauliBasis}
8
+
const ChoiStateType{BL,BR,T} = Operator{BL,BR,T} where {BR<:ChoiBasis,BL<:ChoiBasis}
9
+
const ChoiKetBraType{BL,BR,T} = Operator{ChoiBasis{BL,BR},ChoiBasis{BL,BR},T} where {BL<:KetBraBasis,BR<:KetBraBasis}
10
+
const ChiType{BL,BR,T} = Operator{ChoiBasis{BL,BR},ChoiBasis{BL,BR},T} where {BL<:PauliBasis,BR<:PauliBasis}
0 commit comments