Skip to content

Commit

Permalink
Merge pull request #17 from QwertygidQ/wip
Browse files Browse the repository at this point in the history
Wip
  • Loading branch information
taiypeo authored Sep 16, 2017
2 parents 8efdcfc + 4a85d74 commit e71bb8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A quantum circuit simulator, written in Java.

![alt bell_state_gif](https://media.giphy.com/media/xT9IgJ4N1H8OJDPWus/giphy.gif)
![alt bell_state_gif](https://media.giphy.com/media/3ov9jOT7SkcrXTzNew/giphy.gif)

_Bell state simulation demonstration_

Expand Down
6 changes: 3 additions & 3 deletions com/qwertygid/deutschsim/GUI/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void setup() {
circuit_menu.addSeparator();
add_item_create_custom_gate(circuit_menu);

JMenu help_menu = create_menu("Help", menu_bar);;
JMenu help_menu = create_menu("Help", menu_bar);
add_item_about(help_menu);
}

Expand Down Expand Up @@ -318,7 +318,7 @@ public void actionPerformed(ActionEvent arg0) {
Circuit circuit = new Circuit(gate_table.get_table());
FieldVector<Complex> results = circuit.operate(qubit_table.get_qubits());

StringBuilder text = new StringBuilder("<html>Simulation results:<table border=\"0\">");
StringBuilder text = new StringBuilder("<html>Simulation results:<table cellspacing=\"0\" cellpadding=\"0\">");

final int qubits_number = Integer.toBinaryString(results.getDimension() - 1).length();
for (int index = 0; index < results.getDimension(); index++) {
Expand All @@ -336,7 +336,7 @@ public void actionPerformed(ActionEvent arg0) {
qubits_values.insert(0, '0');

text.append("<tr><td>" + Tools.round(current.getReal()) + (current.getImaginary() < 0 ? "" : "+") +
Tools.round(current.getImaginary()) + "i |" + qubits_values + "></td><td>" +
Tools.round(current.getImaginary()) + "i |" + qubits_values + ">&emsp;&emsp;</td><td>" +
current_percentage + "% chance</td></tr>");
}

Expand Down

0 comments on commit e71bb8e

Please sign in to comment.