Closed YonatanGideoni closed 2 years ago
The Instruction class gets the ideal gate as a parameter but does not use it.
Instruction
import numpy as np from c3.signal.gates import Instruction ideal = np.array([[0., 1.], [1., 0.]]) instr = Instruction(ideal=ideal) print(instr.get_ideal_gate(dims=[3]))
Expected output:
[[0.+0.j 1.+0.j] [1.+0.j 0.+0.j]]
Real output:
[[1.+0.j 1.+0.j] [1.+0.j 1.+0.j]]
c3-toolset
Solution - add self.set_ideal(ideal) at the end of the Instruction constructor. Will do this and open a pull request.
self.set_ideal(ideal)
Bug description
The
Instruction
class gets the ideal gate as a parameter but does not use it.To Reproduce
Expected behavior
Expected output:
Real output:
Environment
c3-toolset
Version latestAdditional context
Solution - add
self.set_ideal(ideal)
at the end of the Instruction constructor. Will do this and open a pull request.