![]() |
Utility methods for creating vectors and matrices.
Functions
bloch_vector_from_state_vector(...)
: Returns the bloch vector of a qubit.
density_matrix_from_state_vector(...)
: Returns the density matrix of the state vector.
dirac_notation(...)
: Returns the state vector as a string in Dirac notation.
eye_tensor(...)
: Returns an identity matrix reshaped into a tensor.
one_hot(...)
: Returns a numpy array with all 0s and a single non-zero entry(default 1).
to_valid_density_matrix(...)
: Verifies the density_matrix_rep is valid and converts it to ndarray form.
to_valid_state_vector(...)
: Verifies the state_rep is valid and converts it to ndarray form.
validate_indices(...)
: Validates that the indices have values within range of num_qubits.
validate_normalized_state(...)
: THIS FUNCTION IS DEPRECATED.
validate_normalized_state_vector(...)
: Validates that the given state vector is a valid.
validate_qid_shape(...)
: Validates the size of the given state_vector
against the given shape.
Type Aliases
STATE_VECTOR_LIKE
: The central part of internal API.
Other Members | |
---|---|
TYPE_CHECKING |
False
|