Skip to content

Error when using jnp.roll with QNode + Dynamic shapes #1615

Open
@dime10

Description

@dime10

The following program fails:

from catalyst import *
import pennylane as qml

@qjit
@qml.qnode(qml.device('lightning.qubit', wires=0))
def circuit(N: int):
    phase_divisors = jnp.arange(N)
    cumulative_phase = jnp.roll(phase_divisors, jnp.asarray(1))
    return cumulative_phase

print(circuit(2))

Without the QNode, it succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions