openfermion.measurements.get_phase_function
Generates an estimate of the phase function g(t) from circuit output
openfermion.measurements.get_phase_function(
results: Sequence[cirq.Result],
qubits: Sequence[cirq.Qid],
target_qid: int,
rotation_set: Optional[Sequence] = None
)
The output from a VPE circuit is a set of measurements; from the frequency
that these measurements occur, we can estimate the phase function.
Arguments |
measurements [Sequence[cirq.Result]] -- 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.
Note: we flip from small endian to big endian notation within this
function, no need to do this externally.
target_qid [Int] -- The index of the target qubit in qubits.
Note: we flip from small endian to big endian notation within this
function, no need to do this externally.
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).
|
Returns |
phase_function [complex] -- An estimate of g(t).
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-04-26 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]