quara.simulation.random_effective_lindbladian_generation_setting module
- class RandomEffectiveLindbladianGenerationSetting(c_sys, qoperation_base, lindbladian_base, strength_h_part, strength_k_part, ids=None, is_physicality_required=True)[source]
Bases:
quara.simulation.effective_lindbladian_generation_setting.EffectiveLindbladianGenerationSettingConstructor
- Parameters
c_sys (CompositeSystem) – CompositeSystem.
qoperation_base (Union[QOperation, str]) – QOperation base of the random effective Lindbladian.
lindbladian_base (Union[EffectiveLindbladian, str]) – effective Lindbladian base of the random effective Lindbladian.
strength_h_part (float) – the strength of random variables for generating h part.
strength_k_part (float) – the strength of random variables for generating k part.
ids (List[int], Optional) – This is a list of elmental system’s ids, by default None. To be given for specific asymmetric multi-partite gates For example, in the case of gate_name = ‘cx’, id[0] is for the id of the control qubit and id[1] is for the id of the target qubit.
is_physicality_required (bool) –
- Raises
ValueError – strength_h_part is not non-negative number.
ValueError – strength_k_part is not non-negative number.
- Return type
None
- generate(seed_or_generator=None)[source]
- Parameters
seed_or_generator (Optional[Union[int, numpy.random._generator.Generator]]) –
- generate_gate(seed_or_generator=None)[source]
generates random effective Lindbladian and returns gate(composition of random effective Lindbladian and qoperation base).
- Parameters
seed_or_generator (Union[int, np.random.Generator], optional) – If the type is int, generates Generator with seed seed_or_generator and returned generated Generator. If the type is Generator, returns Generator. If argument is None, returns np.random. Default value is None.
- Returns
tuple of gate, ramdom variables for h part, ramdom variables for k part, random unitary matrix and random effective Lindbladian.
- Return type
Tuple[ Gate, np.ndarray, np.ndarray, np.ndarray, np.ndarray, ]
- generate_mprocess(seed_or_generator=None)[source]
generates random effective Lindbladian and returns mprocess(composition of random effective Lindbladian and qoperation base).
- Parameters
seed_or_generator (Union[int, np.random.Generator], optional) – If the type is int, generates Generator with seed seed_or_generator and returned generated Generator. If the type is Generator, returns Generator. If argument is None, returns np.random. Default value is None.
- Returns
tuple of gate, ramdom variables for h part, ramdom variables for k part, random unitary matrix and random effective Lindbladian.
- Return type
Tuple[ Gate, np.ndarray, np.ndarray, np.ndarray, np.ndarray, ]
- generate_povm(seed_or_generator=None)[source]
generates random effective Lindbladian and returns povm(composition of random effective Lindbladian and qoperation base).
- Parameters
seed_or_generator (Union[int, np.random.Generator], optional) – If the type is int, generates Generator with seed seed_or_generator and returned generated Generator. If the type is Generator, returns Generator. If argument is None, returns np.random. Default value is None.
- Returns
tuple of povm, ramdom variables for h part, ramdom variables for k part, random unitary matrix and random effective Lindbladian.
- Return type
Tuple[ Povm, np.ndarray, np.ndarray, np.ndarray, np.ndarray, ]
- generate_random_effective_lindbladian(seed_or_generator=None)[source]
generates random effective Lindbladian and returns effective Lindbladian base + random effective Lindbladian.
- Parameters
seed_or_generator (Union[int, np.random.Generator], optional) – If the type is int, generates Generator with seed seed_or_generator and returned generated Generator. If the type is Generator, returns Generator. If argument is None, returns np.random. Default value is None.
- Returns
tuple of effective Lindbladian, ramdom variables for h part, ramdom variables for k part, random unitary matrix and random effective Lindbladian.
- Return type
Tuple[ EffectiveLindbladian, np.ndarray, np.ndarray, np.ndarray, np.ndarray, ]
- generate_random_effective_lindbladian_d_part(seed_or_generator=None)[source]
generates random HS matrix on computational basis of d part of effective Lindbladian.
- Parameters
seed_or_generator (Union[int, np.random.Generator], optional) – If the type is int, generates Generator with seed seed_or_generator and returned generated Generator. If the type is Generator, returns Generator. If argument is None, returns np.random. Default value is None.
- Returns
tuple of random HS matrix, ramdom variables and random unitary matrix.
- Return type
Tuple[np.ndarray, np.ndarray, np.ndarray]
- generate_random_effective_lindbladian_h_part(seed_or_generator=None)[source]
generates random HS matrix on computational basis of h part of effective Lindbladian.
- Parameters
seed_or_generator (Union[int, np.random.Generator], optional) – If the type is int, generates Generator with seed seed_or_generator and returned generated Generator. If the type is Generator, returns Generator. If argument is None, returns np.random. Default value is None.
- Returns
tuple of random HS matrix and ramdom variables.
- Return type
Tuple[np.ndarray, np.ndarray]
- generate_state(seed_or_generator=None)[source]
generates random effective Lindbladian and returns state(composition of random effective Lindbladian and qoperation base).
- Parameters
seed_or_generator (Union[int, np.random.Generator], optional) – If the type is int, generates Generator with seed seed_or_generator and returned generated Generator. If the type is Generator, returns Generator. If argument is None, returns np.random. Default value is None.
- Returns
tuple of state, ramdom variables for h part, ramdom variables for k part, random unitary matrix and random effective Lindbladian.
- Return type
Tuple[ State, np.ndarray, np.ndarray, np.ndarray, np.ndarray, ]
- property strength_h_part: float
returns the strength of random variables for generating h part.
- Returns
the strength of random variables for generating h part.
- Return type
float
- property strength_k_part: float
returns the strength of random variables for generating k part.
- Returns
the strength of random variables for generating k part.
- Return type
float