Ket Class 
Namespace: Microsoft.Research.Liquid
[<SerializableAttribute>] type Ket = class end
The Ket type exposes the following members.
Name  Description  

Ket 
Creates an empty Ket vector.
 
Ket(FSharpOptionInt32, FSharpOptionBit) 
Creates a populated Ket vector.

Name  Description  

Count 
Count of Qubits in state
 
Item 
Get a specific qubit in our state (by qubit ID)
 
MaxEntangled 
Max entangled that we've seen (reset during Reset())
 
Qubits 
Get all qubits in ID order
 
RandSeed 
Force the pseudorandom number gen to a known initial state
 
Rnd 
Ask for a random number generator
 
Symbol 
Symbol table used to store the results of joint parity measurements.
 
TraceRun 
Trace a circuit run (0=none 1=to log 2=to log and console, 3=Ket dumps)

Name  Description  

Add(Bit) 
Adds a new qubit to the state with a classical Bit value.
The new qubit is unentangled and has the provided state.
Note that the new qubit is not considered measured.
 
Add(CVec) 
Adds a new qubit to the state with a complex state vector.
The new qubit is unentangled and has the provided state.
 
Add(Int32, Bit) 
Adds multiple qubits to the state, all with the same classical Bit value.
The new qubits are unentangled and have the provided state.
Note that the new qubits are not considered measured.
 
Copy 
Makes a new Ket that is a deep copy of this Ket.
 
Decohere 
Applies a function to each Qubit in the state vector, returning the list of
qubit IDs for which the function returned true.
This method is usually used to apply noise to the state.
 
Dump 
Dump this state vector.
 
DumpKP 
Dump the portion of this state vector that includes a specific qubit and
all of the qubits it is entangled with.
If this Ket is a product state, then only the factor containing the
specified qubit is dumped.
 
Entropy 
Get the entanglement entropy
 
Equals  Determines whether the specified object is equal to the current object. (Inherited from Object.)  
GetHashCode  Serves as the default hash function. (Inherited from Object.)  
GetType  Gets the Type of the current instance. (Inherited from Object.)  
Join 
Joins another Ket to the end of this one (added Ket is NOT usable after this)
 
NormDiff 
Get L2 Norm of the difference of two ket vectors
 
Prob1 
Get the probability of measuring 1 for a single qubit
 
ProbOdd 
Get the probability of measuring odd parity for a set of qubits
 
Probs 
Get the state probabilities for a list of qubits (l.e. 10 qubits)
 
Purity 
Finds the purity of each qubit in this Ket. NOT OPTIMIZED.
 
Read(BinaryReader) 
Reads a new state vector from a binary stream.
Note that this routine is only intended to read vectors written with the
Write method.
 
Read(String) 
Reads a new state vector from a file.
Note that this routine is only intended to read vectors written with the
Write method.
 
Reset 
Resets this Ket to an initial state with a specified number of qubits.
 
Single 
Treats this Ket as if all of its qubits are entangled.
 
ToString 
Gets a string representation of this Ket.
This string may be extremely long; in general, it will have 2^N lines if there are N qubits in the Ket.
Generally it is better to use the
Dump method instead.
(Overrides ObjectToString.)  
Write(BinaryWriter) 
Writes this state vector to a binary stream.
 
Write(String) 
Writes this state vector to a file.
