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

Fock to bargmann #457

Merged
merged 186 commits into from
Aug 22, 2024
Merged

Fock to bargmann #457

merged 186 commits into from
Aug 22, 2024

Conversation

kaspernielsen96
Copy link
Collaborator

@kaspernielsen96 kaspernielsen96 commented Aug 12, 2024

Context:
Adding a method to convert circuit components from Fock to Bargmann
Description of the Change:
When contracting a bargmann and a fock object with each other, the fock object is converted to bargmann. This is opposite of what is currently done. If two fock objects meet each other they stay in fock.
Benefits:

  • Allows all the benefits from the new ansatz without changing the API. (i.e. Number.dual as a measurement device).
  • All objects in fock will automatically be converted to bargmann, which is more efficient for contracting with other objects down the line. It will create a "identity" Bargmann object with the Fock coefficients attached as the array (c)

Possible Drawbacks:

Related GitHub Issues:

mrmustard/lab_dev/circuit_components.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/circuit_components.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/circuit_components.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/circuit_components.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@ziofil ziofil left a comment

Choose a reason for hiding this comment

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

let's gooooo

Copy link
Collaborator

@ziofil ziofil left a comment

Choose a reason for hiding this comment

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

let's gooooo

@kaspernielsen96 kaspernielsen96 merged commit ab435e6 into develop Aug 22, 2024
7 checks passed
@kaspernielsen96 kaspernielsen96 deleted the fock_to_bargmann branch August 22, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Pull request does not require a CHANGELOG entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants