openfermion.measurements.get_phase_function

Generates an estimate of the phase function g(t) from circuit output

The output from a VPE circuit is a set of measurements; from the frequency that these measurements occur, we can estimate the phase function.

measurements [Sequence[cirq.TrialResult]] -- A list of TrialResults from the different circuits to be run at each point. We assume that these circuits are correlated to the order of rotation_set, and the only difference should be the initial and final rotation (following) that data in rotation_set. We also assume that the final measurement is tagged with a label of 'msmt' (and that this is a measurement of all qubits, with the target qubit in the bit position indicated by target_qid) qubits [Sequence[cirq.Qid]] -- The list of qubits in the order that was passed to the final measurement call.

target_qid [Int] -- The index of the target qubit in qubits.

rotation_set [Sequence or None] -- The set of rotations performed to generate the input data in measurements. These in turn need to be summed together weighted by the first entry in the set (we do not use the other entries in the set here).

phase_function [complex] -- An estimate of g(t).