Ket Methods

Liquid Quantum Simulator

Ket Methods

The Ket type exposes the following members.

Methods
  Name Description
Public method 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.
Public method Add(CVec)
Adds a new qubit to the state with a complex state vector. The new qubit is unentangled and has the provided state.
Public method 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.
Public method Copy
Makes a new Ket that is a deep copy of this Ket.
Public method 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.
Public method Dump
Dump this state vector.
Public method 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.
Public method Entropy
Get the entanglement entropy
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method Join
Joins another Ket to the end of this one (added Ket is NOT usable after this)
Public method NormDiff
Get L2 Norm of the difference of two ket vectors
Public method Prob1
Get the probability of measuring 1 for a single qubit
Public method ProbOdd
Get the probability of measuring odd parity for a set of qubits
Public method Probs
Get the state probabilities for a list of qubits (l.e. 10 qubits)
Public method Purity
Finds the purity of each qubit in this Ket. NOT OPTIMIZED.
Public method Static member 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.
Public method Static member 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.
Public method Reset
Resets this Ket to an initial state with a specified number of qubits.
Public method Single
Treats this Ket as if all of its qubits are entangled.
Public method 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.)
Public method Write(BinaryWriter)
Writes this state vector to a binary stream.
Public method Write(String)
Writes this state vector to a file.
Top
See Also