Qubits shouldn't be mutable
See original GitHub issueimport cirq
q1 = cirq.LineQubit(1)
circuit = cirq.Circuit(cirq.X(q1))
print(circuit)
q1.x = 2
print(circuit)
1: ───X───
2: ───X───
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
QuantumKatas/Tests.qs at main · microsoft ... - GitHub
"Framework" operation for testing single-qubit tasks for distinguishing states of one qubit ... mutable misclassifications = [0, size = nStates];.
Read more >Why do we need Q#? - Q# Blog - Microsoft Developer Blogs
An explanation of why we decided to develop Q#, a new language for quantum computing.
Read more >Introduction to quantum computing with Q# – Part 5 ...
In this part 5 of the series, we explored the concept of entanglement. We were able to use Q# to create entangled qubits...
Read more >measurement - Is there a classical limit to quantum computing?
When a measurement is made, a quantum state, whose probability amplitude is a Gaussian function, becomes an eigenstate, whose probability is ...
Read more >Why does Rust allow upgrading/downgrading mutability?
In rust, you can upgrade an immutable variable: ... of other cases that are technically possible, but shouldn't be done (like ownership).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Agreed.
LineQubit and GridQubit and NamedQubit should have their values hidden behind property methods.
Can you please assign this to me? @vtomole @Strilanc