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

Remove NumSharp dependency #644

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Remove NumSharp dependency #644

wants to merge 1 commit into from

Conversation

msoeken
Copy link
Member

@msoeken msoeken commented Nov 13, 2022

This refactors some code that deals with unitary matrix to drop the NumSharp dependency.

@msoeken msoeken requested a review from billti November 13, 2022 08:42
@@ -54,6 +51,8 @@ public void DumpSReturnsCorrectMatrix()
Assert.Equal(0.0, (double)unitary.Data[0, 1, 1], precision: 6);
Assert.Equal(0.0, (double)unitary.Data[1, 0, 1], precision: 6);
Assert.Equal(1.0, (double)unitary.Data[1, 1, 1], precision: 6);

Assert.Equal("Real:\n[[1.0000000000000002, 0], \n[0, 0]]\nImag:\n[[0, 0], \n[0, 1.0000000000000002]]", unitary.ToString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the array dimensions different between implementations?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous implementation uses a 3 dimensional matrix of floating-point values to represent a two-dimensional matrix of complex numbers (the extra dimension is used to represent the real and imaginary parts of the values).

The new implementation uses a two dimensional matrix of complex values (internally it uses a one-dimensional list to store everything).

@kuzminrobin
Copy link
Contributor

/azp where

@azure-pipelines
Copy link

Azure DevOps orgs getting events for this repository:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants