DensityMatrixConfiguration
public enum DensityMatrixConfiguration
Define behaviour of NoiseCircuit.densityMatrix(withInitialState:)
-
Each
Gateis expanded into aMatrixbefore applying to theCircuitDensityMatrixfor the entire circuit. Matrix expansion is performed with up toexpansionConcurrencythreads. IfexpansionConcurrencyis 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
Gateto theCircuitDensityMatrixfor the entire circuit, up tocalculationConcurrencyrows in the density matrix are calculated simultaneously. When needed, rows inGatewill be expanded using up toexpansionConcurrencythreads, so at any given moment there might becalculationConcurrency*expansionConcurrencythreads running. IfcalculationConcurrencyorexpansionConcurrencyare set to 0 or less, they will be defaulted to 1.Declaration
Swift
case row(calculationConcurrency: Int = 1, expansionConcurrency: Int = 1)
DensityMatrixConfiguration Enumeration Reference