pygsti.protocols.rpe

RPE Protocol objects

Module Contents

Classes

RobustPhaseEstimationDesign

Experimental design for robust phase estimation (RPE).

RobustPhaseEstimation

Robust phase estimation (RPE) protocol

RobustPhaseEstimationResults

Results from the RPE protocol

Attributes

RPEDesign

RPE

RPEResults

class pygsti.protocols.rpe.RobustPhaseEstimationDesign(gate, req_lengths, sin_prep, sin_meas, sin_outcomes_pos, sin_outcomes_neg, cos_prep, cos_meas, cos_outcomes_pos, cos_outcomes_neg, *, qubit_labels=None, req_counts=None)

Bases: pygsti.protocols.protocol.CircuitListsDesign

Experimental design for robust phase estimation (RPE).

Produces an Experiment Design to test the phase that develops on a target gate, by applying it req_lengths times to a states prepared by sin_prep and cos_prep circuits, and then measured in the computational basis after (respective) action by sin_meas and cos_meas circuits. outcomes_pos and outcomes_neg determine which of those computational basis states count towards each of the probabilities

P^{γ’γ}_{Ns} = |<γ' y| U^N |γ x>|² = |<γ' x| U^N |-γ y>|² = (1 ± sin(θ))/2 P^{γ'γ}_{Nc} = |<γ' x| U^N |γ x>|² = |<γ' y| U^N | γ y>|² = (1 ± cos(θ))/2

(Computational basis state measurements in neither of these sets are silently dropped.)

In the above, the +x refers to the |E_0> + |E_1> combination of eigenstates of U, not of computational basis states. For instance, if U is rotation in the X basis, then cos_prep and cos_meas could be simply the identity:

|± U> = |0> ± |1>

where |±U> are the eigenstates of U, so that, in the notation of the above,

|+x> = |+U> + |-U> = |0>

The circuit would then calculate

P^+_{Nc} = |<+x| U^N | +x>|²

provided that cos_outcomes_pos = [0] and cos_outcomes_neg = [1].

Parameters
  • gate (<TODO typ>) – <TODO description>

  • req_lengths (<TODO typ>) – <TODO description>

  • sin_prep (<TODO typ>) – <TODO description>

  • sin_meas (<TODO typ>) – <TODO description>

  • sin_outcomes_pos (<TODO typ>) – <TODO description>

  • sin_outcomes_neg (<TODO typ>) – <TODO description>

  • cos_prep (<TODO typ>) – <TODO description>

  • cos_meas (<TODO typ>) – <TODO description>

  • cos_outcomes_pos (<TODO typ>) – <TODO description>

  • cos_outcomes_neg (<TODO typ>) – <TODO description>

class pygsti.protocols.rpe.RobustPhaseEstimation(name=None)

Bases: pygsti.protocols.protocol.Protocol

Robust phase estimation (RPE) protocol

_parse_row(self, row, outcomes_pos, outcomes_neg)
parse_dataset(self, design, dataset)

<TODO summary>

Parameters
  • design (<TODO typ>) – <TODO description>

  • dataset (<TODO typ>) – <TODO description>

compute_raw_angles(self, measured)

Determine the raw angles from the count data.

This corresponds to the angle of U^N, i.e., it is N times the phase of U.

Parameters

measured (<TODO typ>) – <TODO description>

Returns

<TODO typ>

run(self, data, memlimit=None, comm=None)

Run this protocol on data.

Parameters
  • data (ProtocolData) – The input data.

  • memlimit (int, optional) – A rough per-processor memory limit in bytes.

  • comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator used to run this protocol in parallel.

Returns

RobustPhaseEstimationResults

class pygsti.protocols.rpe.RobustPhaseEstimationResults(data, protocol_instance, angle_estimates)

Bases: pygsti.protocols.protocol.ProtocolResults

Results from the RPE protocol

Parameters
  • data (<TODO typ>) – <TODO description>

  • protocol_instance (<TODO typ>) – <TODO description>

  • angle_estimates (<TODO typ>) – <TODO description>

angle_estimate

<TODO description>

Type

<TODO typ>

measured_counts

<TODO description>

Type

<TODO typ>

raw_angles

<TODO description>

Type

<TODO typ>

property angle_estimate(self)

<TODO summary>

property measured_counts(self)

<TODO summary>

property raw_angles(self)

<TODO summary>

pygsti.protocols.rpe.RPEDesign
pygsti.protocols.rpe.RPE
pygsti.protocols.rpe.RPEResults