1515
1616def statevector_to_hypersphere (Phi : Array ) -> Array :
1717 """
18- Generate the hypersphere Phi from statevector Psi
18+ Generate the hypersphere from statevector $ \\ Phi$
1919
2020 Parameters
2121 ----------
22- psi : ArrayLike
23- statevector as a complex JAX array of dimension 2^n, for n-qubits
22+ Phi : ArrayLike
23+ statevector as a complex JAX array of dimension $ 2^n$ , for n-qubits
2424
2525 Returns
2626 -------
2727 Array
28- hypersphere as a real JAX array of dimension 2^{n+1}
28+ hypersphere as a real JAX array of dimension $ 2^{n+1}$
2929 """
3030 S = jnp .zeros (int (2 ** (log (Phi .shape [0 ], 2 ) + 1 )), dtype = float )
3131 for x in range (S .shape [0 ] // 2 ):
@@ -36,17 +36,17 @@ def statevector_to_hypersphere(Phi: Array) -> Array:
3636
3737def hypersphere_to_statevector (S : Array ) -> Array :
3838 """
39- Generate the statevector Psi from hypersphere Phi
39+ Generate the statevector $ \\ Phi$ from hypersphere $S$
4040
4141 Parameters
4242 ----------
4343 S: ArrayLike
44- hypersphere as a real JAX array of dimension 2^{n+1} for n qubits
44+ hypersphere as a real JAX array of dimension $ 2^{n+1}$ for n qubits
4545
4646 Returns
4747 -------
4848 Array
49- statevector as a complex JAX array of dimension 2^n
49+ statevector as a complex JAX array of dimension $ 2^n$
5050 """
5151 Phi = jnp .zeros (int (2 ** (log (S .shape [0 ], 2 ) - 1 )), dtype = complex )
5252 for x in range (Phi .shape [0 ]):
@@ -56,16 +56,16 @@ def hypersphere_to_statevector(S: Array) -> Array:
5656
5757def add_isotropic_error (Phi_sp : Array , e2 : Array , theta_zero : float ) -> Array :
5858 """
59- Add isotropic error to state Phi given e2 and theta_zero
59+ Add isotropic error to state $ \\ Phi$ given $e_2$ and $ \\ theta_0$
6060
6161 Parameters
6262 ----------
6363 Phi_sp : ArrayLike
6464 state to which isotropic error is added (in spherical form)
6565 e2 : ArrayLike
66- vector e2 in S_{d-1} with uniform distribution
66+ vector $e_2$ in $ S_{d-1}$ with uniform distribution
6767 theta_zero : float
68- angle θ_0 in [0,π] with density function f(θ_0)
68+ angle $ \\ theta_0$ in $ [0,\\ pi]$ with density function $f( \\ theta_0)$
6969
7070 Returns
7171 -------
@@ -87,7 +87,7 @@ def generate_and_add_isotropic_error(
8787 Parameters
8888 ----------
8989 Phi : ArrayLike
90- The input statevector as a complex JAX array of dimension 2^n, for n-qubits.
90+ The input statevector as a complex JAX array of dimension $ 2^n$ , for n-qubits.
9191 sigma : float, optional
9292 The standard deviation for the isotropic error, by default 0.9.
9393 key : ArrayLike, optional
0 commit comments