FermionWavefunctionJsonConverter Class

Definition

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.JsonConverter
FermionWavefunctionJsonConverter

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.

Applies to