quara.objects.qoperation_typical module
- generate_effective_lindbladian_object(gate_name, object_name, dims=None, ids=None, c_sys=None, is_physicality_required=True)[source]
Return an effective-llindbladian-related object.
- Parameters
gate_name (str) – The list of valid gate_name is given by quara.objects.gate_typical.get_gate_names().
object_name (str) – The list of valid object_name is given by get_effective_lindbladian_object_names().
dims (List[int] = None, Optional) – To be given for gate_name = ‘identity’
ids (List[int] = None, Optional) – This is a list of elmental system’s ids. 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.
c_sys (CompositeSystem = None, Optional) – To be given for object_name = ‘effective_lindbladian’
is_physicality_required (bool = True) – whether the generated object is physicality required, by default True
- Returns
- np.ndarray
- Hamiltonian vector for object_name = ‘hamiltonian_vec’
Real vector (The representaiton matrix basis is chosen to be Hermitian)
- Hamiltonian matrix for object_name = ‘hamiltonian_mat’
Complex matrix
- HS matrix for object_name = ‘effective_lindbladian_mat’
Reak matrix
- ”EffectiveLindbladian”
EffectiveLindbladian class for object_name = ‘effective_lindbladian’
- Return type
Union[np.ndarray, “EffectiveLindbladian”]
- generate_gate_object(gate_name, object_name, dims=None, ids=None, c_sys=None, is_physicality_required=True)[source]
Return a gate-related object.
- Parameters
gate_name (str) – The list of valid gate_name is given by quara.objects.gate_typical.get_gate_names().
object_name (str) – The list of valid object_name is given by get_gate_object_names().
dims (List[int] = None, Optional) – To be given for gate_name = ‘identity’
ids (List[int] = None, Optional) – This is a list of elmental system’s ids. 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.
c_sys (CompositeSystem = None, Optional) – To be given for object_name = ‘gate’
is_physicality_required (bool = True) – whether the generated object is physicality required, by default True
- Returns
- np.ndarray
- Unitary matrix for object_name = ‘unitary_mat’
Complex matrix
- HS matrix for object_name = ‘gate_mat’
Real matrix
- ”Gate”
Gate class for object_name = ‘gate’
- Return type
Union[np.ndarray, “Gate”]
- generate_mprocess_object(mprocess_name, object_name, c_sys=None, is_physicality_required=True)[source]
- Parameters
mprocess_name (str) –
object_name (str) –
c_sys (Optional[quara.objects.composite_system.CompositeSystem]) –
is_physicality_required (bool) –
- Return type
Union[numpy.ndarray, quara.objects.gate.Gate]
- generate_povm_object(povm_name, object_name, c_sys=None, is_physicality_required=True)[source]
- Parameters
povm_name (str) –
object_name (str) –
c_sys (Optional[quara.objects.composite_system.CompositeSystem]) –
is_physicality_required (bool) –
- generate_qoperation(mode, name, c_sys, ids=None, is_physicality_required=True)[source]
- Parameters
mode (str) –
name (str) –
ids (Optional[List[int]]) –
is_physicality_required (bool) –
- Return type
- generate_qoperation_depolarized(mode, name, c_sys, error_rate, ids=None, is_physicality_required=True)[source]
- Parameters
mode (str) –
name (str) –
error_rate (numpy.float64) –
ids (Optional[List[int]]) –
is_physicality_required (bool) –
- Return type
- generate_qoperation_object(mode, name, object_name, dims=None, ids=None, c_sys=None, is_physicality_required=True)[source]
- Parameters
mode (str) –
name (str) –
object_name (str) –
dims (Optional[List[int]]) –
ids (Optional[List[int]]) –
c_sys (Optional[quara.objects.composite_system.CompositeSystem]) –
is_physicality_required (bool) –
- generate_state_ensemble_object(state_ensemble_name, object_name, c_sys=None)[source]
- Parameters
state_ensemble_name (str) –
object_name (str) –
c_sys (Optional[quara.objects.composite_system.CompositeSystem]) –
- Return type
Union[numpy.ndarray, quara.objects.gate.Gate]
- generate_state_object(state_name, object_name, c_sys=None, is_physicality_required=True)[source]
- Parameters
state_name (str) –
object_name (str) –
c_sys (Optional[quara.objects.composite_system.CompositeSystem]) –
is_physicality_required (bool) –