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

QSystem.copy() does not create copies of entire term list #244

Open
adriendilonardo opened this issue Nov 14, 2023 · 1 comment
Open

QSystem.copy() does not create copies of entire term list #244

adriendilonardo opened this issue Nov 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@adriendilonardo
Copy link
Collaborator

Platform and Environment

  • QuanGuru version:
  • Python version:
  • Operating system:

What is happening?

QSystem.copy() does not create copies of entire term list, instead only copying over the last created term added to the system

How can we reproduce the issue?

q = qg.Qubit(frequency=1)
c = qg.Cavity(frequency=1)
total_system = q + c
total_system.createTerm(qSystem=[q, c], operator=[qg.sigmam, qg.create])
total_system.createTerm(qSystem=[q, c], operator=[qg.sigmap, qg.destroy])

total_system_copy = total_system.copy()

print(total_system.terms)
print(total_system_copy.terms)

print()

print([term.operator for term in total_system.terms.values()])
print([term.operator for term in total_system_copy.terms.values()])

What should happen?

All of the terms of the original system should be copied over

Please put error messages in this block

No response

Any suggestions?

No response

@adriendilonardo adriendilonardo added the bug Something isn't working label Nov 14, 2023
@adriendilonardo adriendilonardo self-assigned this Nov 14, 2023
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant