Closed mgarnier59 closed 10 months ago
New commit solving the issues we mentionned as well as a few updates:
evolve
method (actually works for arbitrary number of qubits, tested for 1-, 2- and 3- qubits)scipy
from density_matrix.py
assert
sscipy
and random
to setup.py
For the feature, maybe generic data validation like checking operators are square matrices of size $2^N \times 2^N$ can be mutualised with the density matrix that just adds further conditions on top of that (hermiticity, unit trace). Maybe put those methods in a specific file?
Nice! Will take a look through later.
Maybe put those methods in a specific file?
good idea, sounds like a portable feature outside this simulator. maybe a new file in in graphix/sim/
?
good idea, sounds like a portable feature outside this simulator. maybe a new file in in
graphix/sim/
?
Actually I was thinking of it while working on the kraus.py
file that requires the same types of checks. So either we move kraus
(we might rename it) in graphix/sim/
or we include the checks in graphix/
but that doesn't really matter much.
@mgarnier59 maybe graphix/sim/quantum_channel.py, but as you say it does not matter much at this stage. let's continue with whatever that works for you, we then deal with file arrangement after all the implementation part is ready :)
@mgarnier59 I just assigned you to the PR (sorry I haven't done this yet). Do you see the button for squash and merge now?
@mgarnier59 I just assigned you to the PR (sorry I haven't done this yet). Do you see the button for squash and merge now?
@shinich1 Hey. Nope I don't see it. Maybe I don't have the correct rights?
Before submitting, please check the following:
Make sure you have tests for the new code and that test passes (run
pytest
) Passingformat added code and tests by
black -l 120 <filename>
DoneIf applicable, add a line to the [unreleased] part of CHANGELOG.md, following keep-a-changelog.
Then, please fill in below:
Context (if applicable): Density matrix backend.
Description of the change:
scipy.stats.unitary_group
. Can be modified in the future.Related issue: None.
also see that checks (github actions) pass. If lint check keeps failing, try installing black==22.8.0 as behavior seems to vary across versions.