quara.objects.povm_typical module

generate_povm_from_name(povm_name, c_sys, is_physicality_required=True)[source]

returns Povm class.

Parameters
  • povm_name (str) – name of povm.

  • c_sys (CompositeSystem) – CompositeSystem of povm.

  • is_physicality_required (bool = True) – whether the generated object is physicality required, by default True

Returns

Povm class.

Return type

Povm

Raises

ValueError – povm_name is invalid.

generate_povm_matrices_from_name(povm_name)[source]

returns list of elements of POVM(matrices).

Parameters

povm_name (str) – name of povm.

Returns

list of elements of POVM(matrices).

Return type

List[np.ndarray]

Raises

ValueError – povm_name is invalid.

generate_povm_object_from_povm_name_object_name(povm_name, object_name, c_sys=None, basis=None, is_physicality_required=True)[source]

Return a povm-related object.

Parameters
  • povm_name (str) – Valid gate_name. It is given by get_povm_names()

  • object_name (str) – Valid object_name. It is given by get_povm_object_names()

  • c_sys (CompositeSystem, optional) – To be given for object_name = ‘povm’, by default None.

  • basis (MatrixBasis, optional) – To be given for object_name = ‘vectors’, by default None.

  • is_physicality_required (bool = True) – whether the generated object is physicality required, by default True

Returns

List[np.ndarray]
pure state vectors related elements of POVM for object_name = ‘pure_state_vectors’
Complex vectors
list of elements of POVM(matrices) for object_name = ‘matrices’
Complex matrices
vectors on Hermitian basis for object_name = ‘vectors’
Real vectors
Povm
Povm class for object_name = ‘povm’

Return type

Union[List[np.ndarray], Povm]

Raises

ValueError – [description]

generate_povm_pure_state_vectors_from_name(povm_name)[source]

returns pure state vectors.

Parameters

povm_name (str) – name of povm.

Returns

pure state vectors.

Return type

List[np.ndarray]

Raises

ValueError – povm_name is invalid.

generate_povm_vectors_from_name(povm_name, basis)[source]

returns vectors on Hermitian basis.

Parameters
  • povm_name (str) – name of povm.

  • basis (MatrixBasis) – Hermitian basis of povm.

Returns

vectors on Hermitian basis.

Return type

List[np.ndarray]

Raises
  • ValueError – povm_name is invalid.

  • ValueError – basis is not Hermitian.

get_povm_names()[source]

Return the list of valid povm names.

Returns

the list of valid povm names.

Return type

List[str]

get_povm_names_1qubit()[source]

Return the list of valid povm names on 1-qubit system.

Returns

the list of valid povm names on 1-qubit system.

Return type

List[str]

get_povm_names_1qutrit()[source]

Return the list of valid povm names on 1-qutrit system.

Returns

the list of valid povm names on 1-qutrit system.

Return type

List[str]

get_povm_names_2qubit()[source]

Return the list of valid povm names on 2-qubit system.

Returns

the list of valid povm names on 2-qubit system.

Return type

List[str]

get_povm_names_2qutrit()[source]

Return the list of valid povm names on 2-qutrit system.

Returns

the list of valid povm names on 2-qutrit system.

Return type

List[str]

get_povm_names_3qubit()[source]

Return the list of valid povm names on 3-qubit system.

Returns

the list of valid povm names on 3-qubit system.

Return type

List[str]

get_povm_names_not_rank1()[source]

Return the list of valid povm names of not rank 1.

Returns

the list of valid povm names of not rank 1.

Return type

List[str]

get_povm_names_rank1()[source]

Return the list of valid povm names of rank 1.

Returns

the list of valid povm names of rank 1.

Return type

List[str]

get_povm_object_names()[source]

Return the list of valid povm-related object names.

Returns

the list of valid povm-related object names.

Return type

List[str]

get_povm_xxparity_povm_matrices()[source]

return the POVM matrices of POVM for xx-parity.

\(\frac{1}{2}\begin{pmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix}\)

\(\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 POVM matrices of POVM for xx-parity.

Return type

List[List[np.ndarray]]

get_povm_zzparity_povm_matrices()[source]

return the POVM matrices of POVM for zz-parity.

\(\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}\)

\(\begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}\)

Returns

the POVM matrices of POVM for zz-parity.

Return type

List[List[np.ndarray]]