def reset(self): self.state=qubit_states(N=self.qubits)
def run(self): self.mult_matrices() props = self.propagators() U1 = gate_sequence_product(props) self.state= U1 * qubit_states(N=self.qubits)
def __init__(self, qubits, layers): QubitCircuit.__init__(self, qubits, user_gates={"U3": u3}) self.layers = layers self.parameters = np.random.rand(2 * layers + 1, qubits, 3) self.qubits = qubits self.state=qubit_states(N=self.qubits)
def __init__(self, qubits): self.state=qubit_states(qubits) self.qubits = qubits