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

Including stdgates.inc crashes Quasar #44

Closed
contra-bit opened this issue Aug 24, 2024 · 2 comments
Closed

Including stdgates.inc crashes Quasar #44

contra-bit opened this issue Aug 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@contra-bit
Copy link

Describe the bug
When including the stdgates.inc file in a Quasar circuit, the program crashes with a MethodError. This issue seems to arise from a type conversion problem related to the BraketSimulator instructions.

To reproduce

  1. Create a new Julia script or open a Julia REPL.
  2. Use the following code snippet to define a circuit:
    using BraketSimulator
    
    BraketSimulator.Circuit("""
    OPENQASM 3.0;
    include "stdgates.inc";
    """)
  3. Run the code.

Expected behavior
I expected the circuit to be created successfully without any errors when including the stdgates.inc file.

Screenshots or logs
image

System information

  • Julia version: stable
  • BraketSimulator version: main branch

Additional context
This issue may be related to the handling of control qubits in the BraketSimulator when using the stdgates.inc file. It seems that there is a mismatch in the expected types for the instructions being processed. Further investigation into the handle_gate_modifiers function in the Quasar package may be necessary to identify the root cause of the type conversion error.

@contra-bit contra-bit added the bug Something isn't working label Aug 24, 2024
@kshyatt-aws
Copy link
Member

Could you attach a copy of your stdgates.inc for this?

@kshyatt-aws
Copy link
Member

Fixed and test included in #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants