Defines the CHPForwardSimulator calculator class
A WeakForwardSimulator returning probabilities with Scott Aaronson's CHP code
- class pygsti.forwardsims.chpforwardsim.CHPForwardSimulator(chpexe, shots, model=None)¶
A WeakForwardSimulator returning probabilities with Scott Aaronson’s CHP code
- _compute_circuit_outcome_for_shot(self, circuit, resource_alloc, time=None)¶
Compute outcome for a single shot of a circuit.
spc_circuit (SeparatePOVMCircuit) – A tuple-like object of simplified gates (e.g. may include instrument elements like ‘Imyinst_0’) generated by Circuit.expand_instruments_and_separate_povm()
resource_alloc (ResourceAlloc) – Currently not used
time (float, optional) – The start time at which circuit is evaluated.
outcome_label (tuple) – An outcome label for the single shot sampled
- _process_state(self, rho, file_handle)¶
Helper function to process state prep for CHP circuits.
Recursively handles TensorProd > Composed > Computational SPAMVec objects (e.g. those created by create_crosstalk_free_model).
rho (State) – State vector to process
file_handle (TextIOWrapper) – Open file handle for dumping CHP strings
- _process_povm(self, povm, povm_label, file_handle)¶
Helper function to process measurement for CHP circuits.
Recursively handles TensorProd > Composed > ComputationalBasis POVM objects (e.g. those created by create_crosstalk_free_model).