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.

A wrong display when using DumpMachine() #1136

@weucode

Description

@weucode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions