Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bugfix set_wavefunction in pysim#138

Merged
damiansteiger merged 3 commits into
developfrom
bugfix/pysim_set_wavefunction
Aug 19, 2017
Merged

Bugfix set_wavefunction in pysim#138
damiansteiger merged 3 commits into
developfrom
bugfix/pysim_set_wavefunction

Conversation

@damiansteiger
Copy link
Copy Markdown
Contributor

If the user specifies a real valued wavefunction, then the internal state of the simulator is changed to numpy float and hence it ignores the complex parts of gates but it always gave a warning if it did.

  • Fixed
  • Added a test to check for this bug

Damian S. Steiger added 2 commits August 15, 2017 14:56
… simulator. If the user specifies a real valued wavefunction, then the internal state of the simulator is changed to numpy float and hence it ignores the complex parts of gates but it always gave a warning if it did.
@damiansteiger
Copy link
Copy Markdown
Contributor Author

In all fairness, the doc says one should use a list[complex] as the wavefunction parameter in set_wavefunction, so it is technically not a bug but a nice feature that it now also accepts a real valued wavefunction without adding +0j to all entries...

Copy link
Copy Markdown
Contributor

@thomashaener thomashaener left a comment

Choose a reason for hiding this comment

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

Thanks!

@damiansteiger damiansteiger merged commit c9697a8 into develop Aug 19, 2017
@damiansteiger damiansteiger deleted the bugfix/pysim_set_wavefunction branch August 19, 2017 11:43
damiansteiger added a commit that referenced this pull request Aug 19, 2017
* Turn Warnings into errors

* Changed to new gcd version if it exists (python3.5 and python3.6)
damiansteiger added a commit that referenced this pull request Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants