Exemple #1
0
 def reset(self):
     self.state=qubit_states(N=self.qubits)
Exemple #2
0
 def run(self):
     self.mult_matrices()
     props = self.propagators()
     U1 = gate_sequence_product(props)
     self.state= U1 * qubit_states(N=self.qubits)
Exemple #3
0
 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)
Exemple #4
0
 def __init__(self, qubits):
     self.state=qubit_states(qubits)
     self.qubits = qubits