quri_parts.core.operator.representation package#

class quri_parts.core.operator.representation.BinarySymplecticVector(x: int, z: int, phase: complex = 1)#

Bases: NamedTuple

Binary symplectic vector representation for Pauli operators.

x: int#

Alias for field number 0

z: int#

Alias for field number 1

phase: complex#

Alias for field number 2

quri_parts.core.operator.representation.pauli_label_to_bsv(pauli: PauliLabel) BinarySymplecticVector#

Represent a PauliLabel as a binary symplectic vector.

quri_parts.core.operator.representation.bsv_bitwise_commute(bsv1: BinarySymplecticVector, bsv2: BinarySymplecticVector) bool#

Return if two Pauli strings are bitwise commuting.

quri_parts.core.operator.representation.transition_amp_comp_basis(op_binary_repr: Mapping[int, Sequence[tuple[complex, int]]], m: int, n: int) complex#

Returns the transition amplitude \(\langle m|O|n\rangle\) of the operator \(O\)

quri_parts.core.operator.representation.transition_amp_representation(operator: Operator) Mapping[int, Sequence[tuple[complex, int]]]#

Returns a binary representation _TransitionAmplitudeRepresentation, which is the special representation designed for calculating tansition amplitudes efficiently.

Submodules#