Module: cirq.qis

Tools and methods for quantum information science.

Modules

channels module: Tools for analyzing and manipulating quantum channels.

clifford_tableau module

measures module: Measures on and between quantum states and operations.

states module: Classes and methods for quantum states.

Classes

class CliffordTableau: Tableau representation of a stabilizer state

class QuantumState: A quantum state.

Functions

bloch_vector_from_state_vector(...): Returns the bloch vector of a qubit.

choi_to_kraus(...): Returns a Kraus representation of a channel with given Choi matrix.

choi_to_superoperator(...): Returns the superoperator matrix of a quantum channel specified via the Choi matrix.

density_matrix(...): Create a QuantumState object from a density matrix.

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.

entanglement_fidelity(...): Returns entanglement fidelity of a given quantum channel.

eye_tensor(...): Returns an identity matrix reshaped into a tensor.

fidelity(...): Fidelity of two quantum states.

infer_qid_shape(...): Infer the qid shape of a set of states.

kraus_to_channel_matrix(...): THIS FUNCTION IS DEPRECATED.

kraus_to_choi(...): Returns the unique Choi matrix corresponding to a Kraus representation of a channel.

kraus_to_superoperator(...): Returns the matrix representation of the linear map with given Kraus operators.

one_hot(...): Returns a numpy array with all 0s and a single non-zero entry(default 1).

operation_to_channel_matrix(...): THIS FUNCTION IS DEPRECATED.

operation_to_choi(...): Returns the unique Choi matrix associated with an operation .

operation_to_superoperator(...): Returns the matrix representation of an operation in standard basis.

quantum_state(...): Create a QuantumState object from a state-like object.

superoperator_to_choi(...): Returns the Choi matrix of a quantum channel specified via the superoperator matrix.

superoperator_to_kraus(...): Returns a Kraus representation of a channel specified via the superoperator matrix.

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_density_matrix(...): Checks that the given density matrix is valid.

validate_indices(...): Validates that the indices have values within range of num_qubits.

validate_normalized_state_vector(...): Checks that the given state vector is valid.

validate_qid_shape(...): Validates the size of the given state_vector against the given shape.

von_neumann_entropy(...): Calculates the von Neumann entropy of a quantum state in bits.

Type Aliases

QUANTUM_STATE_LIKE: An object representing a quantum state.

STATE_VECTOR_LIKE: An object representing a state vector.