From e2a1a8821156fb2eadef7ee6da1cb0e81893b921 Mon Sep 17 00:00:00 2001 From: John Chen Date: Thu, 28 Jul 2022 00:38:42 -0700 Subject: [PATCH] Fix call to gate_expand_1toN in ch05 A call to gate_expand_1toN was using old namespace, causing it to fail with latest version of QuTiP (4.7.0). Fixing --- ch05/simulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch05/simulator.py b/ch05/simulator.py index 9719ff9..3ba510b 100644 --- a/ch05/simulator.py +++ b/ch05/simulator.py @@ -85,7 +85,7 @@ def deallocate_qubit(self, qubit: SimulatedQubit): def _apply(self, unitary: qt.Qobj, ids: List[int]): if len(ids) == 1: - matrix = qt.circuit.gate_expand_1toN( + matrix = gate_expand_1toN( unitary, self.capacity, ids[0] ) else: