Skip to content

Running on qw11q (with/without transpiler) #209

@mho291

Description

@mho291

Hi! I have been trying to run GST on qw11q. This is the code I'm using to run:

    from qibo.transpiler.optimizer import Preprocessing
    from qibo.transpiler.pipeline import Passes
    from qibo.transpiler.placer import Random
    from qibo.transpiler.router import Sabre
    from qibo.transpiler.unroller import NativeGates, Unroller
    
    # Define gate set
    target_gates = [gates.X(0)]
    # target_gates = [gates.H(0)]
    gate_set = [g.__class__ for g in target_gates]

    # define transpiler
    connectivity = ???
    transpiler = Passes(
        connectivity=connectivity,
        passes=[
            Preprocessing(),
            Random(),
            Sabre(),
            Unroller(NativeGates.default(), backend=backend),
        ],
    )

    # transpiled GST
    T_empty_1q, T_empty_2q, *T_approx_gates = GST(
        gate_set=gate_set,
        nshots=int(1e4),
        include_empty=True,
        pauli_liouville=False,
        backend=backend,
        transpiler=transpiler,
    )

An error message pops up: ValueError: invalid literal for int() with base 10: 'A1' .
Within GST, all circuits are constructed with q0 for single qubit GST and q0 + q1 for two qubit GST.
I think the error pops up because qw11q is expecting a transpiled circuit.

I have two question:

  1. Is there some way to obtain the qubit connectivity in B-line of qw11q to enable transpiler? This goes into the variable connectivity
  2. I'm using qibo.set_backend("qibolab", platform="qw11q") to set the backend. But is there a way to set the backend within backend to pass into GST?

Alternatively, if transpiler is turned off, is there a way to target specific qubits in the B-line? I'll be happy to use a modified version of the GST code that takes into account the native gates of qw11q and the connectivity. If there is an example on how to execute a Bell circuit on the B-line, I could follow that and modify the GST code myself.

Thank you so much. Wishing everyone a Merry Christmas!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions