Skip to content

Issue with compression #1

@kottmanj

Description

@kottmanj

There seems to be some issue with qubit compression. In particular it fails when the compiled object is called more than once with different variables. Here is a small example.

import tequila as tq

U = tq.gates.Ry("a",0)
U+= tq.gates.Ry("b",6)
H = tq.paulis.X(0)
H+= tq.paulis.X(6)
E = tq.ExpectationValue(H=H,U=U)
E1 = tq.compile(E,backend="spex")
E2 = tq.compile(E,backend="qulacs")
for a in [1.5,2.0,1.0]:
    print(a)
    print(E1({"a":a,"b":a}))
    print(E2({"a":a,"b":a}))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions