pyqtorch
pyqtorch copied to clipboard
[Feature] Add noisy quantum circuit
Pyqtorch has recently incorporated noisy gates through the addition of Kraus operators #148. Consequently, it becomes pertinent to delve into simulating quantum circuits with noise, incorporating these newly introduced gates.
To achieve this, adjustments need to be made on the forward propagation of Primitive
and Noise
:
-
Uniformisation: Add the
value
parameter to theNoise
's forward function, using for the parametrization inPrimitive
. - Different cases: Add and ensure the forward propagation is input type dependant. There are 4 possible forward functions:
- In
Primitive
:- The input is a vector state $\ket{\psi} \rightarrow$
apply_operator(op,state)
- The input is a density matrix $\rho \rightarrow$
operator_product(op,state,op_dagger)
- The input is a vector state $\ket{\psi} \rightarrow$
- In
Noise
:- The input is a vector state $\ket{\psi} \rightarrow$ 1)
density_mat(state)
2) $\sum_i$operator_product(Ki,state,Ki_dagger)
- The input is a density matrix $\rho \rightarrow$ $\sum_i$
operator_product(Ki,state,Ki_dagger)
- The input is a vector state $\ket{\psi} \rightarrow$ 1)