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

Rename TwoQubitQPDGate, SingleQubitQPDGate to make their purpose more clear #260

Open
garrison opened this issue Jun 16, 2023 · 0 comments
Labels
cutting QPD-based circuit cutting code qpd Related to quasi-probability decompositions

Comments

@garrison
Copy link
Member

The names SingleQubitQPDGate and TwoQubitQPDGate don't really summarize the essence of what distinguishes these gates in our workflow. It's not really the number of qubits that distinguishes them: rather, it's whether they have been "cut apart" already.

Motivated by our decision to focus on the two-qubit form of QPD gates in the high-level part of the workflow, I am proposing something like the following rename. (I am also folding the proposal to rename QPDGate -> QPDInstruction, into this, as QPDGate is really an Instruction, and the Move "gate" of #174 is not actually a Gate.)

  • BaseQPDGate -> BaseQPDInstruction
  • TwoQubitQPDGate -> QPDInstruction This is the primary object users will use if they want to place decompositions manually rather than use partition_circuit_qubits.
  • SingleQubitQPDGate -> CutQPDInstruction, or something along these lines. Siblings of this object will be important as transpilation is performed; otherwise, the transpiler would think a QPDInstruction could only be performed if on adjacent qubits, and it would add swap gates in the routing pass to make this happen. So not only is this class necessary when we cut the circuit into disconnected components; it is relevant when we want to perform circuit cutting at all. However, great care must be taken with this object, as there is always a "hidden" variable that connects the gates that have been cut apart (otherwise it would be impossible to simulate entanglement).
  • qpdbasis_from_gate -> qpdbasis_from_instruction for consistency.
@garrison garrison added qpd Related to quasi-probability decompositions cutting QPD-based circuit cutting code labels Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutting QPD-based circuit cutting code qpd Related to quasi-probability decompositions
Projects
None yet
Development

No branches or pull requests

1 participant