quri_parts.core.measurement.interface module#


PauliMeasurementCircuitGeneration represents a function that generates a circuit (a gate list) for measuring mutually commuting Pauli operators.

alias of Callable[[Set[PauliLabel]], Sequence[QuantumGate]]


PauliReconstructor represents a function that reconstructs a value of a Pauli operator from a measurement result of its measurement circuit.

alias of Callable[[int], int]


PauliReconstructorFactory represents a factory function that returns a PauliReconstructor for a given Pauli operator.

alias of Callable[[PauliLabel], Callable[[int], int]]

class quri_parts.core.measurement.interface.CommutablePauliSetMeasurement(*args, **kwargs)#

Bases: Protocol

Represents a measurement scheme for a set of commutable Pauli operators.

abstract property pauli_set: Set[PauliLabel]#

A set of commutable Pauli operators subject to the measurement.

abstract property measurement_circuit: Sequence[QuantumGate]#

A circuit required to measure the given commutable Pauli operators at once.

abstract property pauli_reconstructor_factory: Callable[[PauliLabel], Callable[[int], int]]#

A factory of PauliReconstructor that reconstructs a value of a Pauli operator from a measurement result of the measurement circuit.

class quri_parts.core.measurement.interface.CommutablePauliSetMeasurementTuple(pauli_set, measurement_circuit, pauli_reconstructor_factory)#

Bases: NamedTuple

pauli_set: Set[PauliLabel]#

Alias for field number 0

measurement_circuit: Sequence[QuantumGate]#

Alias for field number 1

pauli_reconstructor_factory: Callable[[PauliLabel], Callable[[int], int]]#

Alias for field number 2


Represents a function that performs grouping of Pauli operators into sets of commutable Pauli operators and returns measurement schemes for them.

alias of Callable[[Union[Operator, Iterable[PauliLabel]]], Iterable[CommutablePauliSetMeasurement]]