QubitInitializationCriteria
- class braket.circuits.noise_model.qubit_initialization_criteria.QubitInitializationCriteria(qubits=None)[source]
Bases:
InitializationCriteriaThis class models initialization noise Criteria based on qubits.
- Parameters:
qubits (
Union[Qubit,int,Iterable[Union[Qubit,int]],None])
Creates initialization noise Qubit-based Criteria.
- Parameters:
qubits (QubitSetInput | None) – A set of relevant qubits. If no qubits are provided, all (possible) qubits are considered to be relevant.
- applicable_key_types()[source]
Gets the QUBIT criteria key.
- Return type:
Iterable[CriteriaKey]- Returns:
Iterable[CriteriaKey] – This Criteria operates on Qubits, but is valid for all Gates.
- get_keys(key_type)[source]
Gets the keys for a given CriteriaKey.
- Parameters:
key_type (CriteriaKey) – The relevant Criteria Key.
- Return type:
CriteriaKeyResult|set[Any]- Returns:
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()[source]
Converts a dictionary representing an object of this class into an instance of this class.
- Return type:
dict- Returns:
dict – A dictionary representing the serialized version of this Criteria.
- qubit_intersection(qubits)[source]
Returns subset of passed qubits that match the criteria.
- Parameters:
qubits (QubitSetInput) – A qubit or set of qubits that may match the criteria.
- Return type:
Union[Qubit,int,Iterable[Union[Qubit,int]]]- Returns:
QubitSetInput – The subset of passed qubits that match the criteria.