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

Support custom multiqubit operations in simulator #52

Open
thisac opened this issue Sep 5, 2024 · 0 comments
Open

Support custom multiqubit operations in simulator #52

thisac opened this issue Sep 5, 2024 · 0 comments

Comments

@thisac
Copy link
Collaborator

thisac commented Sep 5, 2024

Only a subset of multi-qubit gates are supported in the simulator, causing custom multi-qubit operations to fail.

bell = Circuit(2)

with bell.context as (q, c):
    ops.Hadamard(q[0])
    ops.CNOT(q[0], q[1])

Bell = create_operation(bell, "Bell")
circuit = Circuit(2)

with circuit.context as (q, c):
    Bell(q)

raises

simulator encountered unknown multi-qubit operation: Bell

Two potential solutions are:

  • Add support for arbitrary unitaries in the simulator.
  • Automatically decompose custom gates before running them on the simulator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant