Nodes

Optimization variables

When performing optimizations, you can use these operations to create the optimizable variables that can be tuned by the optimizer in order to minimize your cost function.

anchored_difference_bounded_variablesCreate a sequence of optimizable variables with an anchored difference bound.
complex_optimizable_pwc_signalCreate a complex optimizable piecewise-constant signal.
optimizable_scalarCreate an optimizable scalar Tensor, which can be bounded, semi-bounded, or unbounded.
optimization_variableCreate a 1D Tensor of optimization variables, which can be bounded, semi-bounded, or unbounded.
real_fourier_pwc_signalCreate a piecewise-constant signal constructed from Fourier components.
real_fourier_stf_signalCreate a real sampleable signal constructed from Fourier components.
real_optimizable_pwc_signalCreate a real optimizable piecewise-constant signal.

Piecewise-constant tensor functions (PWCs)

You can use these operations to create piecewise-constant functions either to represent control signals or system Hamiltonians.

complex_pwc_signalCreate a complex piecewise-constant signal from moduli and phases.
constant_pwcCreate a piecewise-constant function of time that is constant over a specified duration.
constant_pwc_operatorCreate a constant piecewise-constant operator over a specified duration.
pwcCreate a piecewise-constant function of time.
pwc_operatorCreate a constant operator multiplied by a piecewise-constant signal.
pwc_signalCreate a piecewise-constant signal (scalar-valued function of time).
pwc_sumCreate the sum of multiple piecewise-constant terms.
real_fourier_pwc_signalCreate a piecewise-constant signal constructed from Fourier components.
sample_pwcSample a Pwc at the given times.
symmetrize_pwcCreate the symmetrization of a piecewise-constant function.
time_concatenate_pwcConcatenate multiple piecewise-constant functions in the time dimension.
time_reverse_pwcReverse in time a piecewise-constant function.

Sampleable tensor functions (STFs)

You can use these functions to represent time-dependent functions in Boulder Opal.

constant_stfCreate a constant sampleable tensor-valued function of time.
constant_stf_operatorCreate a constant operator.
identity_stfCreate an Stf representing the identity function, f(t) = t.
real_fourier_stf_signalCreate a real sampleable signal constructed from Fourier components.
sample_stfSample an Stf at the given times.
stf_operatorCreate a constant operator multiplied by a sampleable signal.
stf_sumCreate the sum of multiple sampleable functions.

Filtering and discretizing

You can use these functions to filter or resample the control signals.

convolve_pwcCreate the convolution of a piecewise-constant function with a kernel.
discretize_stfCreate a piecewise-constant function by discretizing a sampleable function.
filter_and_resample_pwcFilter a piecewise-constant function by convolving it with a kernel and resample it again.
gaussian_convolution_kernelCreate a convolution kernel representing a normalized Gaussian.
sinc_convolution_kernelCreate a convolution kernel representing the sinc function.

Predefined signals

You can use these operations to create common analytical signals.

For creating analytical signals not bound to a graph see the Signal library module.

signals.SegmentationTypeAn enumeration of segmentation types for piecewise-constant signals.
signals.cosine_pulse_pwcCreate a Pwc representing a cosine pulse.
signals.gaussian_pulse_pwcCreate a Pwc representing a Gaussian pulse.
signals.gaussian_pulse_stfCreate an Stf representing a Gaussian pulse.
signals.hann_series_pwcCreate a Pwc representing a sum of Hann window functions.
signals.hann_series_stfCreate an Stf representing a sum of Hann window functions.
signals.linear_ramp_pwcCreate a Pwc representing a linear ramp.
signals.linear_ramp_stfCreate an Stf representing a linear ramp.
signals.sech_pulse_pwcCreate a Pwc representing a hyperbolic secant pulse.
signals.sech_pulse_stfCreate an Stf representing a hyperbolic secant pulse.
signals.sinusoid_pwcCreate a Pwc representing a sinusoidal oscillation.
signals.sinusoid_stfCreate an Stf representing a sinusoidal oscillation.
signals.square_pulse_pwcCreate a Pwc representing a square pulse.
signals.tanh_ramp_pwcCreate a Pwc representing a hyperbolic tangent ramp.
signals.tanh_ramp_stfCreate an Stf representing a hyperbolic tangent ramp.

Quantum information

You can use these operations to calculate common operations and metrics from quantum information theory.

