You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Programs/Sensing/twoq.py
-7Lines changed: 0 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -37,14 +37,7 @@
37
37
print("Measurement results:")
38
38
forstate, countincounts.items():
39
39
print(f"{state}: {count}")
40
-
41
40
"""
42
-
Here's a breakdown of the code:
43
-
44
-
1. We import the necessary libraries from Qiskit, a popular open-source software development kit for working with quantum computers.
45
-
2. We define the number of qubits to be 2.
46
-
3. We create a quantum circuit with the specified number of qubits.
47
-
4. We apply a Hadamard gate to the first qubit to create a superposition.
48
41
5. We apply a CNOT gate to entangle the two qubits.
49
42
6. We apply a time-dependent field to the system by rotating the second qubit around the Z-axis with a field strength that varies sinusoidally over time.
50
43
7. We measure the qubits and execute the circuit on a simulator.
0 commit comments