Module: cirq.linalg.transformations

Utility methods for transforming matrices or vectors.


apply_matrix_to_slices(...): Left-multiplies an NxN matrix onto N slices of a numpy array.

match_global_phase(...): Phases the given matrices so that they agree on the phase of one entry.

partial_trace(...): Takes the partial trace of a given tensor.

partial_trace_of_state_vector_as_mixture(...): Returns a mixture representing a state vector with only some qubits kept.

reflection_matrix_pow(...): Raises a matrix with two opposing eigenvalues to a power.

sub_state_vector(...): Attempts to factor a state vector into two parts and return one of them.

targeted_conjugate_about(...): Conjugates the given tensor about the target tensor.

targeted_left_multiply(...): Left-multiplies the given axes of the target tensor by the given matrix.

to_special(...): Converts a unitary matrix to a special unitary matrix.