braket.circuits.noise_model.qubit_initialization_criteria module

class braket.circuits.noise_model.qubit_initialization_criteria.QubitInitializationCriteria(qubits: Qubit | int | Iterable[Qubit | int] | None = None)[source]

Bases: InitializationCriteria

This class models initialization noise Criteria based on qubits.

Creates initialization noise Qubit-based Criteria.

Parameters:

qubits (Optional[QubitSetInput]) – A set of relevant qubits. If no qubits are provided, all (possible) qubits are considered to be relevant.

applicable_key_types() Iterable[CriteriaKey][source]

Gets the QUBIT criteria key.

Returns:

Iterable[CriteriaKey] – This Criteria operates on Qubits, but is valid for all Gates.

get_keys(key_type: CriteriaKey) CriteriaKeyResult | set[Any][source]

Gets the keys for a given CriteriaKey.

Parameters:

key_type (CriteriaKey) – The relevant Criteria Key.

Returns:

Union[CriteriaKeyResult, set[Any]] – The return value is based on the key type: QUBIT will return a set of qubit targets that are relevant to this Criteria, or CriteriaKeyResult.ALL if the Criteria is relevant for all (possible) qubits. All other keys will return an empty set.

to_dict() dict[source]

Converts a dictionary representing an object of this class into an instance of this class.

Returns:

dict – A dictionary representing the serialized version of this Criteria.

qubit_intersection(qubits: Qubit | int | Iterable[Qubit | int]) Qubit | int | Iterable[Qubit | int][source]

Returns subset of passed qubits that match the criteria.

Parameters:

qubits (QubitSetInput) – A qubit or set of qubits that may match the criteria.

Returns:

QubitSetInput – The subset of passed qubits that match the criteria.

classmethod from_dict(criteria: dict) Criteria[source]

Deserializes a dictionary into a Criteria object.

Parameters:

criteria (dict) – A dictionary representation of a QubitCriteria.

Returns:

Criteria – A deserialized QubitCriteria represented by the passed in serialized data.