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

Adding the feature of calculating entanglement measures negativity #10134

Merged
merged 5 commits into from
Jul 11, 2023

Conversation

pranay1990
Copy link
Contributor

I and @PayalSolanki2906 are adding the feature which can be used to calculate the entanglement measures negativity and logarithmic negativity. To this end, we have created a function: negativity inside qiskit.quantum_info.states.measures module.

@pranay1990 pranay1990 requested review from a team and ikkoham as code owners May 21, 2023 12:35
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label May 21, 2023
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core
  • @ikkoham

@coveralls
Copy link

coveralls commented May 22, 2023

Pull Request Test Coverage Report for Build 5123431309

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • 211 unchanged lines in 27 files lost coverage.
  • Overall coverage decreased (-0.02%) to 85.915%

Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/routing/commuting_2q_gate_routing/commuting_2q_block.py 1 95.65%
qiskit/transpiler/passes/routing/commuting_2q_gate_routing/commuting_2q_gate_router.py 1 99.07%
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 1 90.27%
qiskit/transpiler/synthesis/aqc/cnot_unit_objective.py 1 99.26%
crates/accelerate/src/results/marginalization.rs 2 91.57%
crates/qasm2/src/lex.rs 2 91.9%
qiskit/circuit/add_control.py 2 96.3%
qiskit/dagcircuit/collect_blocks.py 2 98.6%
qiskit/extensions/quantum_initializer/squ.py 2 80.0%
qiskit/transpiler/passes/layout/disjoint_utils.py 3 97.48%
Totals Coverage Status
Change from base Build 5030016914: -0.02%
Covered Lines: 71159
Relevant Lines: 82825

💛 - Coveralls

Copy link
Contributor

@ikkoham ikkoham left a comment

Choose a reason for hiding this comment

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

Thank you. It looks almost good to me.

qiskit/quantum_info/states/measures.py Outdated Show resolved Hide resolved
qiskit/quantum_info/states/measures.py Outdated Show resolved Hide resolved
qiskit/quantum_info/states/measures.py Outdated Show resolved Hide resolved
qiskit/quantum_info/states/measures.py Outdated Show resolved Hide resolved
@pranay1990
Copy link
Contributor Author

Hi @ikkoham, we have made the necessary changes to the code. Thank you for the insightful comments. Please let us know if any further changes are required.

@diemilio
Copy link
Contributor

diemilio commented May 29, 2023

Hi @pranay1990 and @PayalSolanki2906. One suggestion on using numpy.linalg.svd. If you only need the singular values, you can set the compute_uv param to False to avoid computing the u and vh matrices. Makes the code cleaner and perhaps a bit more efficient.

Copy link
Contributor

@ikkoham ikkoham left a comment

Choose a reason for hiding this comment

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

Thanks a lot. Now the codes are simple and looks good to me. compute_uv=False is also nice to reduce the computational cost. Great!

@ikkoham ikkoham added Changelog: New Feature Include in the "Added" section of the changelog mod: quantum info Related to the Quantum Info module (States & Operators) labels Jun 12, 2023
@ikkoham ikkoham added this to the 0.25.0 milestone Jun 12, 2023
@ikkoham ikkoham changed the title Adding the feature of calculating entanglement measures negativity and logarithmic negativity Adding the feature of calculating entanglement measures negativity Jun 13, 2023
@ikkoham ikkoham added this pull request to the merge queue Jul 11, 2023
Merged via the queue into Qiskit:main with commit 2ce7196 Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo mod: quantum info Related to the Quantum Info module (States & Operators)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants