DensityMatrixConfiguration
public enum DensityMatrixConfiguration
Define behaviour of NoiseCircuit.densityMatrix(withInitialState:)
-
Each
Gate
is expanded into aMatrix
before applying to theCircuitDensityMatrix
for the entire circuit. Matrix expansion is performed with up toexpansionConcurrency
threads. IfexpansionConcurrency
is 0 or less, it will be defaulted to 1. This configuration has the biggest memory footprint but it is the fastest.Declaration
Swift
case matrix(expansionConcurrency: Int = 1)
-
To apply a
Gate
to theCircuitDensityMatrix
for the entire circuit, up tocalculationConcurrency
rows in the density matrix are calculated simultaneously. When needed, rows inGate
will be expanded using up toexpansionConcurrency
threads, so at any given moment there might becalculationConcurrency
*expansionConcurrency
threads running. IfcalculationConcurrency
orexpansionConcurrency
are set to 0 or less, they will be defaulted to 1.Declaration
Swift
case row(calculationConcurrency: Int = 1, expansionConcurrency: Int = 1)