Click or drag to resize
CVec Class
A block-sparse vector of complex numbers.
Inheritance Hierarchy
SystemObject
  Microsoft.Research.LiquidCVec

Namespace: Microsoft.Research.Liquid
Assembly: Liquid1 (in Liquid1.dll) Version: 1.0.5981.24943 (1.0.*)
Syntax
F#
[<SerializableAttribute>]
type CVec =  class end

The CVec type exposes the following members.

Constructors
  NameDescription
Public methodCVec(UInt64, Boolean)
Creates a new vector filled with zeroes.
Public methodCVec(Double, FSharpOptionDouble, FSharpOptionBoolean)
Creates a new vector from initial value vectors, real and imaginary. Note that the length of the new vector must be no more than 2^20.
Public methodCVec(UInt64, FSharpOptionDouble, FSharpOptionDouble, FSharpOptionBoolean)
Creates a new vector. By default, the vector is all zero. Optionally, the real and impaginary initial values may be provided; in this case, the vector must be no more than 2^20 in length.
Top
Properties
  NameDescription
Public propertyiSafe
Gets the imaginary part of an element of this vector by index.
Public propertyLength
The length of this vector
Public propertyrSafe
Gets the real part of an element of this vector by index.
Public propertySafe
Gets an element of this vector by index.
Top
Methods
  NameDescription
Public methodAddMCC
Calculates the norm of this vector. The norm is the square root of the sum of the complex magnitudes of the vector elements.
Public methodCopy
Creates an exact copy of this vector.
Public methodDump
Dumps this vector using the provided function.
Public methodDumpMCC
Dump vector MCC with provided function
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGlobalPhase
Estimates the global phase of a vector that represents a quantum state. The estimate is computed as the complex phase of the vector element with the greatest amplitude.
Public methodKron
Computes the Kronecker product of this vector and another.
Public methodNonZeros
Gets non-zero indices upto a max count
Public methodNormalize
Normalizes this vector to length 1.0.
Public methodStatic memberRead
Reads a new vector from a binary file. Note that this routine is only intended to read vectors written with the Write method.
Public methodScale
Scale all elements of the vector (unsafe)
Public methodToString
Converts this vector to a string. At most the first 512 entries are displayed.
(Overrides ObjectToString.)
Public methodWrite
Writes this vector to a binary file.
Public methodZero
Zeroes this vector. Note that this also densely fills in the vector.
Top
Operators
  NameDescription
Public operatorStatic memberMultiplyBang
Computes the Kronecker product of two vectors.
Top
See Also