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

[Feature] Simulator engines Api for Pulser backend #14

Open
Doomsk opened this issue Jul 4, 2024 · 4 comments
Open

[Feature] Simulator engines Api for Pulser backend #14

Doomsk opened this issue Jul 4, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request feature

Comments

@Doomsk
Copy link
Member

Doomsk commented Jul 4, 2024

Currently, pulser backend only presents a simple case using QuTiP. Ideally, the simulator/emulator engine should be part of the Model options, and an API class to be provided for template and abstraction purposes to implement each engine calls.

For example:

model = Model(
    register=AllocQubits(...),
    ...
    settings={
        "diff_mode": False,
        "eom_mode": True,
        "many_qubits": False
    }
)

# the model above should invoke QuTip simulator with EOM on pulses

model2 = Model(
    register=AllocQubits(...),
    ...
    settings={
        "diff_mode": True,
        "many_qubits": False
    }
)

# while this one above should invoke pulser-diff

model3 = Model(
    register=AllocQubits(...),
    ...
    settings={
        "many_qubits": True
    }
)

# and this should invoke EMU-TN, for instance

@awennersteen pinging because we discussed this at some point so you can follow up on it.
@kaosmicadei @dominikandreasseitz @Roland-djee @jpmoutinho @chMoussa pinging for awareness.

@Doomsk Doomsk added the enhancement New feature or request label Jul 4, 2024
@Doomsk Doomsk self-assigned this Jul 4, 2024
@kaosmicadei
Copy link
Contributor

What happens if someone wants to compile the first model using EMU-TN?

@kaosmicadei
Copy link
Contributor

model = Model(
    register=AllocQubits(...),
    ...
    settings={
        "diff_mode": False,
        "eom_mode": True,
        "many_qubits": False
    }
)

Wouldn't that require the user to know the existence of the EOM and its purpose?

Is that like a more compile flag than a Model flag?

@Doomsk
Copy link
Member Author

Doomsk commented Jul 4, 2024

model = Model(
    register=AllocQubits(...),
    ...
    settings={
        "diff_mode": False,
        "eom_mode": True,
        "many_qubits": False
    }
)

Wouldn't that require the user to know the existence of the EOM and its purpose?

Is that like a more compile flag than a Model flag?

@kaosmicadei the compiler should decide whether to use EOM based on the device coherence time and length of the pulses, etc. Unless the user somehow specifies such a thing during the compile with extra options, it's up to the compilation to organize it.

Of course it will be propagated to Model and beyond so the backend can the properly addressed with those options.

@RolandMacDoland RolandMacDoland changed the title Simulator engines Api for Pulser backend [Feature] Simulator engines Api for Pulser backend Jul 4, 2024
@kaosmicadei
Copy link
Contributor

kaosmicadei commented Jul 4, 2024

the compiler should decide whether to use EOM based on the device coherence time and length of the pulses, etc. Unless the user somehow specifies such a thing during the compile with extra options, it's up to the compilation to organize it.

As a user, my point is that if I want to benchmark the same sequence with and without EOM, I cannot use the same Model.

If the user has no knowledge about it, then the backend should make such a decision. But it shouldn't be a task for the expression compiler to handle. Instead, it should be passed as an option to the backend.compiler.

My point here is to define what should be used as Model flag and compiler flag.

The model should carry enough information to produce a sequence, not how to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

No branches or pull requests

3 participants