quri_parts.core.measurement.bitwise_commuting_pauli module#

bitwise_commuting_pauli_measurement_circuit(pauli_set)#

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.

Parameters:

pauli_set (core.operator.pauli.CommutablePauliSet) –

Return type:

Sequence[QuantumGate]

bitwise_pauli_reconstructor_factory(pauli)#

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.

Parameters:

pauli (PauliLabel) –

Return type:

core.measurement.interface.PauliReconstructor

bitwise_commuting_pauli_measurement(paulis)#

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

Parameters:

paulis (Operator | Iterable[PauliLabel]) –

Return type:

Collection[CommutablePauliSetMeasurement]

individual_pauli_measurement(paulis)#

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

Parameters:

paulis (Operator | Iterable[PauliLabel]) –

Return type:

Collection[CommutablePauliSetMeasurement]