FermionWavefunctionJsonConverter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This Newtonsoft.Json.JsonConverter allows correctly serialized HamiltonianTerms. This terms are in general problematic because their keys are not strings, but Microsoft.Quantum.Chemistry.Generic.HamiltonianTerm instances, which Newtonsoft.Json doesn't like by default. This converts the Dictionaries to List of Tuples, in which the first item of the tuple is the key and the second the value.
public class FermionWavefunctionJsonConverter : Newtonsoft.Json.JsonConverter
type FermionWavefunctionJsonConverter = class
inherit JsonConverter
Public Class FermionWavefunctionJsonConverter
Inherits JsonConverter
- Inheritance
-
Newtonsoft.Json.JsonConverterFermionWavefunctionJsonConverter
Constructors
| FermionWavefunctionJsonConverter() |
Methods
| CanConvert(Type) |
Returns true only if the Type is HamitonianTerm or HamiltonianTerms |
| ReadJson(JsonReader, Type, Object, JsonSerializer) |
Reads the HamiltonianTerms from a list of (Key, Value) tuples. |
| WriteJson(JsonWriter, Object, JsonSerializer) |
Writers the HamiltonianTerms as a list of (Key, Value) tuples. |