CircuitStatevectorFactory
public protocol CircuitStatevectorFactory
Factory to build CircuitStatevector
instances
-
Builds
CircuitStatevector
instances.Declaration
Swift
func makeStatevector(vector: Vector) -> Result<CircuitStatevector, MakeStatevectorError>
Parameters
vector
State of a quantum circuit expressed as a
Vector
.Return Value
A
CircuitStatevector
instance. OrMakeStatevectorError
error.
-
makeStatevector(bits:
Extension method) Builds
CircuitStatevector
instances.Declaration
Swift
public func makeStatevector(bits: String) -> Result<CircuitStatevector, MakeStatevectorBitsError>
Parameters
bits
String composed only of 0’s & 1’s.
Return Value
A
CircuitStatevector
instance. OrMakeStatevectorBitsError
error.