qat.noisy

This module mainly contains the NoisyQProc QPU, which emulates a noisy quantum computer. It can be used to simulate the executation of any circuit containing the usual gates as well as intermediate measurements, classical control, classical logic gates, and resets.

Two simulation modes are currently implemented: deterministic and stochastic. The former requires the storage of the full density matrix describing the qubits’ state, the latter avoids this overhead at the cost of stochastic sampling of the final result, with intrinsic statistical uncertainty.

Fidelity computation

qat.noisy.compute_fidelity()

Compute the fidelity of a circuit, given a hardware model

Density-matrix computation

A noisy quantum system is generically described by a density matrix \(\rho\), a unit-trace, positive definite matrix of size \(2^\mathrm{nqbits}\times 2^\mathrm{nqbits}\). While a real quantum processor cannot give direct access to \(\rho\), it can be accessed via classical simulation.

qat.noisy.compute_density_matrix()

Compute the density matrix of a circuit

Warning

Since the overhead of storing the density matrix is quite steep, this function is efficient only when simulating circuits with small number of qubits.