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
Add a circular arc through three points on the Bloch sphere.
351
+
352
+
# Arguments
353
+
354
+
- `b::Bloch`: The Bloch sphere object to modify.
355
+
- `start_point::QuantumObject`: The starting quantum state. Can be a [`Ket`](@ref), [`Bra`](@ref), or [`Operator`](@ref).
356
+
- `middle_point::QuantumObject`: [Optional] The middle quantum state. Can be a [`Ket`](@ref), [`Bra`](@ref), or [`Operator`](@ref).
357
+
- `end_point::QuantumObject`: The ending quantum state. Can be a [`Ket`](@ref), [`Bra`](@ref), or [`Operator`](@ref).
358
+
359
+
# Description
360
+
361
+
This function converts the given quantum states into their Bloch vector representations and adds a arc between these two (or three) points on the Bloch sphere visualization.
362
+
"""
363
+
functionadd_arc!(
364
+
b::Bloch,
365
+
start_point::QuantumObject{OpType1},
366
+
end_point::QuantumObject{OpType2},
367
+
) where {OpType1<:Union{Ket,Bra,Operator},OpType2<:Union{Ket,Bra,Operator}}
368
+
coords1 =_state_to_bloch(start_point)
369
+
coords2 =_state_to_bloch(end_point)
370
+
returnadd_arc!(b, coords1, coords2)
371
+
end
372
+
functionadd_arc!(
373
+
b::Bloch,
374
+
start_point::QuantumObject{OpType1},
375
+
middle_point::QuantumObject{OpType2},
376
+
end_point::QuantumObject{OpType3},
377
+
) where {OpType1<:Union{Ket,Bra,Operator},OpType2<:Union{Ket,Bra,Operator},OpType3<:Union{Ket,Bra,Operator}}
0 commit comments