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.

No documentation for the available memory types to Declare

See original GitHub issue

Searching the docs shows there’s no listing of what the possible memory types are (other than ‘BIT’) when doing Program.declare(..., ..., memory_type='???')

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
amyfbrowncommented, Oct 25, 2018

@notmgsk,

I would’ve expected the memory types to be listed in the python docstring…

I agree especially considering there are so few options that we could list them on a single line.

I don’t think pyquil does any checking on what memory_type is and so doesn’t really need to have any notion of what the memory types are

On that note, we should add type annotations for memory_type or otherwise change the documentation in the “Details of Updates to Quil” section to read

  • memory_type: one of 'REAL', 'BIT', 'OCTET', or 'INTEGER'

to emphasize that these memory_type options have to be strings or else you get a traceback:

    ro = program.declare(name='ro', memory_type=BIT, memory_size=len(qubits))
NameError: name 'BIT' is not defined
0reactions
mpharrigancommented, Oct 25, 2018

docs, docstrings, input validation, … all good and necessary things!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix out of memory errors by increasing available memory
Created with Sketch. This document discusses increasing memory to address PermGen and Heap space errors. Follow the links above to assess root ...
Read more >
Invalid CPU or memory value specified - AWS Documentation
When registering a task definition using the Amazon ECS API or AWS CLI, if you specify an invalid cpu or memory value, the...
Read more >
Memory Types - ESP32 - — ESP-IDF Programming Guide ...
ESP-IDF distinguishes between instruction memory bus (IRAM, IROM, RTC FAST memory) and data memory bus (DRAM, DROM). Instruction memory is executable, and can ......
Read more >
Manage your app's memory - Android Developers
Monitor available memory and memory usage. Release memory in response to events; Check how much memory you should use.
Read more >
Memory management - JavaScript - MDN Web Docs
In order to not bother the programmer with allocations, JavaScript will automatically allocate memory when values are initially declared.
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