Skip to content

Pad qubits if simplify reduces number of qubits while using circuit.simulation.simulate #74

@s-mandra

Description

@s-mandra

When simulation.simulate(circuit=circuit, simplify=True, remove_id_gates=False), if the number of qubits changes (that is, some qubits in circuit are removed after the simplification), HybridQ returns an error. At the moment, simulation.simulate(circuit=circuit, simplify=True, remove_id_gates=True) solves the problem, but it add an avoidable overhead.

The simplest solution would be to pad the missing qubits at the end of the simulation rather than at the beginning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions