22
33``` @meta
44DocTestSetup = quote
5- using QuantumClifford: @S_str, Destabilizer, MixedDestabilizer, MixedStabilizer, stabilizerview, destabilizerview, logicalxview, logicalzview, @T_str, _T_str, canonicalize!, Tableau
5+ using QuantumClifford
66end
77```
88
@@ -18,7 +18,7 @@ generators.
1818# Options for constructing with MixedDestabilizer
1919
2020- Given a ` Destabilizer ` object (which presumesfull rank), convert it
21- into a ` MixedDestabilizer ` object. This allows for the possibility of
21+ into a ` MixedDestabilizer ` object. This allows for the possibility of
2222rank deficiency.
2323
2424``` jldoctest mix
@@ -66,8 +66,8 @@ julia> logicalzview(m)
6666```
6767
6868- Similar to the first option, but with the added capability to
69- specify the "rank." This rank determines the number of rows
70- associated with the ` Stabilizer ` and the number corresponding
69+ specify the "rank". This rank determines the number of rows
70+ associated with the ` Stabilizer ` and the number corresponding
7171to the logical operators.
7272
7373``` jldoctest mix
@@ -80,10 +80,12 @@ julia> MixedDestabilizer(T"ZI IX XX ZZ", 2)
8080+ ZZ
8181```
8282
83- If the macro string ` @T_str ` is not convenient, use the normal strings
83+ If the macro string ` @T_str ` is not convenient, use the normal strings
8484` _T_str ` .
8585
8686``` jldoctest mix
87+ julia> using QuantumClifford: _T_str # hide
88+
8789julia> MixedDestabilizer(_T_str("ZI IX XX ZZ"), 2)
8890𝒟ℯ𝓈𝓉𝒶𝒷
8991+ Z_
@@ -93,10 +95,10 @@ julia> MixedDestabilizer(_T_str("ZI IX XX ZZ"), 2)
9395+ ZZ
9496```
9597
96- - Given a ` Stabilizer ` object (whichmay have fewer rows than columns)
97- , perform the necessary canonicalization to determine the
98- corresponding destabilizer and logical operators, resulting in a
99- complete MixedDestabilizer object.
98+ - Given a ` Stabilizer ` object (whichmay have fewer rows than columns),
99+ perform the necessary canonicalization to determine the corresponding
100+ destabilizer and logical operators, resulting in a complete
101+ MixedDestabilizer object.
100102
101103``` jldoctest mix
102104julia> s = S"-XXX
@@ -116,9 +118,9 @@ julia> MixedDestabilizer(s, undoperm=false, reportperm=false)
116118+ Z_Z
117119```
118120
119- When ` undoperm ` is set to ` false ` , the column permutations are not reversed.
120- As a result, the qubits may be reindexed according to the permutations
121- made during the canonicalization process.
121+ When ` undoperm ` is set to ` false ` , the column permutations are not
122+ reversed. As a result, the qubits may be reindexed according to
123+ the permutations made during the canonicalization process.
122124
123125``` jldoctest mix
124126julia> MixedDestabilizer(s, undoperm=true, reportperm=false)
@@ -134,9 +136,9 @@ julia> MixedDestabilizer(s, undoperm=true, reportperm=false)
134136+ ZZ_
135137```
136138
137- When ` undoperm ` is set to ` true ` , the column permutations performed during
138- canonicalizationare automatically reversed before finalizing the
139- ` MixedDestabilizer ` .
139+ When ` undoperm ` is set to ` true ` , the column permutations performed
140+ during canonicalizationare automatically reversed before finalizing
141+ the ` MixedDestabilizer ` .
140142
141143``` jldoctest mix
142144julia> MixedDestabilizer(canonicalize!(s))
@@ -152,12 +154,14 @@ julia> MixedDestabilizer(canonicalize!(s))
152154+ ZZ_
153155```
154156
155- - A low-level constructor that accepts a manually created ` Tableau ` object
156- and rank. Note that the ` Tableau ` object is not currently public. It
157- serves as the underlying data structure for all related objects but
158- does not assume commutativity or other properties.
157+ - A low-level constructor that accepts a manually created ` Tableau `
158+ object and rank. Note that the ` Tableau ` object is not currently
159+ public. It serves as the underlying data structure for all related
160+ objects but does not assume commutativity or other properties.
159161
160162``` jldoctest mix
163+ julia> using QuantumClifford: Tableau # hide
164+
161165julia> MixedDestabilizer(Tableau(Bool[0 0; 0 1; 1 1; 1 0],
162166 Bool[1 0; 0 0; 0 0; 1 1]), 2)
163167𝒟ℯ𝓈𝓉𝒶𝒷
@@ -170,9 +174,9 @@ julia> MixedDestabilizer(Tableau(Bool[0 0; 0 1; 1 1; 1 0],
170174
171175# Options for constructing with MixedStabilizer
172176
173- - Given a ` Stabilizer ` object (which presumesfull rank), convert it
174- into a ` MixedStabilizer ` object. This allows for the possibility of
175- rank deficiency.
177+ - Given a ` Stabilizer ` object (which presumesfull rank), convert
178+ it into a ` MixedStabilizer ` object. This allows for the
179+ possibility of rank deficiency.
176180
177181``` jldoctest mix
178182julia> s = S"-XXX
@@ -189,10 +193,10 @@ julia> MixedStabilizer(s, 2)
189193- Z_Z
190194```
191195
192- - Similar to the first option, but with the added capability to
193- specify the "rank." This rank determines the number of rows
194- associated with the ` Stabilizer ` and the number corresponding
195- to the logical operators.
196+ - Similar to the first option, but with the added capability
197+ to specify the "rank." This rank determines the number of
198+ rows associated with the ` Stabilizer ` and the number
199+ corresponding to the logical operators.
196200
197201``` jldoctest mix
198202julia> MixedStabilizer(S"-XXX -ZIZ IZZ")
@@ -207,7 +211,7 @@ julia> MixedStabilizer(S"-XXX -ZIZ IZZ", 2)
207211
208212- A low-level constructor that accepts a manually created ` Tableau `
209213object and rank. Note that the ` Tableau ` object is not currently
210- public. It serves as the underlying data structure for all related
214+ public. It serves as the underlying data structure for all related
211215objects but does not assume commutativity or other properties.
212216
213217``` jldoctest mix
0 commit comments