question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Qubits shouldn't be mutable

See original GitHub issue
import 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Strilanccommented, Oct 15, 2019

Agreed.

LineQubit and GridQubit and NamedQubit should have their values hidden behind property methods.

0reactions
fedimsercommented, Feb 7, 2020

Can you please assign this to me? @vtomole @Strilanc

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found