DensityMatrixConfiguration

public enum DensityMatrixConfiguration

Define behaviour of NoiseCircuit.densityMatrix(withInitialState:)

  • Each Gate is expanded into a Matrix before applying to the CircuitDensityMatrix for the entire circuit. Matrix expansion is performed with up to expansionConcurrency threads. If expansionConcurrency 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 the CircuitDensityMatrix for the entire circuit, up to calculationConcurrency rows in the density matrix are calculated simultaneously. When needed, rows in Gate will be expanded using up to expansionConcurrency threads, so at any given moment there might be calculationConcurrency * expansionConcurrency threads running. If calculationConcurrency or expansionConcurrency are set to 0 or less, they will be defaulted to 1.

    Declaration

    Swift

    case row(calculationConcurrency: Int = 1, expansionConcurrency: Int = 1)