  We are concerned with numerical simulations of quantum optical circuits under
certain realistic conditions, specifically that photon quantum states are not
perfectly indistinguishable. The partial photon distinguishability presents a
serious limitation in implementation of optical quantum information processing.
In order to properly assess its effect on quantum information protocols,
accurate numerical simulations, which closely emulate quantum circuit
operations, are essential. Our specific objective is to provide a computer
implementation of the partial photon distinguishability which is in principle
applicable to existing simulation techniques used for ideal quantum circuits
and which avoids a need for their significant modification. Our approach is
based on the Gram-Schmidt orthonormalization process, which is well suited for
our purpose. Photonic quantum states are represented by wavepackets which
contain information on their time and frequency distributions. In order to
account for the partial photon distinguishability, we expand the number of
degrees of freedom associated with the circuit operation extending the
definition of the photon channels to incorporate wavepacket degrees of freedom.
This strategy allows to define delay operations in the same footing as the
linear optical elements.
