Gate class and its methods:
- class tqix.pis.gates.Gates
Class contains gate operations of tqix.pis
When adding noise to state after applying a gate operation, an additional argument need to be added when calling gate methods:
noise (float): noise ratio.
The gate methods can have the additional argument include: RX, RY, RZ, OAT, TAT, TNT, RX2, RY2, RZ2, R_plus, R_minus, GMS, RN
- tqix.pis.gates.Gates.RX(self, theta=None, *args, **kwargs)
\(R_x(\theta) = e^{-i\theta J_x}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by RX
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.RY(self, theta=None, *args, **kwargs)
\(R_y(\theta) = e^{-i\theta J_y}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by RY
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.RZ(self, theta=None, *args, **kwargs)
\(R_z(\theta) = e^{-i\theta J_z}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by RZ
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.OAT(self, theta, gate_type, *args, **kwargs)
\(U_{OAT} = e^{-it\chi J_\alpha^2}\)
- tqix.pis.gates.Gates.TAT(self, theta, gate_type, *args, **kwargs)
\(U_{TAT} = e^{-it\chi (J_\alpha^2 - J_\beta^2)}\)
- tqix.pis.gates.Gates.TNT(self, theta, gate_type, omega, *args, **kwargs)
\(U_{TNT} = e^{-it(\chi J_\alpha^2-\Omega J_\beta)}\)
- tqix.pis.gates.Gates.RX2(self, theta=None, *args, **kwargs)
\(R_{x^2}(\theta) = e^{-i\theta J_x^2}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by RX2
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.RY2(self, theta=None, *args, **kwargs)
\(R_{y^2}(\theta) = e^{-i\theta J_y^2}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by RY2
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.RZ2(self, theta=None, *args, **kwargs)
\(R_{z^2}(\theta) = e^{-i\theta J_z^2}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by RZ2
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.R_plus(self, theta=None, *args, **kwargs)
\(R_+(\theta) = e^{-i\theta J_+}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by R_plus
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.R_minus(self, theta=None, *args, **kwargs)
\(R_-(\theta) = e^{-i\theta J_-}\)
- Parameters:
theta (float, optional) – angle, defaults to None
- Returns:
new state after being acted upon by R_minus
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.GMS(self, theta, phi, *args, **kwargs)
\(U_{GMS} = e^{-i\theta (J_x\cos\phi + J_y\sin\phi)^2}\)
- tqix.pis.gates.Gates.RN(self, theta, phi, *args, **kwargs)
\(R_{n}(\theta,\phi)= e^{-i\theta J_{n}}={exp}[i\theta (J_x\sin\phi - J_y\cos\phi)]\)
- tqix.pis.gates.Gates.check_input_param(self, params)
- Parameters:
params (dict) – parameters to check
- Raises:
ValueError – the parameter is None
- tqix.pis.gates.Gates.get_N_d_d_dicked(self, state)
- tqix.pis.gates.Gates.get_N_d_d_dicked(self, state)
- tqix.pis.gates.Gates.get_J(self, N_in, d_in, d_dicke, type)
- tqix.pis.gates.Gates.Jx(self)
- Returns:
Jx
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.Jy(self)
- Returns:
Jy
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.Jz(self)
- Returns:
Jz
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.J_plus(self)
- Returns:
J_plus
- Return type:
ndarray, tensor, sparse
- tqix.pis.gates.Gates.var(self, type='', *args, **kwargs)
- tqix.pis.gates.Gates.expval(self, type='', *args, **kwargs)