annihilation_operatorCreate an annihilation operator in the truncated Fock space.
coherent_stateCreate a coherent state (or a batch of them).
creation_operatorCreate a creation operator in the truncated Fock space.
density_matrix_expectation_valueCalculate the expectation value of an operator with respect to a density matrix.
density_matrix_infidelityCalculate the infidelity between two states represented by density matrices.
displacement_operatorCreate a displacement operator (or a batch of them).
embed_operatorsEmbed an operator or set of operators into a larger Hilbert space.
expectation_valueCalculate the expectation value of an operator with respect to a state.
fock_stateCreate a Fock state (or a batch of them).
inner_productCalculate the inner product of two vectors.
kronecker_product_listCalculate the Kronecker product between a list of operators.
number_operatorCreate a number operator in the truncated Fock space.
outer_productCalculate the outer product of two vectors.
partial_traceCalculate the partial trace of a density matrix.
pauli_kronecker_productPlace Pauli matrices into their two-dimensional subsystems of a system and returns the Kronecker product.
pauli_matrixCreate a Pauli matrix from a label.
squeeze_operatorCreate a squeeze operator (or a batch of them).
state_infidelityCalculate the infidelity of two pure states.
unitary_infidelityCalculate the infidelity between a target operation and the actual implemented unitary.
wigner_transformTransform a density matrix into a Wigner function (or a batch of them).

Time evolution

You can use these operations to calculate the time evolution of your open or closed quantum system, either for simulations or optimizations.

density_matrix_evolution_pwcCalculate the state evolution of an open system described by the GKS–Lindblad master equation.
estimated_krylov_subspace_dimension_lanczosCalculate an appropriate Krylov subspace dimension ($k$) to use in the Lanczos integrator while keeping the total error in the evolution below a given error tolerance.
filter_functionEvaluate the filter function for a control Hamiltonian and a noise operator at the given frequency elements.
frequency_domain_noise_operatorCreate a control-frame noise operator in the frequency domain for a control Hamiltonian and a noise operator at the given frequencies.
jump_trajectory_evolution_pwcCalculate the state evolution of an open system described by the GKS–Lindblad master equation using a jump-based trajectory method.
spectral_rangeObtain the range of the eigenvalues of a Hermitian operator.
state_evolution_pwcCalculate the time evolution of a state generated by a piecewise-constant Hamiltonian by using the Lanczos method.
steady_stateFind the steady state of a time-independent open quantum system.
time_evolution_operators_pwcCalculate the unitary time-evolution operators for a system defined by a piecewise-constant Hamiltonian.
time_evolution_operators_stfCalculate the time-evolution operators for a system defined by an STF Hamiltonian by using a 4th order Runge–Kutta method.

Optimal and robust control

You can use these operations, together with the operations for creating optimization variables to define convenient cost functions for optimal and robust control.

infidelity_pwcCreate the total infidelity of the given piecewise-constant system.
infidelity_stfCreate the total infidelity of a given system with a sampleable Hamiltonian.
targetCreate information about the target for system time evolution.

Large systems

You can use these operations to build graphs that efficiently handle large quantum systems.

constant_sparse_pwc_operatorCreate a constant sparse piecewise-constant operator over a specified duration.
density_matrix_evolution_pwcCalculate the state evolution of an open system described by the GKS–Lindblad master equation.
estimated_krylov_subspace_dimension_lanczosCalculate an appropriate Krylov subspace dimension ($k$) to use in the Lanczos integrator while keeping the total error in the evolution below a given error tolerance.
jump_trajectory_evolution_pwcCalculate the state evolution of an open system described by the GKS–Lindblad master equation using a jump-based trajectory method.
sparse_pwc_hermitian_partCreate the Hermitian part of a piecewise-constant operator.
sparse_pwc_operatorCreate a sparse piecewise-constant operator (sparse-matrix-valued function of time).
sparse_pwc_sumCreate the sum of multiple sparse-matrix-valued piecewise-constant functions.
spectral_rangeObtain the range of the eigenvalues of a Hermitian operator.
state_evolution_pwcCalculate the time evolution of a state generated by a piecewise-constant Hamiltonian by using the Lanczos method.
steady_stateFind the steady state of a time-independent open quantum system.

Mølmer–Sørensen gates

You can use these operations to efficiently model systems described by Mølmer–Sørensen interactions.

ions.ms_dephasing_robust_costCalculate the cost for robust optimization of a Mølmer–Sørensen gate.
ions.ms_displacementsCalculate the displacements for each mode and ion combination where ions are described by a Mølmer–Sørensen-type interaction.
ions.ms_infidelityCalculate the final operational infidelity of the Mølmer–Sørensen gate.
ions.ms_phasesCalculate the relative phases for all pairs of ions described by a Mølmer–Sørensen-type interaction when single-tone individually-addressed laser beams are used.
ions.ms_phases_multitoneCalculate the relative phases for all pairs of ions described by a Mølmer–Sørensen-type interaction where the ions are being addressed by a multitone global beam.

