Package com.quantum4j.core.circuit
Class QuantumCircuit
java.lang.Object
com.quantum4j.core.circuit.QuantumCircuit
-
Method Summary
Modifier and TypeMethodDescriptionaddInstruction(Instruction instruction) ccx(int control1, int control2, int target) ch(int control, int target) static QuantumCircuitcreate(int numQubits) cx(int control, int target) cz(int control, int target) Render this circuit as ASCII art.inth(int qubit) iswap(int q0, int q1) measure(int qubit, int classicalBit) run(RunOptions options) Execute this circuit with the given options using the configured backend.rx(int qubit, double theta) ry(int qubit, double theta) rz(int qubit, double theta) s(int qubit) swap(int q0, int q1) t(int qubit) toSvg()Render this circuit as SVG.u1(int qubit, double lambda) u2(int qubit, double phi, double lambda) u3(int qubit, double theta, double phi, double lambda) x(int qubit) y(int qubit) z(int qubit)
-
Method Details
-
create
-
getNumQubits
public int getNumQubits() -
getInstructions
-
apply
-
h
-
x
-
y
-
z
-
s
-
t
-
rx
-
ry
-
rz
-
cx
-
cz
-
swap
-
iswap
-
ch
-
ccx
-
measure
-
measureAll
-
addInstruction
-
u3
-
u2
-
u1
-
run
Execute this circuit with the given options using the configured backend.- Parameters:
options- execution options- Returns:
- result of execution
-
drawAscii
Render this circuit as ASCII art.- Returns:
- ASCII diagram
-
toSvg
Render this circuit as SVG.- Returns:
- SVG string
-