<jupyter_start><jupyter_text>Examples on how to use this package:<jupyter_code>from circuit import Circuit<jupyter_output><empty_output><jupyter_text>Circuit Creation<jupyter_code>circ = Circuit(3,5)
circ.X(2)
circ.H()
circ.barrier()<jupyter_output><empty_output><jupyter_text>Getting the Current State<jupyter_code>circ.get_state()
circ.get_state(output='tensor')<jupyter_output><empty_output><jupyter_text>Execute Simulation<jupyter_code>circ.execute(num_instances=800)<jupyter_output><empty_output><jupyter_text>Code To OpenQASM<jupyter_code>print(circ.compile())<jupyter_output>OPENQASM 2.0;
include "qelib1.inc";

qreg q[3]
creg c[5]

x q[2];
h q[None];
barrier q;<jupyter_text>Measurement<jupyter_code>circ = Circuit(2, 3)
circ.X(1)

# measure qubit one and write the result to classical bit 1
circ.measure(0, 1)
circ.bits[1]<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup