quri_parts.core.operator.representation package#

class BinarySymplecticVector(x, z, phase=1)#

Bases: NamedTuple

Binary symplectic vector representation for Pauli operators.

Parameters:
  • x (int) –

  • z (int) –

  • phase (complex) –

x: int#

Alias for field number 0

z: int#

Alias for field number 1

phase: complex#

Alias for field number 2

pauli_label_to_bsv(pauli)#

Represent a PauliLabel as a binary symplectic vector.

Parameters:

pauli (PauliLabel) –

Return type:

BinarySymplecticVector

bsv_bitwise_commute(bsv1, bsv2)#

Return if two Pauli strings are bitwise commuting.

Parameters:
Return type:

bool

transition_amp_comp_basis(op_binary_repr, m, n)#

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

Parameters:
  • op_binary_repr (core.operator.representation._TransitionAmplitudeRepresentation) –

  • m (int) –

  • n (int) –

Return type:

complex

transition_amp_representation(operator)#

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

Parameters:

operator (Operator) –

Return type:

_TransitionAmplitudeRepresentation

Submodules#