pygsti.modelmembers.povms.computationalpovm
Defines the ComputationalBasisPOVM class
Module Contents
Classes
A POVM that "measures" states in the computational "Z" basis. |
- class pygsti.modelmembers.povms.computationalpovm.ComputationalBasisPOVM(nqubits, evotype='default', qubit_filter=None, state_space=None)
Bases:
pygsti.modelmembers.povms.povm.POVM
,pygsti.modelmembers.errorgencontainer.NoErrorGeneratorInterface
A POVM that “measures” states in the computational “Z” basis.
Parameters
- nqubitsint
The number of qubits
- evotypeEvotype or str, optional
The evolution type. The special value “default” is equivalent to specifying the value of pygsti.evotypes.Evotype.default_evotype.
- qubit_filterlist, optional
An optional list of integers specifying a subset of the qubits to be measured.
- state_spaceStateSpace, optional
The state space for this POVM. If None a default state space with the appropriate number of qubits is used.
Initialize a new ModelMember
- nqubits
- qubit_filter
- classmethod from_pure_vectors(pure_vectors, evotype, state_space)
- keys()
An iterator over the effect (outcome) labels of this POVM.
- values()
An iterator over the effect vectors of this POVM.
- items()
An iterator over the (effect_label, effect_vector) items in this POVM.
- simplify_effects(prefix='')
Creates a dictionary of simplified effect vectors.
Returns a dictionary of effect POVMEffects that belong to the POVM’s parent Model - that is, whose gpindices are set to all or a subset of this POVM’s gpindices. Such effect vectors are used internally within computations involving the parent Model.
Parameters
- prefixstr
A string, usually identitying this POVM, which may be used to prefix the simplified gate keys.
Returns
OrderedDict of POVMEffects
- to_memoized_dict(mmg_memo)
Create a serializable dict with references to other objects in the memo.
Parameters
- mmg_memo: dict
Memo dict from a ModelMemberGraph, i.e. keys are object ids and values are ModelMemberGraphNodes (which contain the serialize_id). This is NOT the same as other memos in ModelMember (e.g. copy, allocate_gpindices, etc.).
Returns
- mm_dict: dict
A dict representation of this ModelMember ready for serialization This must have at least the following fields: module, class, submembers, params, state_space, evotype Additional fields may be added by derived classes.