Skip to content

Errors with classical operations #213

@cqc-alec

Description

@cqc-alec
from pecos.engines.hybrid_engine import HybridEngine

eng = HybridEngine(qsim="state-vector")

phir = """
{
    "format": "PHIR/JSON",
    "version": "0.1.0",
    "ops":
    [
        {
            "data": "cvar_define",
            "data_type": "i64",
            "variable": "a",
            "size": 8
        },
        {
            "cop": "=",
            "returns":
            [
                "a"
            ],
            "args":
            [
                {
                    "cop": "<<",
                    "args":
                    [
                        "a",
                        1
                    ]
                }
            ]
        }
    ]
}
"""

res = eng.run(phir, shots=1)

This gives the error: TypeError: unsupported operand type(s) for <<: 'pecos_rslib.dtypes.i64' and 'int'.

Seems to be a regression from 0.7.0.dev4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions