-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Describe the bug
In the Your First Quantum Layer notebook, at the end, a perceval experiment is based on a circuit obtained with the circuit builder. An error is raised, I believe because the circuit is not an instance of a perceval ACircuit
To Reproduce
from merlin.builder import CircuitBuilder
import perceval as pcvl
builder = CircuitBuilder(n_modes=6)
circuit = builder.circuit
experiment = pcvl.Experiment(circuit)
Observed results
ValueError: The number of modes should be a strictly positive integer (got Circuit(n_modes=6, components=0))
Expected behavior
The last line should run without errors.
Additional context
I then tried
from perceval.components.linear_circuit import Circuit, ACircuit
isinstance(circuit, ACircuit)
I believe the issue comes from there, because of the if loop in perceval's Experiment class, line 134 which calls
if isinstance(m_circuit, ACircuit):
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels