:py:mod:`pygsti.modelmembers.povms.computationalpovm` ===================================================== .. py:module:: pygsti.modelmembers.povms.computationalpovm .. autoapi-nested-parse:: Defines the ComputationalBasisPOVM class Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pygsti.modelmembers.povms.computationalpovm.ComputationalBasisPOVM .. py:class:: ComputationalBasisPOVM(nqubits, evotype='default', qubit_filter=None, state_space=None) Bases: :py:obj:`pygsti.modelmembers.povms.povm.POVM`, :py:obj:`pygsti.modelmembers.errorgencontainer.NoErrorGeneratorInterface` A POVM that "measures" states in the computational "Z" basis. Parameters ---------- nqubits : int The number of qubits evotype : Evotype or str, optional The evolution type. The special value `"default"` is equivalent to specifying the value of `pygsti.evotypes.Evotype.default_evotype`. qubit_filter : list, optional An optional list of integers specifying a subset of the qubits to be measured. state_space : StateSpace, 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 .. py:attribute:: nqubits .. py:attribute:: qubit_filter :value: 'None' .. py:method:: from_pure_vectors(pure_vectors, evotype, state_space) :classmethod: .. py:method:: keys() An iterator over the effect (outcome) labels of this POVM. .. py:method:: values() An iterator over the effect vectors of this POVM. .. py:method:: items() An iterator over the (effect_label, effect_vector) items in this POVM. .. py:method:: 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 ---------- prefix : str A string, usually identitying this POVM, which may be used to prefix the simplified gate keys. Returns ------- OrderedDict of POVMEffects .. py:method:: 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.