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

Unify ExtractionGateSet and FullGateSet #45

Open
khieta opened this issue Jul 8, 2022 · 0 comments
Open

Unify ExtractionGateSet and FullGateSet #45

khieta opened this issue Jul 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@khieta
Copy link
Member

khieta commented Jul 8, 2022

We define a larger gate set for SQIR in ExtractionGateSet.v and for VOQC in FullGateSet.v. Both are shown below. We should unify these two gate sets for consistency. This will require updating the VOQC program representation in UnitaryListRepresentation.v to support 4- and 5-qubit gates.

In SQIR/ExtractionGateSet:

Inductive U : nat -> Set :=
  | U_X : U 1
  | U_H : U 1
  | U_U1 : R -> U 1
  | U_U2 : R -> R -> U 1 
  | U_U3 : R -> R -> R -> U 1
  | U_CX : U 2
  | U_CU1 : R -> U 2
  | U_CH : U 2
  | U_SWAP : U 2
  | U_CCX : U 3
  | U_CCU1 : R -> U 3
  | U_CSWAP : U 3
  | U_C3X : U 4
  | U_C4X : U 5.

In VOQC/FullGateSet.v;

Inductive Full_Unitary : nat -> Set := 
  | U_I                           : Full_Unitary 1 
  | U_X                           : Full_Unitary 1
  | U_Y                           : Full_Unitary 1 
  | U_Z                           : Full_Unitary 1
  | U_H                           : Full_Unitary 1 
  | U_S                           : Full_Unitary 1
  | U_T                           : Full_Unitary 1 
  | U_Sdg                         : Full_Unitary 1
  | U_Tdg                         : Full_Unitary 1 
  | U_Rx (r : R)                  : Full_Unitary 1
  | U_Ry (r : R)                  : Full_Unitary 1 
  | U_Rz (r : R)                  : Full_Unitary 1
  | U_Rzq (q : Q)                 : Full_Unitary 1
  | U_U1 (r : R)                  : Full_Unitary 1
  | U_U2 (r : R) (r : R)          : Full_Unitary 1 
  | U_U3 (r : R) (r : R) (r : R)  : Full_Unitary 1
  | U_CX                          : Full_Unitary 2
  | U_CZ                          : Full_Unitary 2
  | U_SWAP                        : Full_Unitary 2
  | U_CCX                         : Full_Unitary 3
  | U_CCZ                         : Full_Unitary 3.
Definition U := Full_Unitary.
@khieta khieta added the enhancement New feature or request label Jul 8, 2022
caldwellb added a commit that referenced this issue May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant