pygsti.models.modelconstruction.create_cloud_crosstalk_model_from_hops_and_weights

pygsti.models.modelconstruction.create_cloud_crosstalk_model_from_hops_and_weights#

create_cloud_crosstalk_model_from_hops_and_weights(processor_spec, custom_gates=None, max_idle_weight=1, max_spam_weight=1, maxhops=0, extra_weight_1_hops=0, extra_gate_weight=0, simulator='auto', evotype='default', gate_type='H+S', spam_type='H+S', implicit_idle_mode='none', errcomp_type='gates', independent_gates=True, independent_spam=True, connected_highweight_errors=True, basis='pp', verbosity=0)#

Create a “cloud crosstalk” model based on maximum error weights and hops along the processor’s qudit graph.

This function provides a convenient way to construct cloud crosstalk models whose gate errors consist of Pauli elementary error generators (i.e. that correspond to Lindblad error coefficients) that are limited in weight (number of non-identity Paulis) and support (which qudits have non-trivial Paulis on them). Errors are taken to be approximately local, meaning they are concentrated near the target qudits of a gate, with the notion of locality taken from the processor specification’s qudit graph. The caller provides maximum-weight, maximum-hop (a “hop” is the movement along a single graph edge), and gate type arguments to specify the set of possible errors on a gate.

  • The global idle gate (corresponding to an empty circuit layer) has errors that are limited only by a maximum weight, max_idle_weight.

  • State preparation and POVM errors are constructed similarly, with a global-idle-like error following or preceding the preparation or measurement, respectively.

  • Gate errors are placed on all the qudits that can be reached with at most maxhops hops from (any of) the gate’s target qudits. Elementary error generators up to weight W, where W equals the number of target qudits (e.g., 2 for a CNOT gate) plus extra_gate_weight are allowed. Weight-1 terms are a special case, and the extra_weight_1_hops argument adds to the usual maxhops in this case to allow weight-1 errors on a possibly larger region of qudits around the target qudits.

Parameters:
  • processor_spec (ProcessorSpec) – The processor specification to create a model for. This object specifies the gate names and unitaries for the processor, and their availability on the processor.

  • custom_gates (dict) – A dictionary that associates with gate labels LinearOperator, OpFactory, or numpy.ndarray objects. These objects describe the full action of the gate or primitive-layer they’re labeled by (so if the model represents states by density matrices these objects are superoperators, not unitaries), and override any standard construction based on builtin gate names or nonstd_gate_unitaries. Keys of this dictionary must be string-type gate names – they cannot include state space labels – and they must be static (have zero parameters) because they represent only the ideal behavior of each gate – the cloudnoise operations represent the parameterized noise. To fine-tune how this noise is parameterized, call the CloudNoiseModel constructor directly.

  • max_idle_weight (int, optional) – The maximum-weight for errors on the global idle gate.

  • max_spam_weight (int, optional) – The maximum-weight for state preparation and measurement (SPAM) errors.

  • maxhops (int) – The locality constraint: for a gate, errors (of weight up to the maximum weight for the gate) are allowed to occur on the gate’s target qudits and those reachable by hopping at most maxhops times from a target qudit along nearest-neighbor links (defined by the geometry).

  • extra_weight_1_hops (int, optional) – Additional hops (adds to maxhops) for weight-1 errors. A value > 0 can be useful for allowing just weight-1 errors (of which there are relatively few) to be dispersed farther from a gate’s target qudits. For example, a crosstalk-detecting model might use this.

  • extra_gate_weight (int, optional) – Additional weight, beyond the number of target qudits (taken as a “base weight” - i.e. weight 2 for a 2Q gate), allowed for gate errors. If this equals 1, for instance, then 1-qudit gates can have up to weight-2 errors and 2-qudit gates can have up to weight-3 errors.

  • simulator (ForwardSimulator or {"auto", "matrix", "map"}) – The circuit simulator used to compute any requested probabilities, e.g. from probs() or bulk_probs(). Using “auto” currently selects “map”.

  • evotype (Evotype or str, optional) – The evolution type of this model, describing how states are represented. The special value “default” is equivalent to specifying the value of pygsti.evotypes.Evotype.default_evotype.

  • gate_type (str, optional) – The Lindblad-error parameterization type used for gate operations. This may be expanded in the future, but currently the gate errors must be of the Lindblad error-generator coefficients type, and this argument specifies what elementary error-generator coefficients are initially allowed (and linked to model parameters), before maximum-weight and locality constraints are imposed. In addition to the usual Lindblad error types, (e.g. “H”, “H+S”) the special values “none” is allowed to indicate that there should be no errors on the gates (useful if you only want errors on the SPAM, for instance).

  • spam_type (str, optional) – Similar to gate_type but for SPAM elements (state preparations and POVMs). This specifies the Lindblad-error parameterization for the state prepearation and POVM.

  • implicit_idle_mode ({'none', 'add_global', 'pad_1Q'}) – The way idle operations are added implicitly within the created model. “none” doesn’t add any “extra” idle operations when there is a layer that contains some gates but not gates on all the qudits. “add_global” adds the global idle operation, i.e., the operation for a global idle layer (zero gates - a completely empty layer), to every layer that is simulated, using the global idle as a background idle that always occurs regardless of the operation. “pad_1Q” applies the 1-qubit idle gate (if one exists) to all idling qubits within a circuit layer.

  • errcomp_type ({"gates","errorgens"}) – How errors are composed when creating layer operations in the created model. “gates” means that the errors on multiple gates in a single layer are composed as separate and subsequent processes. Specifically, the layer operation has the form Composed(target,idleErr,cloudErr) where target is a composition of all the ideal gate operations in the layer, idleErr is the global idle error if implicit_idle_mode == ‘add_global’, and cloudErr is the composition (ordered as layer-label) of cloud- noise contributions, i.e. a map that acts as the product of exponentiated error-generator matrices. “errorgens” means that layer operations have the form Composed(target, error) where target is as above and error results from composing (summing) the idle and cloud-noise error generators, i.e. a map that acts as the exponentiated sum of error generators (ordering is irrelevant in this case).

  • independent_gates (bool, optional) – Whether the noise added to a gate when it acts on one set of target qudits is independent of its noise on a different set of target qudits. If False, then all gates with the same name (e.g. “Gx”) will be constrained to having the same noise on the cloud around the target qudits (even though the target qudits and cloud are different). If True, then gate noise operations for different sets of target qudits are independent.

  • independent_spam (bool, optional) – Similar to independent_gates but for state preparation and measurement operations. When False, the noise applied to each set (individual or pair or triple etc.) of qudits must be the same, e.g., if the state preparation is a perfect preparation followed by a single-qudit rotation then this rotation must be by the same angle on all of the qudits.

  • connected_highweight_errors (bool, optional) – An additional constraint regarding high-weight errors. When True, only high weight (weight 2+) elementary error generators whose non-trivial Paulis occupy a connected portion of the qudit graph are allowed. For example, if the qudit graph is a 1D chain of 4 qudits, 1-2-3-4, and weight-2 errors are allowed on a single-qudit gate with target = qudit-2, then weight-2 errors on 1-2 and 2-3 would be allowed, but errors on 1-3 would be forbidden. When False, no constraint is imposed.

  • basis (Basis or str, optional) – The basis to use when constructing operator representations for the elements of the created model.

  • verbosity (int or VerbosityPrinter, optional) – An integer >= 0 dictating how must output to send to stdout.

Return type:

CloudNoiseModel