utils

Utility functions and classes.

Functions

average_gate_fidelity_from_process_matrices(...)

Return the average gate fidelity between two process matrices.

average_gate_fidelity_from_unitaries(...)

Return the average gate fidelity between two unitary matrices.

fill_array_by_idx(array, dimension, idxs)

Extend a square array using specified indices.

is_unitary(matrix)

Check if a given matrix is unitary.

leakage_from_process_matrix(matrix)

Return the leakage from the qubit subspace.

leakage_from_time_evolution_operator(matrix)

Compute the leakage from the qubit subspace of a quantum operation.

partial_trace(matrix, sub_dims, keep)

Compute the partial trace of a matrix.

tensorprod(*args)

Return the Kronecker tensor product of arrays.

Classes

Components1D([vec])

1D components (vector) class.

Components2D([tensor])

2D components (tensor) class.