quri_parts.core.measurement.bitwise_commuting_pauli module#

quri_parts.core.measurement.bitwise_commuting_pauli.bitwise_commuting_pauli_measurement_circuit(pauli_set: Set[PauliLabel]) Sequence[QuantumGate]#

An implementation of PauliMeasurementCircuitGeneration, which generates a circuit (a gate list) for a “trivial” measurement of bitwise- commuting Pauli strings.

The “trivial” measurement of a Pauli string refers to a measurement in computational basis preceded by single qubit rotations to map each Pauli matrix on each qubit to \(Z\). For example, if the Pauli string contains \(X\) (\(Y\)) at a qubit index \(i\), then (an \(S^\dagger\) gate and) an Hadamard gate is applied on the qubit \(i\) before performing the \(Z\) measurements on all qubits.

quri_parts.core.measurement.bitwise_commuting_pauli.bitwise_pauli_reconstructor_factory(pauli: PauliLabel) Callable[[int], int]#

A factory of a function that reconstructs a value of the given Pauli operator from a result of a “trivial” measurement of bitwise-commuting Pauli strings.

The “trivial” measurement of a Pauli string refers to a measurement in computational basis preceded by single qubit rotations to map each Pauli matrix on each qubit to \(Z\). For example, if the Pauli string contains \(X\) (\(Y\)) at a qubit index \(i\), then (an \(S^\dagger\) gate and) an Hadamard gate is applied on the qubit \(i\) before performing the \(Z\) measurements on all qubits.

quri_parts.core.measurement.bitwise_commuting_pauli.bitwise_commuting_pauli_measurement(paulis: Operator | Iterable[PauliLabel]) Collection[CommutablePauliSetMeasurement]#

Groups the given Pauli operators into sets of bitwise commuting Pauli operators and returns measurement schemes for them.

quri_parts.core.measurement.bitwise_commuting_pauli.individual_pauli_measurement(paulis: Operator | Iterable[PauliLabel]) Collection[CommutablePauliSetMeasurement]#

Returns measurement schemes for Pauli operators where each operator is measured individually (i.e. no grouping).