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

Add Fermionic SWAP gate as a member of OpType enum. #1462

Open
CalMacCQ opened this issue Jun 21, 2024 · 0 comments
Open

Add Fermionic SWAP gate as a member of OpType enum. #1462

CalMacCQ opened this issue Jun 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@CalMacCQ
Copy link
Contributor

CalMacCQ commented Jun 21, 2024

The Fermionic SWAP gate has the unitary matrix

$$ \text{FSWAP} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & -1 \end{pmatrix} $$

You can implement this gate as Circuit(2).CZ(0, 1).SWAP(0, 1) or Circuit(2).SWAP(0, 1).CZ(0, 1).

Currently I'm handling the FSWAP gate as a CircBox containing a CZ and SWAP gate. Maybe we should add it as a pytket OpType for convienicence?

I thought previously that you could implement FSWAP as an OpType.FSim gate for some appropriate choice of angles. However it doesn't work out as nicely as I thought.

(Low priority)

@CalMacCQ CalMacCQ added the enhancement New feature or request label Jun 21, 2024
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