@@ -187,23 +187,17 @@ end
187
187
color (m:: AbstractBlock ) = color (typeof (m))
188
188
color (:: Type{<:ControlBlock} ) = :red
189
189
color (:: Type{<:ChainBlock} ) = :blue
190
- color (:: Type{<:MathGate} ) = :red
191
190
color (:: Type{<:Add} ) = :red
192
191
color (:: Type{<:PutBlock} ) = :cyan
193
- color (:: Type{T} ) where {T<: PauliString } = :cyan
194
192
color (:: Type{<:RepeatedBlock} ) = :cyan
195
193
color (:: Type{<:GeneralMatrixBlock} ) = :red
196
194
197
- # color(::Type{T}) where {T <: PauliString} = :cyan
198
- # color(::Type{T}) where {T <: Sequential} = :blue
199
-
200
195
print_block (io:: IO , g:: PhaseGate ) = print (io, " phase(" , g. theta, " )" )
201
196
print_block (io:: IO , S:: ShiftGate ) = print (io, " shift(" , S. theta, " )" )
202
197
print_block (io:: IO , R:: RotationGate ) = print (io, " rot(" , summary (content (R)), " , " , R. theta, " )" )
203
198
print_block (io:: IO , x:: KronBlock ) = printstyled (io, " kron" ; bold = true , color = color (KronBlock))
204
199
print_block (io:: IO , x:: ChainBlock ) = printstyled (io, " chain" ; bold = true , color = color (ChainBlock))
205
200
print_block (io:: IO , x:: UnitaryChannel ) = printstyled (io, " unitary_channel" ; bold = true )
206
- print_block (io:: IO , x:: ReflectGate{N} ) where {N} = print (io, " reflect($(summary (x. psi)) )" )
207
201
print_block (io:: IO , c:: Subroutine ) = print (io, " Subroutine: " , occupied_locs (c))
208
202
print_block (io:: IO , c:: CachedBlock ) = print_block (io, content (c))
209
203
print_block (io:: IO , c:: Add ) = printstyled (io, " +" ; bold = true , color = color (Add))
@@ -236,14 +230,6 @@ function print_block(io::IO, c::Measure{N,K,OT}) where {N,K,OT}
236
230
end
237
231
238
232
# TODO : use OhMyREPL's default syntax highlighting for functions
239
- function print_block (io:: IO , m:: MathGate{N,<:LegibleLambda} ) where {N}
240
- printstyled (io, " mathgate($(m. f) ; nbits=$N )" ; bold = true , color = color (m))
241
- end
242
-
243
- function print_block (io:: IO , m:: MathGate{N,<:Function} ) where {N}
244
- printstyled (io, " mathgate($(nameof (m. f)) ; nbits=$N )" ; bold = true , color = color (m))
245
- end
246
-
247
233
function print_block (io:: IO , te:: TimeEvolution )
248
234
println (io, " Time Evolution Δt = $(te. dt) , tol = $(te. tol) " )
249
235
print_tree (io, te. H; title = false )
@@ -285,10 +271,6 @@ function print_block(io::IO, rb::RepeatedBlock{N}) where {N}
285
271
printstyled (io, " )" ; bold = true , color = color (RepeatedBlock))
286
272
end
287
273
288
- function print_block (io:: IO , x:: PauliString )
289
- printstyled (io, " PauliString" ; bold = true , color = color (PauliString))
290
- end
291
-
292
274
# forward to simplify interfaces
293
275
function print_annotation (
294
276
io:: IO ,
0 commit comments