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>

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].

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

Bases: pygsti.protocols.protocol.Protocol

Robust phase estimation (RPE) protocol

Create a new Protocol object.

Parameters

namestr, optional

The name of this protocol, also used to (by default) name the results produced by this protocol. If None, the class name will be used.

Returns

Protocol

parse_dataset(design, dataset)

<TODO summary>

Parameters
design<TODO typ>

<TODO description>

dataset<TODO typ>

<TODO description>

compute_raw_angles(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(data, memlimit=None, comm=None)

Run this protocol on data.

Parameters
dataProtocolData

The input data.

memlimitint, optional

A rough per-processor memory limit in bytes.

commmpi4py.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>

Attributes

angle_estimate<TODO typ>

<TODO description>

measured_counts<TODO typ>

<TODO description>

raw_angles<TODO typ>

<TODO description>

Produce an RPE results object, providing access to
  • angle_estimates for each generation, and

  • the RPE-estimated angle, angle_estimate, from the last generation

property angle_estimate

<TODO summary>

property measured_counts

<TODO summary>

property raw_angles

<TODO summary>

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