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

Gauge compiling as a sweep: merge single qubit gates #6994

Open
babacry opened this issue Jan 28, 2025 · 2 comments
Open

Gauge compiling as a sweep: merge single qubit gates #6994

babacry opened this issue Jan 28, 2025 · 2 comments
Assignees
Labels
kind/feature-request Describes new functionality

Comments

@babacry
Copy link
Collaborator

babacry commented Jan 28, 2025

Problem Statement

as_sweep() might transform a circuit with consecutive parameterized phxz operations.

Usually, after gauge_compiling, users would optimize the circuit by merging single qubit gates. While merging parameterized circuit isn't supported.

Potential Solutions

Support this in as_sweep() or merging the qubits in cirq.merge_single_qubit_gates_to_phxz.

@babacry babacry added the kind/feature-request Describes new functionality label Jan 28, 2025
@babacry babacry self-assigned this Jan 28, 2025
@babacry
Copy link
Collaborator Author

babacry commented Jan 28, 2025

@NoureldinYosri @eliottrosenberg created this issue to track things, please feel free to update some context or suggestions here.

@NoureldinYosri
Copy link
Collaborator

@babacry I suggest creating a new method for this that will take both the circuit and the sweep and return new circuit and new sweep

That is given any two consecutive phasedXZ gates

  1. both are parameterized -> drop one set of parameters and update the sweep values for the other
  2. only one is parameterized -> update the sweep values for these parameters
  3. neither are parameterized -> merge the two gates by falling back to merge_single_qubit_gates_to_phxz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request Describes new functionality
Projects
None yet
Development

No branches or pull requests

2 participants