-
Notifications
You must be signed in to change notification settings - Fork 46
Labels
simulation backendrelated to numerical simulation backendrelated to numerical simulation backendwork-in-progress
Description
The property nqubit of Statevec objects fails to return the correct number of qubits. See examples attached:
from graphix import Pattern
p = Pattern(input_nodes=[0, 1])
sim_py = p.simulate_pattern()
assert sim_py.nqubit == 2 # Error: sim_py.nqubit -> 3from graphix.sim.statevec import Statevec
sv = Statevec(nqubit=3)
assert sv.nqubit == 3 # Error: sv.nqubit -> 7DensityMatrix objects return the correct values:
from graphix import Pattern
p = Pattern(input_nodes=[0, 1])
sim_py = p.simulate_pattern(backend='densitymatrix')
print(sim_py.nqubit)
assert sim_py.nqubit == 2from graphix.sim.density_matrix import DensityMatrix
sv = DensityMatrix(nqubit=3)
assert sv.nqubit == 3Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
simulation backendrelated to numerical simulation backendrelated to numerical simulation backendwork-in-progress