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.

DumpMachine state labelling bug when qubits >= 8 #684

Description

Describe the bug
Under Jupyter, when 8 or more Qubits used, DumpMachine sometimes outputs 8-bit row labels, sometimes 16-bit labels.

To Reproduce
Run these two cells under Jupyter:

open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Diagnostics;

operation TestDump(n:Int) : Unit
{
  use qs = Qubit[n];
  for i in 0..n-1 {
    H(qs[i]);  // put all bits into equal superposition.
  }
  DumpMachine();
  ResetAll(qs);
}
%config dump.basisStateLabelingConvention="BitString"
%simulate TestDump n=8

Expected behavior
All rows should be labelled consistently, as they are whenever n < 8.

Screenshots
DumpBug

System information

Windows 11
[I 11:03:07.200 NotebookApp] Kernel started: d293a705-353d-4e26-9191-0e0a089dea93, name: iqsharp  ??
IPython          : 8.15.0
ipykernel        : 6.25.0
ipywidgets       : 8.0.4
jupyter_client   : 7.4.9
jupyter_core     : 5.3.0
jupyter_server   : 1.23.4
jupyterlab       : 3.6.3
nbclient         : 0.5.13
nbconvert        : 6.5.4
nbformat         : 5.9.2
notebook         : 6.5.4
qtconsole        : 5.4.2
traitlets        : 5.7.1

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Kind-BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions