Skip to content

[Bug] lift_operator edge case: empty subsystem levels complement #107

Description

@jack-champagne

Originally reported by @andgoldschmidt on harmoniqs/PiccoloQuantumObjects.jl#57

function lift_operator(
    operator::AbstractMatrix{T},
    indices::AbstractVector{Int},
    subsystem_levels::AbstractVector{Int},
) where T <: Number
 ...
)

The following line breaks if complement is empty, which happens if there are two subsystems:

    full_operator = kron(operator, [Matrix{T}(I(l)) for l  Lᶜ]...)

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