quara.objects.mprocess_typical module
- generate_mprocess_from_name(c_sys, mprocess_name, is_physicality_required=True)[source]
returns MProcess object specified by name.
- Parameters
c_sys (CompositeSystem) – CompositeSystem of MProcess.
mprocess_name (str) – name of the MProcess.
is_physicality_required (bool = True) – whether the generated object is physicality required, by default True
- Returns
MProcess object.
- Return type
- generate_mprocess_hss_from_name(mprocess_name, c_sys)[source]
returns the list of HS matrices of MProcess specified by name.
- Parameters
mprocess_name (str) – name of the MProcess.
c_sys (CompositeSystem) – CompositeSystem of MProcess.
- Returns
the list of HS matrices
- Return type
List[np.ndarray]
- Raises
ValueError – mprocess_name is invalid.
- generate_mprocess_object_from_mprocess_name_object_name(mprocess_name, object_name, c_sys=None, is_physicality_required=True)[source]
returns a mprocess-related object.
- Parameters
mprocess_name (str) – name of the MProcess.
object_name (str) – Valid object_name. It is given by
get_mprocess_object_names().c_sys (CompositeSystem, optional) – To be given for object_name=’hss’ or ‘mprocess’, by default None.
is_physicality_required (bool = True) – whether the generated object is physicality required, by default True
- Returns
- List[List[np.ndarray]]the set of pure state vectors of MProcess for object_name = ‘set_pure_state_vectors’Complex vectorsthe set of Kraus matrices of MProcess for object_name = ‘set_kraus_matrices’Complex matricesList[np.ndarray]the list of HS matrices of MProcess for object_name = ‘hss’Complex matricesMProcessMProcess class for object_name = ‘mprocess’
- Return type
Union[List[List[np.ndarray]], List[np.ndarray], MProcess]
- Raises
ValueError – mprocess_name is invalid.
- generate_mprocess_set_kraus_matrices_from_name(mprocess_name)[source]
returns the set of Kraus matrices of MProcess specified by name.
- Parameters
mprocess_name (str) – name of the MProcess.
- Returns
the set of Kraus matrices
- Return type
List[List[np.ndarray]]
- Raises
ValueError – mprocess_name is invalid.
- generate_mprocess_set_pure_state_vectors_from_name(mprocess_name)[source]
returns the set of pure state vectors of MProcess specified by name.
- Parameters
mprocess_name (str) – name of the MProcess.
- Returns
the set of pure state vectors of MProcess
- Return type
List[List[np.ndarray]]
- Raises
ValueError – mprocess_name is invalid.
- get_mprocess_belltype1_set_pure_state_vectors()[source]
return the set of pure state vectors of MProcess for bell-type1.
\(|\psi_{0,0}\rangle = |\Psi^+\rangle = |0\rangle|1\rangle + |1\rangle|0\rangle\)
\(|\psi_{1,0}\rangle = |\Psi^-\rangle = |0\rangle|1\rangle - |1\rangle|0\rangle\)
\(|\psi_{2,0}\rangle = |\Phi^+\rangle = |0\rangle|0\rangle + |1\rangle|1\rangle\)
\(|\psi_{3,0}\rangle = |\Phi^-\rangle = |0\rangle|0\rangle - |1\rangle|1\rangle\)
- Returns
the set of pure state vectors of MProcess for bell-type1.
- Return type
List[List[np.ndarray]]
- get_mprocess_names_type1()[source]
returns the list of valid MProcess names of type1.
- Returns
the list of valid MProcess names of type1.
- Return type
List[str]
- get_mprocess_names_type1_set_kraus_matrices()[source]
returns the list of valid MProcess names of set Kraus matrices of type1.
- Returns
the list of valid MProcess names of set Kraus matrices of type1.
- Return type
List[str]
- get_mprocess_names_type1_set_pure_state_vectors()[source]
returns the list of valid MProcess names of set pure vectors of type1.
- Returns
the list of valid MProcess names of set pure vectors of type1.
- Return type
List[str]
- get_mprocess_names_type2()[source]
returns the list of valid MProcess names of type2.
- Returns
the list of valid MProcess names of type2.
- Return type
List[str]
- get_mprocess_object_names()[source]
returns the list of valid mprocess-related object names.
- Returns
the list of valid mprocess-related object names.
- Return type
List[str]
- get_mprocess_xtype1_set_pure_state_vectors()[source]
return the set of pure state vectors of MProcess for x-type1.
\(|\psi_{0,0}\rangle = |+\rangle\)
\(|\psi_{1,0}\rangle = |-\rangle\)
- Returns
the set of pure state vectors of MProcess for x-type1.
- Return type
List[List[np.ndarray]]
- get_mprocess_xtype2_set_kraus_matrices()[source]
return the set of Kraus matrices of MProcess for x-type2.
\(K_{0,0} = |+\rangle\langle +|\)
\(K_{1,0} = |+\rangle\langle -|\)
- Returns
the set of Kraus matrices of MProcess for x-type2.
- Return type
List[List[np.ndarray]]
- get_mprocess_xxparitytype1_set_kraus_matrices()[source]
return the set of Kraus matrices of MProcess for xx-parity.
\(K_{0,0} = \frac{1}{2}\begin{pmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix}\)
\(K_{1,0} = \frac{1}{2}\begin{pmatrix} 1 & 0 & 0 & -1 \\ 0 & 1 & -1 & 0 \\ 0 & -1 & 1 & 0 \\ -1 & 0 & 0 & 1 \end{pmatrix}\)
- Returns
the set of Kraus matrices of MProcess for xx-parity.
- Return type
List[List[np.ndarray]]
- get_mprocess_ytype1_set_pure_state_vectors()[source]
return the set of pure state vectors of MProcess for y-type1.
\(|\psi_{0,0}\rangle = |+i\rangle\)
\(|\psi_{1,0}\rangle = |-i\rangle\)
- Returns
the set of pure state vectors of MProcess for y-type1.
- Return type
List[List[np.ndarray]]
- get_mprocess_ytype2_set_kraus_matrices()[source]
return the set of Kraus matrices of MProcess for y-type2.
\(K_{0,0} = |+i\rangle\langle +i|\)
\(K_{1,0} = |+i\rangle\langle -i|\)
- Returns
the set of Kraus matrices of MProcess for y-type2.
- Return type
List[List[np.ndarray]]
- get_mprocess_z2type1_set_pure_state_vectors()[source]
return the set of pure state vectors of MProcess for z2-type1.
\(|\psi_{0,0}\rangle = |0\rangle\)
\(|\psi_{1,0}\rangle = |1\rangle\)
\(|\psi_{1,1}\rangle = |2\rangle\)
- Returns
the set of pure state vectors of MProcess for z2-type1.
- Return type
List[List[np.ndarray]]
- get_mprocess_z2type2_set_kraus_matrices()[source]
return the set of Kraus matrices of MProcess for z2-type2.
\(K_{0,0} = |0\rangle\langle 0|\)
\(K_{1,0} = |0\rangle\langle 1|\)
\(K_{1,1} = |0\rangle\langle 2|\)
- Returns
the set of Kraus matrices of MProcess for z2-type2.
- Return type
List[List[np.ndarray]]
- get_mprocess_z3type1_set_pure_state_vectors()[source]
return the set of pure state vectors of MProcess for z3-type1.
\(|\psi_{0,0}\rangle = |0\rangle\)
\(|\psi_{1,0}\rangle = |1\rangle\)
\(|\psi_{2,0}\rangle = |2\rangle\)
- Returns
the set of pure state vectors of MProcess for z3-type1.
- Return type
List[List[np.ndarray]]
- get_mprocess_z3type2_set_kraus_matrices()[source]
return the set of Kraus matrices of MProcess for z3-type2.
\(K_{0,0} = |0\rangle\langle 0|\)
\(K_{1,0} = |0\rangle\langle 1|\)
\(K_{2,0} = |0\rangle\langle 2|\)
- Returns
the set of Kraus matrices of MProcess for z3-type2.
- Return type
List[List[np.ndarray]]
- get_mprocess_ztype1_set_pure_state_vectors()[source]
return the set of pure state vectors of MProcess for z-type1.
\(|\psi_{0,0}\rangle = |0\rangle\)
\(|\psi_{1,0}\rangle = |1\rangle\)
- Returns
the set of pure state vectors of MProcess for z-type1.
- Return type
List[List[np.ndarray]]
- get_mprocess_ztype2_set_kraus_matrices()[source]
return the set of Kraus matrices of MProcess for z-type2.
\(K_{0,0} = |0\rangle\langle 0|\)
\(K_{1,0} = |0\rangle\langle 1|\)
- Returns
the set of Kraus matrices of MProcess for z-type2.
- Return type
List[List[np.ndarray]]
- get_mprocess_zzparitytype1_set_kraus_matrices()[source]
return the set of Kraus matrices of MProcess for zz-parity.
\(K_{0,0} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}\)
\(K_{1,0} = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}\)
- Returns
the set of Kraus matrices of MProcess for zz-parity.
- Return type
List[List[np.ndarray]]