-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
>> qc = qk.QuantumCircuit(3,2)
>>> qc.h(0)
<qiskit.circuit.instructionset.InstructionSet object at 0x12a19cc18>
>>> qc.measure(0,0)
<qiskit.circuit.instructionset.InstructionSet object at 0x12a19ccc0>
>>> qc.cx(1,2)
<qiskit.circuit.instructionset.InstructionSet object at 0x12a19ccf8>
>>> qc.cx(1,2).c_if(qc.cregs[0], 0)
<qiskit.circuit.instructionset.InstructionSet object at 0x12a19ccc0>
>>> qc.measure([1,2],[0,1])
<qiskit.circuit.instructionset.InstructionSet object at 0x12a19ccf8>
>>> print(qc)
┌───┐┌─┐
q_0: |0>┤ H ├┤M├─────────────
└───┘└╥┘ ┌─┐
q_1: |0>──■───╫────■───┤M├───
┌─┴─┐ ║ ┌─┴─┐ └╥┘┌─┐
q_2: |0>┤ X ├─╫──┤ X ├──╫─┤M├
└───┘ ║ └─┬─┘ ║ └╥┘
║ ┌──┴──┐ ║ ║
c_0: 0 ══════╩═╡ ╞═╩══╬═
│ = 0 │ ║
c_1: 0 ════════╡ ╞════╩═
└─────┘
>>> print(qk.transpile(qc, optimization_level=2))
┌───┐┌─┐
q_0: |0>┤ H ├┤M├───
└───┘└╥┘┌─┐
q_1: |0>──────╫─┤M├
┌─┐ ║ └╥┘
q_2: |0>─┤M├──╫──╫─
└╥┘ ║ ║
c_0: 0 ══╬═══╩══╩═
║
c_1: 0 ══╩════════
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working