Skip to content

Simulator accuracy #48

@ACE07-Sev

Description

@ACE07-Sev

Greetings dear D-Wave team,

Hope you are well. So, I am having a bit of an issue with the simulator. It doesn't represent the small values like 0.002 amplitudes, which basically when used with algorithms like FRQI, makes it output a numpy array of all 0s. Anything I can do to fix this?

Here's what I get with Cirq for instance :

[0.125      0.125      0.125      0.125      0.125      0.125
 0.125      0.125      0.125      0.125      0.125      0.125
 0.125      0.1221966  0.12381981 0.125      0.125      0.125
 0.125      0.125      0.12480307 0.11370273 0.125      0.125
 0.125      0.125      0.125      0.12498055 0.1087806  0.125
 0.125      0.125      0.125      0.125      0.125      0.11108285
 0.12499628 0.125      0.125      0.125      0.125      0.125
 0.12250098 0.12246352 0.125      0.125      0.125      0.125
 0.125      0.125      0.10999145 0.12485503 0.125      0.125
 0.125      0.125      0.125      0.125      0.125      0.125
 0.125      0.125      0.125      0.125      0.         0.
 0.         0.         0.         0.         0.         0.
 0.         0.         0.         0.         0.         0.0263247
 0.01713632 0.         0.         0.         0.         0.
 0.0070138  0.05192965 0.         0.         0.         0.
 0.         0.00220521 0.06157745 0.         0.         0.
 0.         0.         0.         0.05732016 0.00096478 0.
 0.         0.         0.         0.         0.02486988 0.02505364
 0.         0.         0.         0.         0.         0.
 0.05938755 0.00601839 0.         0.         0.         0.
 0.         0.         0.         0.         0.         0.
 0.         0.        ]

And here's what I get with D-Wave :

[0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
 0.125 0.125 0.125 0.125 0.    0.    0.    0.    0.    0.    0.    0.
 0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
 0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
 0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
 0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
 0.    0.    0.    0.    0.    0.    0.    0.   ]

You see the difference? This is causing my code to break as you can imagine. Is there a way I can fix this? Again, this is only in D-Wave, I tried the code with Qiskit, Cirq, TKET, and PennyLane, and they are running as expected, and can extract these smaller values. I'd appreciate the help on fixing this.

I don't think sharing the code would help really, since I am just passing a large circuit. I believe the issue is with the number of digits the simulator can generate for the result (I think it's limited to three digits?). Kindly let me know if you absolutely would need the code, and I will see if I can make a toy example to reproduce this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions