Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow partial state vector function to handle qudits #5077

Merged
merged 8 commits into from
Mar 15, 2022

Conversation

daxfohl
Copy link
Contributor

@daxfohl daxfohl commented Mar 14, 2022

Add handling for qudits within partial_trace_of_state_vector_as_mixture

Fixes #3003

@daxfohl daxfohl requested review from a team, vtomole and cduck as code owners March 14, 2022 17:47
@daxfohl daxfohl requested a review from 95-martin-orion March 14, 2022 17:47
@CirqBot CirqBot added the size: M 50< lines changed <250 label Mar 14, 2022
Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

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

Couple of nits. I like the new tests - the random one is a strong indicator that this behaves as expected, and the pair-of-qutrits illustrates partial-trace behavior nicely.

cirq-core/cirq/linalg/transformations.py Show resolved Hide resolved
cirq-core/cirq/linalg/transformations.py Show resolved Hide resolved
@95-martin-orion 95-martin-orion added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Mar 15, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Mar 15, 2022
@CirqBot
Copy link
Collaborator

CirqBot commented Mar 15, 2022

Automerge cancelled: A required status check is not present.

Missing statuses: ['Misc check', 'Pytest Ubuntu (3.9)', 'Pytest Windows (3.7)', 'Pytest Windows (3.8)', 'Pytest Windows (3.9)', 'Typescript lint check', 'Typescript tests', 'Typescript tests coverage']

@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Mar 15, 2022
@daxfohl
Copy link
Contributor Author

daxfohl commented Mar 15, 2022

Oh, cirqbot...

@95-martin-orion 95-martin-orion merged commit 7a5c20e into quantumlib:master Mar 15, 2022
@daxfohl daxfohl deleted the partialsv branch March 16, 2022 23:34
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
* Allow partial state vector function to handle qudits

* nits

* check norm

* nit

* simplify kron

* lint

* nits

Co-authored-by: Cirq Bot <[email protected]>
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* Allow partial state vector function to handle qudits

* nits

* check norm

* nit

* simplify kron

* lint

* nits

Co-authored-by: Cirq Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Methods for partial trace and separable part of state vector should work for qudits
3 participants