Random operations

You can use these operations to create random quantities, which take different values each time they are evaluated. These operations are most useful in simulations and stochastic optimizations.

random.choicesCreate random samples from the data that you provide.
random.colored_noise_stf_signalSample the one-sided power spectral density (PSD) of a random noise process in the time domain and returns the resultant noise trajectories as an Stf.
random.normalCreate a sample of normally distributed random numbers.
random.uniformCreate a sample of uniformly distributed random numbers.

Manipulating tensors

You can use these operations to manipulate the structures of tensors.

concatenateConcatenate a list of tensors along a specified dimension.
cumulative_sumCalculate the cumulative sum of a tensor along a specified dimension.
einsumPerform tensor contraction via Einstein summation convention.
maxFind the maximum value in a tensor along one or multiple of its axes.
minFind the minimum value in a tensor along one or multiple of its axes.
repeatRepeat elements of a tensor.
reshapeReshape a tensor into a new shape, keeping the order of its elements.
reverseReverse a tensor along some specified dimensions.
sumSum the elements in a tensor (or a list of tensors with the same shape) along one or multiple of its axes.
tensorCreate a real or complex Tensor with the data provided.
transposeReorder the dimensions of a tensor.

Linear algebra

adjointCalculate the element-wise adjoint of the last two dimensions of an object.
density_matrix_expectation_valueCalculate the expectation value of an operator with respect to a density matrix.
einsumPerform tensor contraction via Einstein summation convention.
embed_operatorsEmbed an operator or set of operators into a larger Hilbert space.
expectation_valueCalculate the expectation value of an operator with respect to a state.
hermitian_partCalculate the Hermitian part of an object.
hessianCalculate a single Hessian matrix for all the variables.
inner_productCalculate the inner product of two vectors.
kronCalculate the Kronecker product between np.ndarrays, Tensors, Pwcs, or Stfs.
kronecker_product_listCalculate the Kronecker product between a list of operators.
matmulCalculate the matrix multiplication between np.ndarrays, Tensors, Pwcs, or Stfs.
outer_productCalculate the outer product of two vectors.
partial_traceCalculate the partial trace of a density matrix.
traceCalculate the trace of an object.
transposeReorder the dimensions of a tensor.

Basic mathematical functions

absCalculate the element-wise absolute value of an object.
addCalculate the element-wise sum between numbers, np.ndarrays, Tensors, Pwcs, or Stfs.
angleCalculate the element-wise argument of an object.
arccosCalculate the element-wise arccosine of an object.
arcsinCalculate the element-wise arcsine of an object.
arctanCalculate the element-wise arctangent of an object.
complex_valueCreate element-wise complex values from real numbers, np.ndarrays, Tensors, Pwcs, or Stfs, that is, the real and imaginary parts.
conjugateCalculate the element-wise complex conjugate of an object.
cosCalculate the element-wise cosine of an object.
coshCalculate the element-wise hyperbolic cosine of an object.
cumulative_sumCalculate the cumulative sum of a tensor along a specified dimension.
expCalculate the element-wise exponential of an object.
floordivCalculate the element-wise rounded-down division between real numbers, np.ndarrays, Tensors, Pwcs, or Stfs.
imagCalculate the element-wise imaginary part of an object.
logCalculate the element-wise natural logarithm of an object.
multiplyCalculate the element-wise product between numbers, np.ndarrays, Tensors, Pwcs, or Stfs.
negativeCalculate the element-wise numerical negative value of an object.
powCalculate the element-wise power between numbers, np.ndarrays, Tensors, Pwcs, or Stfs.
realCalculate the element-wise real part of an object.
sinCalculate the element-wise sine of an object.
sinhCalculate the element-wise hyperbolic sine of an object.
sqrtCalculate the element-wise square root of an object.
subtractCalculate the element-wise difference between numbers, np.ndarrays, Tensors, Pwcs, or Stfs.
sumSum the elements in a tensor (or a list of tensors with the same shape) along one or multiple of its axes.
tanCalculate the element-wise tangent of an object.
tanhCalculate the element-wise hyperbolic tangent of an object.
truedivCalculate the element-wise division between numbers, np.ndarrays, Tensors, Pwcs, or Stfs.

Was this useful?