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

A wrong display when using DumpMachine() #1136

Open
weucode opened this issue Mar 21, 2023 · 0 comments
Open

A wrong display when using DumpMachine() #1136

weucode opened this issue Mar 21, 2023 · 0 comments
Labels

Comments

@weucode
Copy link

weucode commented Mar 21, 2023

Describe the bug
When inserting R(PauliX, PI(), q) or R(PauliY, PI(), q) into the program, and using DumpMachine to output the qubit states, the results of |0 > in QuantumSimulator seems like wrong.

To Reproduce

namespace NameSpace {
	open Microsoft.Quantum.Intrinsic;
	open Microsoft.Quantum.Math;
	open Microsoft.Quantum.Diagnostics;

        @EntryPoint()
	operation main() : Unit {
		use q = Qubit();
		R(PauliX, PI(), q);
		DumpMachine();
		Reset(q);
    }
}

Real behavior
command:dotent run

|0⟩ 0.000000 + 0.000000 i == * [ 0.000000 ] --- [ 0.00000 rad ]
|1⟩ 0.000000 + -1.000000 i == ******************** [ 1.000000 ] ↓ [ -1.57080 rad ]

command:dotnet run -s SparseSimulator

|1⟩ 1.000000 + 0.000000 i == ******************** [ 1.000000 ] --- [ 0.00000 rad ]

System information
operating system : Windows10 & Ubuntu18.04

dotnet version : 7.0.100

QDK : 0.27.258160

@msoeken msoeken transferred this issue from microsoft/QuantumLibraries Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant