NoiseCircuit
public protocol NoiseCircuit
A quantum circuit with noise
-
Quantum operators in the circuit
Declaration
Swift
var quantumOperators: [QuantumOperator] { get }
-
Applies
gates
toinitialState
to produce a new density matrix.Declaration
Swift
func densityMatrix(withInitialState initialState: CircuitDensityMatrix) -> Result<CircuitDensityMatrix, DensityMatrixError>
Parameters
initialState
Used to initialized circuit to given state.
Return Value
Another
CircuitDensityMatrix
instance, result of applyinggates
toinitialState
. OrDensityMatrixError
error.
-
densityMatrix(withFactory:
Extension method) Applies
quantumOperators
to an initial state set to 0 to produce a new density matrix.Declaration
Swift
public func densityMatrix(withFactory factory: CircuitDensityMatrixFactory = MainCircuitDensityMatrixFactory()) -> Result<CircuitDensityMatrix, DensityMatrixError>
Parameters
factory
Used to produce the initial state set to 0.
Return Value
Another
CircuitDensityMatrix
instance, result of applyingquantumOperators
to 0. OrDensityMatrixError
error.