Skip to content

Create pauli_term_grouping_test.py #1101

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hofong428
Copy link

No description provided.

Copy link

google-cla bot commented Jul 29, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from typing import Dict, List, Tuple, Optional, Any

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Tuple' is not used.
from dataclasses import dataclass
from pathlib import Path
import json
import warnings

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'warnings' is not used.

# Quantum computing imports
try:
import cirq

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'cirq' is not used.
# Quantum computing imports
try:
import cirq
from openfermion.ops import QubitOperator, FermionOperator

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'FermionOperator' is not used.
import cirq
from openfermion.ops import QubitOperator, FermionOperator
from openfermion.chem import MolecularData
from openfermion.transforms import jordan_wigner, bravyi_kitaev, get_fermion_operator

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'bravyi_kitaev' is not used.
Comment on lines +37 to +41
from advanced_pauli_grouping import (
AdvancedPauliGroupOptimizer,
optimized_pauli_grouping,
create_molecular_test_hamiltonian
)

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'AdvancedPauliGroupOptimizer' is not used.
Import of 'create_molecular_test_hamiltonian' is not used.

# Execution time vs improvement
ax3 = axes[1, 0]
scatter = ax3.scatter(df['execution_time'], df['improvement_ratio'],

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable scatter is not used.
print(f"📊 Results available in: {suite.output_dir}")

# Print summary
report = suite.generate_performance_report()

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable report is not used.


if __name__ == "__main__":
results = main()

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'results' is not used.
@mhucka
Copy link
Contributor

mhucka commented Aug 1, 2025

@hofong428 thank you for this work.

Please add a description to this pull request.

Also, this appears to be related to your PR #1100. If that's the case, please combine the two PRs (perhaps by moving this test file to the PR) because new code contributions should have test cases anyway, and thus the files belong together.

@mhucka mhucka self-assigned this Aug 1, 2025
@mhucka mhucka added the area/health Involves code and/or project health label Aug 1, 2025
@hofong428
Copy link
Author

hofong428 commented Aug 2, 2025 via email

@mhucka
Copy link
Contributor

mhucka commented Aug 3, 2025

So.. what should I do now?

If this PR contains test cases for the contribution in PR #1100, then please add the file from this PR to PR #1100, close this PR, and continue at #1100.

The problems flagged by the CI here will still need to be addressed. It is up to your preferences whether you want to address them first and then move the file to the other PR, or move the file first and then address the problems. (When you push another commit to PR #1100 to add the file, it will trigger the CI jobs to run again, and the same errors will occur there until they are addressed.)

I hope I answered the question you were asking. If I misunderstood, please let me know.

@hofong428
Copy link
Author

hofong428 commented Aug 3, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/health Involves code and/or project health
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants