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

Code refactor: second round #63

Merged
merged 8 commits into from
Oct 16, 2024
Merged

Code refactor: second round #63

merged 8 commits into from
Oct 16, 2024

Conversation

andrea-pasquale
Copy link
Collaborator

No description provided.

@andrea-pasquale
Copy link
Collaborator Author

Further simplification of the code. It should be ready to review now.

@marekgluza
Copy link
Contributor

marekgluza commented Jul 10, 2024

No action required, comment for the future: for consistency the test function snippet was removed (which is ok)

def test_compiling_XXZ(t = 0.1, nqubits = 4, steps = 3):
h = hamiltonians.XXZ(nqubits=nqubits, delta=0.5)
return np.linalg.norm(h.exp(t) - circuit_compiling_phase(nqubits, steps) * nqubit_XXZ_decomposition(
nqubits=nqubits,t=0.1,delta=0.5,steps=steps))

In the future we may keep that function in this form for pytest because keeping that phase in this form is crucial for getting a converging norm

Copy link
Contributor

@marekgluza marekgluza 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 very much!!

Copy link
Collaborator Author

@andrea-pasquale andrea-pasquale left a comment

Choose a reason for hiding this comment

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

Thanks for the feedback @marekgluza

Copy link
Contributor

@marekgluza marekgluza left a comment

Choose a reason for hiding this comment

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

@andrea-pasquale
Copy link
Collaborator Author

@marekgluza
Copy link
Contributor

thanks a lot @andrea-pasquale

@MatteoRobbiati if you run anything then keep the fixes in this PR in mind :)

Base automatically changed from minor_fixes to main September 3, 2024 06:05
@marekgluza marekgluza mentioned this pull request Oct 15, 2024
1 task
@Edoardo-Pedicillo Edoardo-Pedicillo merged commit 7904e32 into main Oct 16, 2024
@Edoardo-Pedicillo Edoardo-Pedicillo deleted the refactor_again branch October 16, 2024 06:09
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.

3 participants