Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(9)  |  Derive(1)  |  Import(1)

src/q/u/QuaEC-1.0.1/src/qecc/stab.py   QuaEC(Download)
        """
 
        circ = circuit.Circuit()
        for qubit_idx, operator in enumerate(self.group_generators[gen_idx].op):
            # operator = (self.group_generators[gen_idx].op)[qubit_idx]
            if operator == 'I':
                pass
            elif operator == 'Z':
                circ += circuit.Circuit(('CNOT',qubit_idx,self.nq))
                circ += circuit.Circuit(('CNOT',qubit_idx,self.nq))
            elif operator == 'Y':
                circ += circuit.Circuit(circuit.Location('P',qubit_idx),circuit.Location('Z',qubit_idx),circuit.Location('H',qubit_idx),circuit.Location('CNOT',qubit_idx,self.nq),circuit.Location('H',qubit_idx),circuit.Location('P',qubit_idx))
            elif operator == 'X':
                circ += circuit.Circuit(circuit.Location('H',qubit_idx),circuit.Location('CNOT',qubit_idx,self.nq),circuit.Location('H',qubit_idx))
                for idx_gen in xrange(len(self.group_generators))
            ),
            circuit.Circuit()
        )
 

src/c/a/cardoon-HEAD/cardoon/simulator.py   cardoon(Download)
 
    if circuitName:
        ckt = cir.Circuit(circuitName)
    else:
        ckt = cir.get_mainckt()        

src/q/u/QuaEC-1.0.1/src/qecc/PauliClass.py   QuaEC(Download)
 
import pred
from circuit import Circuit, Location
from paulicollections import PauliList
from unitary_reps import pauli_as_unitary
            if letter != "I":
                gatelist.append((letter,idx))
        return Circuit(*gatelist)
 
    def as_unitary(self):

src/p/y/pycircuit-HEAD/pycircuit/circuit/hdl.py   pycircuit(Download)
class Behavioural(circuit.Circuit):
    """
    Behavioral circuit model
 
    The Behavioural is an extension of the Circuit class where an analogoue 

src/q/u/QuaEC-1.0.1/src/qecc/bsf.py   QuaEC(Download)
        # into another module, bsf_decomp.
        left, right = bsf_decomp.circuit_decomposition_part1(self.copy())
        circ = circuit.Circuit(*(right + list(reversed(left))))
        if validate:
            assert all(circ.as_clifford().as_bsm()._arr == self._arr), "Decomposition failed to produce desired BSM."