Implements a model of coherent noise as used in <DOI:10.1038/s41534-018-0106-y>. It rotates each qubit around the z-axis by the specified amount. If randomRoation is set, it will rotate around the X, Y, or Z axis, which is chosen at random. Randomizing provides interesting side effects but is less representative of quantum noise.
Usage
CoherentNoise(p,theta,randomRotation=FALSE)
Arguments
p
Input quantum state in density matrix format
theta
Angle of rotation to apply
randomRotation
Boolean specifying whether the rotation should be in a semi-random direction
Value
The quantum state in density matrix format after noise has been applied