PulseSequenceRandomizedRotations submodule

Contains functions to animate and calculate states using pulse sequences with arbitrary x- and randomized z-rotations.

Usage

using BlochSphereBigFloat
using BlochSphereBigFloat.PulseSequenceRandomizedRotations

Index

API

BlochSphereBigFloat.PulseSequenceRandomizedRotations.animate_sequence_pathMethod
function animate_sequence_path(ωs::Vector{BigFloat}, pulses::Vector{Tuple{Symbol, BigFloat}}, N::Int64; s_start=false, plot_trace=true, plot_step_trace=false, plot_arrow=false, fps=24, markersize=5, kwargs...)

Animates the path of a sequence of single qubit states on the Bloch sphere, given a vector of frequencies ωs and a sequence of pulses defined by pulses. Each pulse is either a rotation around the z-axis with frequency ωs[i] and duration t, or a rotation around the x-axis with angle t. The initial state is given by s_start, and the number of steps for the maximal pulse is defined by N.

source
BlochSphereBigFloat.PulseSequenceRandomizedRotations.overlap_by_sequenceMethod
function overlap_by_sequence(ωs::Vector{BigFloat}, pulses::Vector{Tuple{Symbol, BigFloat}}; s_start::SingleQubitState=SingleQubitState(1,1), s_target::SingleQubitState=SingleQubitState(1,0))

Calculates the overlap of the states obtained from states_by_sequence with a target state s_target. The overlap is computed as the squared absolute value of the inner product between each state and the target state.

source
BlochSphereBigFloat.PulseSequenceRandomizedRotations.overlap_by_sequence_threadedMethod
function overlap_by_sequence_threaded(ωs::Vector{BigFloat}, pulses::Vector{Tuple{Symbol, BigFloat}}; s_start::SingleQubitState=SingleQubitState(1,1), s_target::SingleQubitState=SingleQubitState(1,0))

Calculates the overlap of the states obtained from states_by_sequence_threaded with a target state s_target, using multithreading for performance. The overlap is computed as the squared absolute value of the inner product between each state and the target state.

source
BlochSphereBigFloat.PulseSequenceRandomizedRotations.plot_sequence_pathMethod
function plot_sequence_path(ωs::Vector{BigFloat}, pulses::Vector{Tuple{Symbol, BigFloat}}, N::Int64; s_start=SingleQubitState([1,1]), pBlochargs=(colormap=:viridis,), kwargs...)

Plots the path of a sequence of single qubit states on the Bloch sphere, given a vector of frequencies ωs and a sequence of pulses defined by pulses. Each pulse is either a rotation around the z-axis with frequency ωs[i] and duration t, or a rotation around the x-axis with angle t. The initial state is given by s_start, and the number of steps for each pulse is defined by N.

For a mutable version, use plot_sequence_path!.

source
BlochSphereBigFloat.PulseSequenceRandomizedRotations.states_by_sequenceMethod
function states_by_sequence(ωs::Vector{BigFloat}, pulses::Vector{Tuple{Symbol, BigFloat}}; s_start::SingleQubitState=SingleQubitState(1,1))

Calculates the states of a single qubit after applying a sequence of pulses defined by pulses to the initial state s_start. Each pulse is either a rotation around the z-axis with frequency ωs[i] and duration t, or a rotation around the x-axis with angle t.

source
BlochSphereBigFloat.PulseSequenceRandomizedRotations.states_by_sequence_threadedMethod
function states_by_sequence_threaded(ωs::Vector{BigFloat}, pulses::Vector{Tuple{Symbol, BigFloat}}; s_start::SingleQubitState=SingleQubitState(1,1))

Calculates the states of a single qubit after applying a sequence of pulses defined by pulses to the initial state s_start, using multithreading for performance. Each pulse is either a rotation around the z-axis with frequency ωs[i] and duration t, or a rotation around the x-axis with angle t.

source