Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Incorrect Jordan Wigner C# Encoding? #157

Open
@christopherkang

Description

@christopherkang

Looking for some clarification into the implementation of the Jordan Wigner transform in Q#.

if (Enumerable.SequenceEqual(pqrsPermuted, prsq))
{
h123 = new double[] { 0.0, 0.0, coeff };
}
else if (Enumerable.SequenceEqual(pqrsPermuted, pqsr))
{
h123 = new double[] { -coeff, 0.0, 0.0 };
}
else if (Enumerable.SequenceEqual(pqrsPermuted, psrq))
{
h123 = new double[] { 0.0, -coeff, 0.0 };
}
else
{
h123 = new double[] { 0.0, 0.0, 0.0 };
}
v0123 = new double[] { -h123[0] - h123[1] + h123[2],
h123[0] - h123[1] + h123[2],
-h123[0] - h123[1] - h123[2],
-h123[0] + h123[1] + h123[2] };

Here, we have only one of the h^(1), h^(2), h^(3) terms associated with a coefficient. When we reference the paper associated with the implementation, two should be additive inverses, while the last is 0:

image

(pg 13, 14 of Whitfield et al. https://arxiv.org/pdf/1001.3855.pdf)

The coefficient orderings + labelings seem to differ greatly and produce different results.

Metadata

Metadata

Labels

Area-DocumentationIssue relates to API documentation comments, READMEs, or other documentation in this repo.Kind-BugSomething isn't workingPkg-ChemistryIssue relates to the Microsoft.Quantum.Chemistry.* packages.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions