quri_parts.core.measurement.interface module#

PauliMeasurementCircuitGeneration#

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#

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#

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

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

class CommutablePauliSetMeasurement(*args, **kwargs)#

Bases: Protocol

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

abstract property pauli_set: core.operator.pauli.CommutablePauliSet#

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: core.measurement.interface.PauliReconstructorFactory#

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

class CommutablePauliSetMeasurementTuple(pauli_set, measurement_circuit, pauli_reconstructor_factory)#

Bases: NamedTuple

Parameters:
  • pauli_set (core.operator.pauli.CommutablePauliSet) –

  • measurement_circuit (Sequence[QuantumGate]) –

  • pauli_reconstructor_factory (core.measurement.interface.PauliReconstructorFactory) –

pauli_set: CommutablePauliSet#

Alias for field number 0

measurement_circuit: Sequence[QuantumGate]#

Alias for field number 1

pauli_reconstructor_factory: PauliReconstructorFactory#

Alias for field number 2

CommutablePauliSetMeasurementFactory#

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]]